IMPDP時出現ORA-39083:Object type PROCACT_SCHEMA failed to create with error

在使用IMPDP對數據庫按照Schema進行導入數據時,出現了奇怪的錯誤,數據庫版本11.2.0.3.0。

IMPDP導入命令如下。

impdp system/tplink directory=dump_dir dumpfile=tpqms.dmp remap_schema=tpqms:tpqms remap_tablespace=TPQMS_DATA:TPQMS_DATA table_exists_action=replace  transform=segment_attributes:n

錯誤提示如下。

ORA-39083: Object type PROCACT_SCHEMA failed to create with error:
ORA-31625: Schema TPQMS is needed to import this object, but is unaccessible
ORA-01031: insufficient privileges
Failing sql is:
BEGIN 
sys.dbms_logrep_imp.instantiate_schema(schema_name=>SYS_CONTEXT('USERENV','CURRENT_SCHEMA'), export_db_name=>'IQCPROD', inst_scn=>'108444820');COMMIT; END; 
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
......
ORA-39083: Object type INDEX failed to create with error:
ORA-31625: Schema TPQMS is needed to import this object, but is unaccessible
ORA-01031: insufficient privileges
Failing sql is:
CREATE INDEX "TPQMS"."REPORT_TPL_ITEM_HID" ON "TPQMS"."REPORT_TPL_ITEM" ("TPL_ID") 
......

根據提示,我對system和tpqms賬戶賦予了權限。

SQL> grant create user to system;
SQL> grant create any index to system;

SQL> grant create user to tpqms;
SQL> grant create any index to tpqms;

然而還是有上述的異常。

於是搜索了一些解決方法,提示是用戶缺少IMP_FULL_DATABASE權限,於是我將該權限賦予給system和tpqms用戶。

SQL> grant IMP_FULL_DATABASE to system;
SQL> grant IMP_FULL_DATABASE to tpqms;

仍有如上異常。

最後在Oracle Support上找到了一篇類似的解決方法,針對數據庫12C版本的解決方法,試用一下該方法,問題解決。

在導入時賦予become user權限給system用戶,導入結束後回收該權限即可

SQL> grant become user to system;

SQL> revoke become user from system;

最後,IMPDP導入正常。

Master table "SYSTEM"."SYS_IMPORT_FULL_07" successfully loaded/unloaded
Starting "SYSTEM"."SYS_IMPORT_FULL_07":  system/******** directory=dump_dir dumpfile=tpqms.dmp remap_schema=tpqms:tpqms remap_tablespace=TPQMS_DATA:TPQMS_DATA table_exists_action=replace transform=segment_attributes:n 
Processing object type SCHEMA_EXPORT/USER
ORA-31684: Object type USER:"TPQMS" already exists
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA

 

 

 

 

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章