How to configure and import and export data in ORACLE

Source: Internet
Author: User

Linux system boot oracle self-boot

Log On As root:

$ Su-root

1. dbstart and dbshut of oracle in linux do not respond:

Modify the Oracle system configuration file/etc/oratab: # vi/etc/oratab

/Etc/oratab format: SID: ORACLE_HOME: AUTO

Set the AUTO domain to Y (uppercase). Mine is:

Oradb:/opt/u01/app/oracle/product/9.2.0.4: Y

Only in this way can dbstart and dbshut of oracle be used.

2. Modify the/etc/rc. d/rc. local configuration file.

Add the following content to/etc/rc. d/rc. local: # vi/etc/rc. d/rc. local

Su-oracle-c "/u01/app/oracle/product/9.2.0.4/bin/lsnrctl start"

Su-oracle-c "/u01/app/oracle/product/9.2.0.4/bin/dbstart start"

3. Restart

# Reboot

,

Import and Export ORACLE11G ::

When oracle 11g exports a database using exp, empty tables cannot be exported. Therefore, you must use a Data Pump to import and export the oracle database.

1. expdp

SQL> create directory name (for example, dmpbx) as storage address (for example, '/root/usr /...... ');

The directory has been created.

SQL> grant read, write on directory name to public;

Authorization successful.

SQL> exit

Expdp username 1/password @ instance dumpfile = backup file name (ecology. dmp) directory = directory name (dmpbx)

2. impdp

SQL> create directory name (for example, dmpbx) as storage address (for example, '/root/usr /...... ');

The directory has been created.

SQL> grant read, write on directory name to public;

Authorization successful.

SQL> exit

Impdp username 2/password @ instance directory = directory name dumpfile = backup file name. dmp logfile = log name. log REMAP_SCHEMA = username 1: username 2

If impdp is operated on the same machine, the Directory Creation and authorization steps before impdp can be omitted.

Note: For File Permission issues, Instance name = service name

Chown, chmod settings

Some ORA errors ::

ORA-00845: MEMORY_TARGET not supported on this system

You can modify the/dev/shm size by modifying/etc/fstab:

[Root @ db2 ~] # Df-h/dev/shm // view/dev/shm size

Tmpfs 1.0G 500 M 500 M 50%/dev/shm

[Root @ db2 ~] # Vi/etc/fstab // change/dev/shm. The default size is 2 GB.

LABEL = // ext3 defaults 1 1

LABEL =/boot ext3 defaults 1 2

# Tmpfs/dev/shm tmpfs defaults 0 0

Tmpfs/dev/shm tmpfs ults, size = 2048 M 0 0

Devpts/dev/pts devpts gid = 5, mode = 620 0 0

Sysfs/sys sysfs defaults 0 0

Proc/proc defaults 0 0

LABEL = SWAP-hda3 swap defaults 0 0

Mount-o remount/dev/shm

ORA-01102: cannot mount database in EXCLUSIVE mode

/Opt/oracle/ordata/orcl200

Fuser-u lk *

Fuser-k lk *

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.