ITPub博客

首页 > 数据库 > Oracle > impdp报错ORA-31631、ORA-39122

impdp报错ORA-31631、ORA-39122

原创 Oracle 作者:Hoegh 时间:2015-10-10 14:44:59 0 删除 编辑
    今天使用impdp实施数据导入时遭遇ORA-31631、ORA-39122报错,如下所示:

点击(此处)折叠或打开

  1. C:\Documents and Settings\hoegh>impdp hoegh/hoegh directory=data_pump_directory
  2. dumpfile=hoegh.dmp remap_schema=hoeghfrom:hoegh remap_tablespace=hoeghfromtbs:hoeghtbs

  3. Import: Release 10.1.0.2.0 - Production on 星期六, 10 10月, 2015 9:49

  4. Copyright (c) 2003, Oracle. All rights reserved.

  5. Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Produc
  6. tion
  7. With the Partitioning, OLAP and Data Mining options
  8. ORA-31631: privileges are required
  9. ORA-39122: Unprivileged users may not perform REMAP_SCHEMA remappings.


  10. C:\Documents and Settings\hoegh>

    从报错提示信息来看,是权限不足造成的。通过查阅文档得知,当执行impdp操作指定remap_schema参数时,需要具备imp_full_database权限。接下来,我们给hoegh用户赋予imp_full_database权限。

点击(此处)折叠或打开

  1. SQL>
  2. SQL> grant imp_full_database to hoegh;

  3. Grant succeeded.

  4. SQL>

   授权成功后,再次执行impdp语句,成功。

点击(此处)折叠或打开

  1. C:\Documents and Settings\hoegh>
  2. C:\Documents and Settings\hoegh>impdp hoegh/hoegh directory=data_pump_directory
  3. dumpfile=hoegh.dmp remap_schema=hoeghfrom:hoegh remap_tablespace=hoeghfromtbs:hoeghtbs

  4. Import: Release 10.1.0.2.0 - Production on 星期六, 10 10月, 2015 9:54

  5. Copyright (c) 2003, Oracle. All rights reserved.

  6. Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Produc
  7. tion
  8. With the Partitioning, OLAP and Data Mining options
  9. Master table "HOEGH"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
  10. Starting "HOEGH"."SYS_IMPORT_FULL_01": HOEGH/******** directory=data_pump_directo
  11. ry dumpfile=hoegh.dmp remap_schema=hoeghfrom:hoegh remap_tablespace=hoeghfromtbs:hoeghtbs

  12. Processing object type TABLE_EXPORT/TABLE/TABLE
  13. Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
  14. Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
  15. Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
  16. Processing object type TABLE_EXPORT/TABLE/INDEX/FUNCTIONAL_AND_BITMAP/INDEX
  17. Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/FUNCTIONAL_AND_BITMAP
  18. /INDEX_STATISTICS
  19. Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
  20. Job "HOEGH"."SYS_IMPORT_FULL_01" successfully completed at 09:54

hoegh
15.10.10
-- The End --

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/30162081/viewspace-1813687/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2015-03-13

  • 博文量
    132
  • 访问量
    2058972