低版本Oracle 向高版本Oracle 导入导出使用 imp dmp 命令 即可
导出 exp tsmcis@dctdb172 tables= (pd_m_part_baseinfo,pd_m_part_sub,ts_tree_template,ds_part_setupdatas,pd_b_trainset_dict,pd_m_trainset_stat us,pd_m_lz_resumecard,pd_m_lz_jskp_his_new) file=d:\resume-tdb-20181129.dmp 导入 imp ldgl/ldgl_123@orcl tables= (pd_m_part_baseinfo,pd_m_part_sub,ts_tree_template,ds_part_setupdatas,pd_b_trainset_dict,pd_m_trainset_stat us,pd_m_lz_resumecard,pd_m_lz_jskp_his_new) file=d:\resume-tdb-20181129.dmp
但是高版本Oracle向低版本Oracle 导入缺不行 不能使用imp dmp 命令 因为版本的问题导致无法导入dmp文件
解决方法 1 ,修改dmp文件表头 把版本信息修改即可

但dmp文件有可能过大会打不开 无法编辑 ,或者 编码样式会导致无法导入 推荐方法2
解决方法2
使用dmpdp impdp 命令操作 需要编写版本信息
导出
expdp ldgl/Ldgl_1234@LDGL dumpfile=ll.dmp version=10.2.0.1.0 tables=pd_m_lz_jskp_his_new,pd_m_lz_resumecard
导入 impdp ldgl/ldgl_123@orcl dumpfile=ll.dmp version=10.2.0.1.0 tables=pd_m_lz_jskp_his_new,pd_m_lz_resumecard remap_tablespace=LDGL_DATA:LDGL transform=segment_attributes:n
如果导入不添加remap_tablespace=LDGL_DATA:LDGL transform=segment_attributes:n 会报大量的
ORA-39112: dependent object type comment skipped 错误
使用impdp工具完成数据导入时,会按照dump文件中有关的存储的参数信息完成数据的导入。很多情况下我们希望按照被导入用户的默认参数完成数据的导入,
此时我们可以使用impdp的transform参数辅助完成
说明
remap_tablespace=LDGL_DATA:LDGL 原来的表空间:现在的表空间
transform=segment_attributes:n 去掉表空间和存储子句,加上这个参数后,remap_tablesapce参数就会失效,就会倒进用户默认的表空间