impdp导入
第一种:“full=y”,全量导入数据库;
impdp user/passwd directory=data_dir dumpfile=expdp.dmp full=y;
第二种:同名用户导入,从用户A导入到用户A;
impdp A/passwd schemas=A directory=data_dir dumpfile=expdp.dmp logfile=impdp.log;
导入emp表
impdp scott/oracle directory=dump_dir dumpfile=scotttab.dmp tables=emp
第三种:
a.从A用户中把表table1和table2导入到B用户中;
impdp B/passwdtables=A.table1,A.table2 remap_schema=A:B directory=data_dir dumpfile=expdp.dmp logfile=impdp.log;
b.将表空间TBS01、TBS02、TBS03导入到表空间A_TBS,将用户B的数据导入到A,并生成新的oid防止冲突;
impdp A/passwdremap_tablespace=TBS01:A_TBS,TBS02:A_TBS,TBS03:A_TBS remap_schema=B:A FULL=Y transform=oid:n
directory=data_dir dumpfile=expdp.dmp logfile=impdp.log
第四种:导入表空间;
impdp sys/passwd tablespaces=tbs1 directory=data_dir dumpfile=expdp.dmp logfile=impdp.log;
第五种:追加数据;
impdp sys/passwd directory=data_dir dumpfile=expdp.dmp schemas=system table_exists_action=replace logfile=impdp.log;