总结一下exp/imp和expdp/impdp
1、exp/imp客户端和服务端都可以执行,expdp/impdp只能在服务器端执行,也就是说,你可以远程exp备份。
2、exp导出的文件只能imp导入,expdp导出的文件只能impdp导入,不能混用
3、imp导入是追加到表,impdp有参数选项TABLE_EXISTS_ACTION
4、imp导入表是按照表名顺序,而impdp是按照表大小,从大到小导入
以下是部分测试
SQL> select owner,constraint_name,table_name,status from user_constraints;
OWNER CONSTRAINT_NAME TABLE_NAME STATUS
-------------------- ------------------------------ ------------------------------ --------
SC SYS_C0011234 T1 ENABLED
SQL> show user
USER is "SA"
SQL> select count(*) from t1;
COUNT(*)
----------
5
SQL> select count(*) from test;
COUNT(*)
----------
102
SQL> select owner,constraint_name,table_name,status from user_constraints;
OWNER CONSTRAINT_NAME TABLE_NAME STATUS
-------------------- ------------------------------ ------------------------------ --------
SA SYS_C0011172 T1 ENABLED
SQL> show user
USER is "SC"
SQL> select count(*) from test;
COUNT(*)
----------
204
SQL> select count(*) from t1;
COUNT(*)
----------
5
TABLE_EXISTS_ACTION
Action to take if imported object already exists.
Valid keywords are: APPEND, REPLACE, [SKIP] and TRUNCATE.
阅读(1743) | 评论(0) | 转发(0) |