数据泵导入导出

来源:互联网 发布:历年网络炒作事件 编辑:程序博客网 时间:2024/05/01 08:42
 a. 导出时指定导出schema,即带上schemas=xx用户的参数,排除掉统计分析信息,即带上exclude=statistics参数;
b. 导入时分三步或两走:
B.1先导入全部数据,但排除掉索引和约束,排除掉约束的话可以把约束相对应的索引也排除掉,否则是排除不掉的,即带入exclude=index,constraint参数。
 B.2再(且只)导入所有约束,即把exclude=index,constraint参数换成include=constraint参数。
B.3再导入所有其它索引,即把exclude=index,constraint参数换成include=index参数。当然B.2和B.3也可以合在一步做。
下面举个导入三步走的例子:第一步导入数据,排除索引和约束,脚本如下:
impdp system/oracle directory=DMP_DIR dumpfile=yxpxdb_tj.dmp logfile=test_dump.log job_name=mydump schemas=SGPM_OUT,SGPM,KBSD,OWF_MGR,WF_AMBER,AMBER exclude=index,constraint,statistics
第二步导入约束,脚本如下:
impdp system/oracle directory=DMP_DIR dumpfile=yxpxdb_tj.dmp logfile=test_dump.log job_name=mydump schemas=SGPM_OUT,SGPM,KBSD,OWF_MGR,WF_AMBER,AMBER include=constraint
 第二步导入约束,脚本如下:
 impdp system/oracle directory=DMP_DIR dumpfile=yxpxdb_tj.dmp logfile=test_dump.log job_name=mydump schemas=SGPM_OUT,SGPM,KBSD,OWF_MGR,WF_AMBER,AMBER include=index
0 0
原创粉丝点击