【问题标题】:Oracle: Import existing table from dmp into new tableOracle:将现有表从 dmp 导入新表
【发布时间】:2017-03-07 00:55:19
【问题描述】:

我可以使用以下命令导出表格

exp usr1/user1@tes tables=table1 file=/myfoler/export/parties.dmp log=/myfoler/export/parties.log statistics=none direct=y

但是当我尝试将 dmp 文件导入新表时,它失败了

imp usr1/user1@tes file=/myfoler/export/parties.dmp buffer=131072 commit=y log=/myfoler/export/parties_imp.log feedback=1000 ignore=Y tables=export_test

这样做时我遇到了错误

IMP-00033:警告:导出文件中找不到表“EXPORT_TEST”

有人可以帮助我了解我哪里出错了吗?我想将转储导入到已经创建的新表中。

【问题讨论】:

    标签: oracle shell impdp


    【解决方案1】:

    您需要使用REMAP_TABLE 选项

    REMAP_TABLE=[schema.]old_tablename[.partition]:new_tablename
    

    【讨论】:

    • 我相信,如果您使用 impdp,只要新的表名不存在,您就可以使用相同的模式。 REMAP_TABLE 选项在使用 imp 时不可用,我认为您需要导入新的临时模式,然后使用新表名在原始模式中执行 CTAS
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-05-25
    • 1970-01-01
    • 2012-06-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-05-08
    相关资源
    最近更新 更多