Note when using EXPDP and IMPDP: EXP and IMP are client tool programs that can be used either on the client or on the server. EXPDP and IMPDP are tool programs on the server. They can only be used on the ORACLE server, but not on the client. IMP only applies to EXP exported files, not EXPDP exported files; IMPDP
Note when using EXPDP and IMPDP: EXP and IMP are client tool programs that can be used either on the client or on the server. EXPDP and IMPDP are tool programs on the server. They can only be used on the ORACLE server, but not on the client. IMP only applies to EXP exported files, not EXPDP exported files; IMPDP
Precautions when using EXPDP and IMPDP:
EXP and IMP are client tool programs that can be used either on the client or on the server.
EXPDP and IMPDP are tool programs on the server. They can only be used on the ORACLE server, but not on the client.
IMP only applies to EXP exported files, not EXPDP exported files; IMPDP only applies to EXPDP exported files, not EXP exported files.
When you run the expdp or impdp command, you can leave the username/password @ Instance name as the identity, and then enter it as prompted, such:
Expdp schemas = scott dumpfile = expdp. dmp DIRECTORY = dpdata1;
1. Create a logical directory. This command does not create a real directory in the operating system. It is best to create a directory as an administrator such as system.
Create directory dpdata1 as 'd: \ test \ dump ';
2. Check the Administrator directory (check whether the operating system exists at the same time because Oracle does not care whether the directory exists. If the directory does not exist, an error occurs)
Select * from dba_directories;
3. Grant scott the operation permission on the specified directory. It is best to grant permissions to the system administrator.
Grant read, write on directory dpdata1 to scott;
Iv. Export data
1) by User Guide
Expdp scott/tiger @ orcl schemas = scott dumpfile = expdp. dmp DIRECTORY = dpdata1;
2) parallel process parallel
Expdp scott/tiger @ orcl directory = dpdata1 dumpfile = scott3.dmp parallel = 40 job_name = scott3
3) import by table name
Expdp scott/tiger @ orcl TABLES = emp, dept dumpfile = expdp. dmp DIRECTORY = dpdata1;
4) export by query Conditions
Expdp scott/tiger @ orcl directory = dpdata1 dumpfile = expdp. dmp Tables = emp query = 'where deptno = 20 ';
5) export by tablespace
Expdp system/manager DIRECTORY = dpdata1 DUMPFILE = tablespace. dmp TABLESPACES = temp, example;
6) import the entire database
Expdp system/manager DIRECTORY = dpdata1 DUMPFILE = full. dmp FULL = y;
V. Restore data
1) Export to a specified user
Impdp scott/tiger DIRECTORY = dpdata1 DUMPFILE = expdp. dmp SCHEMAS = scott;
2) Change the table owner.
Impdp system/manager DIRECTORY = dpdata1 DUMPFILE = expdp. dmp TABLES = scott. dept REMAP_SCHEMA = scott: system;
3) Import tablespace
Impdp system/manager DIRECTORY = dpdata1 DUMPFILE = tablespace. dmp TABLESPACES = example;
4) import the database
Impdb system/manager DIRECTORY = dump_dir DUMPFILE = full. dmp FULL = y;
5) append data
Impdp system/manager DIRECTORY = dpdata1 DUMPFILE = expdp. dmp SCHEMAS = system TABLE_EXISTS_ACTION