oracle database export import

Under normal circumstances, we use the exp command for the oracle database export:

exp userName/password file=myExp.dmp  owner=userName;

But today when bloggers perform an exp export operation on the database, the export fails with an error:

EXP-00006: internal inconsistency error  
EXP-00000: Export terminated unsuccessfully

In this case, we encountered an oracle bug, and the exp command line failed.

The following introduces another export method—expdp command.

1. Create a dmp file storage path

mkdir E:/dump_name

2. Start sqlplus

SqlPlus sys/syspwd@MyOrcl AS sysdba

3. Create a new directory name for dump import and export (dump_dir)

create or replace directory dump_name as 'E:\DumpFiles' ;

4. Give this user import and export directory read and write permissions, otherwise the export will report an error

// dump_name is the name of the directory created in the previous statement
 // userName is the user name of the database, and the data under the user name that needs to be 
imported is authorized to whom grant read, write on directory dump_name to userName;

5. Quit sqlplus and run the dump tool

exit;

6. Perform the export operation

// directory = name of the directory created by yourself
 // dumpfile = export file name 
expdp userName / password directory = dump_name dumpfile = myDump.dmp

Finally, attach the supporting import command

impdp userName/password directory=dump_name dumpfile=myDump.dmp FULL=y;

 

Guess you like

Origin www.cnblogs.com/niyl/p/12689881.html
Recommended