November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Oracle data pump expdp / impdp

Oracle 11g later new features make the default conditions in the allocation of table space when the empty table is ignored to reduce the table space resource consumption, so that the use of Oracle’s exp export user data will be ignored when the empty table, it will cause data Not complete, of course, in the use of exp export data is not no way, this has been mentioned before,

Use this method is to solve the use of exp export user data will not ignore the empty table, but there is a more efficient way is to use expdp / impdp – Oracle data pump, to import and export Oracle data, compared to exp / Imp expdp / impdp is more efficient data import and export tools used, of course, here expdp / impdp and exp / imp difference between the simple to say.

And exp different, the use of expdp export data first use DBA users to enter Oracle to perform a specified backup path and then authorized to read and write before they can operate, the specific steps are as follows:

SQL> create or replace directory dpdata1 as '/data/backup/oracle_backup';
 
Directory created.
 
SQL> grant read,write on directory dpdata1 to u01;
 
Grant succeeded.
 
SQL> grant read,write on directory dpdata1 to u02;
 
Grant succeeded.
 
SQL> select from dba_directories;

Here dpdatal designated to backup the data to export the path, and then authorized to export the directory to the user, it should be noted that this directory must be Oracle users to ensure that the file permissions to write, after the completion of the specified backup directory can Expdp start with the export of data, the use of expdp export data will import.log log file generation, because here is a number of user export, I will specify the log file under the file name

[oracle@localhost ~]$ expdp u01/passwword_u01  directory=dpdata1  dumpfile=u01.dmp logfile=u01.log
expdp u02/password_u02  directory=dpdata1  dumpfile=u02.dmp logfile=u02.log

After the export will be in the specified backup directory to generate backup files and log.

In the import time to use impdp import, the specific use of the method with the qu almost, but need to specify the backup directory, the operation is as follows:

[oracle@localhost oracle_backup]$ impdp u01/passwword_u01 directory=dpdata1 dumpfile=u02.dmp FULL=y
[oracle@localhost oracle_backup]$ impdp u02/passwword_u02 directory=dpdata1 dumpfile=u02.dmp FULL=y

So that the import is completed, but here is the need to note that the use of impdp import data, if Oracle did not create the appropriate user, after the import will automatically create the user, so when you need to pay attention to the import The data is wrong, the simple Oracle data pump expdp / impdp is roughly the same, there are other in accordance with the table name, query conditions, the whole library import and export operations are roughly the same, just need to modify a few parameters, Do too much explanation

—————————- gorgeous split line —————– ———–

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>