您好,欢迎访问一九零五行业门户网

Oracle impdp的ignore及 fromuser / touser 功能

在使用impdp时,会发现,有很多参数选项与imp不同,比如说,找不到了fromuser和touser参数,也找不到了ignore参数,indexes等参数
在使用impdp时,会发现,有很多参数选项与imp不同,比如说,找不到了fromuser和touser参数,也找不到了ignore参数,indexes等参数也不再存在。
当然这些功能都还在,而且更加强大,impdp有了不少新的替代参数。
以下三个参数极大的增强了用户转换及表空间转换的操作:
remap_datafile        redefine datafile references in all ddl statements.
remap_schema          objects from one schema are loaded into another schema.
remap_tablespace      tablespace object are remapped to another tablespace.
remap_schema可以定义用户的切换,其格式为:
remap_schema=old_schema_name:new_schema_name
remap_tablespace可以定义切换对象的不同表空间,其格式为:
rempa_tablesapce=old_tablespace_name:new_tablespace_name
以前类似ignore的忽略创建错误,可以使用content参数:
content               specifies data to load where the valid keywords are:
                              (all), data_only, and metadata_only.
如果数据结构已经存在可以指定content=data_only,仅导入数据。
而关于索引的排除,,可以使用exclude参数:
exclude               exclude specific object types, e.g. exclude=table:emp.
impdp导入时忽略索引可以使用类似: exclude=constraint exclude=index
如果导入时遇到如下错误,就需要调整remap_schema参数:
ora-39146: schema sms_mt does not exist
遇到如下错误,那就需要制定remap_tablespace参数:
ora-00959: tablespace 'sms_mt' does not exist
今天使用的参数是:
impdp sms4/sms4 dumpfile=08.dmp directory=impdp tables=smsmg remap_schema=sms:sms4 remap_tablespace=sms_mt:sms content=data_only parallel=8 exclude=constraint exclude=index
记录一下供参考。
其它类似信息

推荐信息