I APPLIES TO: Oracle Database - Enterprise Edition - Version 10.2.0.1 and later Oracle Database Cloud Schema Service - Version N/A and later Oracle Database Exadata Cloud Machine - Version N/A and later Oracle Cloud Infrastructure - Database Service - Version N/A and later Oracle Database Cloud Exadata Service - Version N/A and later Information in this document applies to any platform. ***Checked for relevance on 15-Apr-2013***
NOTE: In the images and/or the document content below, the user information and data used represents fictitious data .Any similarity to actual persons, living or dead, is purely coincidental and not intended in any manner. SYMPTOMS You try to export a schema from database using DataPump export utility. This ends with errors: #> expdp system/<password> directory=dpu dumpfile=test.dmp schemas=test Export: Release 10.2.0.4.0 - 64bit Production on Friday, 15 May, 2009 8:49:29
Copyright (c) 2003, 2007, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bitProduction With the Partitioning, Data Mining and Real Application Testing options FLASHBACK automatically enabled to preserve database integrity. Starting "SYSTEM"."SYS_EXPORT_SCHEMA_01": system/******** directory=dpu dumpfile=test.dmp schemas=test Estimate in progress using BLOCKS method... Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA ORA-39125: Worker unexpected fatal error in KUPW$WORKER.GET_TABLE_DATA_OBJECTS while calling DBMS_METADATA.FETCH_XML_CLOB [] ORA-31642: the following SQL statement fails: BEGIN "SYS"."DBMS_CDC_EXPDP".SCHEMA_CALLOUT(:1,0,1,'10.02.00.04.00'); END; ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86 ORA-06512: at "SYS.DBMS_METADATA", line 907 ORA-06550: line 1, column 7: PLS-00201: identifier 'SYS.DBMS_CDC_EXPDP' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95 ORA-06512: at "SYS.KUPW$WORKER", line 6307
----- PL/SQL Call Stack ----- object line object handle number name 0x7e8998d8 15032 package body SYS.KUPW$WORKER 0x7e8998d8 6372 package body SYS.KUPW$WORKER 0x7e8998d8 9206 package body SYS.KUPW$WORKER 0x7e8998d8 1936 package body SYS.KUPW$WORKER 0x7e8998d8 6944 package body SYS.KUPW$WORKER 0x7e8998d8 1314 package body SYS.KUPW$WORKER 0x76337f10 2 anonymous block
Job "SYSTEM"."SYS_EXPORT_SCHEMA_01" stopped due to fatal error at 08:50:02 CHANGES NONE CAUSE These errors are raised, when either the EXECUTE privilege on package SYS.DBMS_CDC_EXPDP was revoked, or, when the package package SYS.DBMS_CDC_EXPDP was accidentally dropped from data dictionary. Verify this with: connect / as sysdba
select grantee, privilege from dba_tab_privs where table_name = 'DBMS_CDC_EXPDP';
select owner, object_name, object_type from dba_objects where object_name = 'DBMS_CDC_EXPDP'; The found objects should be these: SQL> select grantee, privilege from dba_tab_privs where table_name = 'DBMS_CDC_EXPDP';
GRANTEE PRIVILEGE --------------- ------------ PUBLIC EXECUTE
SQL> select owner, object_name, object_type from dba_objects where object_name = 'DBMS_CDC_EXPDP';
OWNER OBJECT_NAME OBJECT_TYPE -------------------- -------------------- ------------------- SYS DBMS_CDC_EXPDP PACKAGE SYS DBMS_CDC_EXPDP PACKAGE BODY PUBLIC DBMS_CDC_EXPDP SYNONYM The package SYS.DBMS_CDC_EXPDP is registered in data dictionary table EXPPKGACT$, which is automatically called during expdp process. Because the package SYS.DBMS_CDC_EXPDP doesn't exist or the user doesn't have the privilege to run the package, the error PLS-201 is raised. SOLUTION To correct this, follow the next steps:
1. If only the EXECUTE privilege is missing, then perform via SQL*Plus: connect / as sysdba grant execute on dbms_cdc_expdp to public; => Then restart expdp.
2. If the package DBMS_CDC_EXPDP is missing, then you have 2 possibilities: A. De-register the package DBMS_CDC_EXPDP from table EXPPKGACT$ (so it's not called during expdp)
or:
B. Re-create the package DBMS_CDC_EXPDP so that expdp will find it.
If you want to follow the way A, then perform in SQL*Plus: connect / as sysdba
-- save the actual entries from exppkgact$ create table exppkgact$_bck as select * from exppkgact$;
-- delete the entries related to package DBMS_CDC_EXPDP delete from exppkgact$ where package = 'DBMS_CDC_EXPDP'; commit; => Then restart expdp
If you decide for way B, then perform in SQL*Plus: -- first change the OS local directory to: #> cd $ORACLE_HOME/rdbms/admin
connect / as sysdba
-- create the missing package @prvtcdpe.plb => Then restart expdp. |