Oreacle 11g IMPDP/EXPDP 参数使用小记

来源:互联网 发布:淘宝前100名半价可信吗 编辑:程序博客网 时间:2024/06/15 22:40

本文记录 Oracle 11gr2 database impdp/expdp 参数使用与10g 的区别(不定时更新)具体参数使用见文章结尾

 

Test1: 10g fromuser touser 与 remap_schema 比较

 


wonderful 知道 10g里面 从 schema A  导入到 schema B 是通过  <fromuser=>  <touser=>

在11.2.0.1中用到这2个命令其实会出现转换的语句,但事实上没有成功:

[oracle@test1 ~]$ impdp test/test1234@wtf fromuser=scott touser=test  directory=backup dumpfile=dept_structure.dmp
Import: Release 11.2.0.1.0 - Production on Tue Feb 19 03:31:21 2013
...
Legacy Mode Parameter: "fromuser=scott" Location: Command Line, Replaced with: "remap_schema"
Master table "TEST"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "TEST"."SYS_IMPORT_FULL_01":  test/********@wtf remap_schema=scott:test directory=backup dumpfile=dept_structure.dmp
Processing object type TABLE_EXPORT/TABLE/TABLE
ORA-39083: Object type TABLE:"TEST "."DEPT" failed to create with error:
ORA-01918: user 'TEST ' does not exist
Failing sql is:
CREATE TABLE "TEST "."DEPT" ...<省略>
Job "TEST"."SYS_IMPORT_FULL_01" completed with 1 error(s) at 03:31:34


 
修改成remap_schema 后,导入成功(随便也把不同tablespace的也做了):

 

[oracle@test1 ~]$ impdp test/test1234@wtf remap_schema=scott:test remap_tablespace=users:test  directory=backup dumpfile=dept_structure.dmp

Import: Release 11.2.0.1.0 - Production on Tue Feb 19 03:50:38 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table "TEST"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "TEST"."SYS_IMPORT_FULL_01": test/********@wtf remap_schema=scott:test remap_tablespace=users:test directory=backup dumpfile=dept_structure.dmp
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Job "TEST"."SYS_IMPORT_FULL_01" successfully completed at 03:50:53