[Solved] ORA-04063: package body “SYS.DBMS_DATAPUMP“ has errors

Due to the manual modification of the default parameter value of cluster_ok in start_job of sys.DBMS_DATAPUMP, 1 is 0, which leads to export error after successful compilation.
ORA-04063: package body “SYS.DBMS_DATAPUMP” has errors
SQL> CREATE TABLE “test”
2  (       ”   ” VARCHAR2(255), “YPID” VARCHAR2(255));
Table created.
SQL> insert into “test”  values(‘aa’,’bb’);
1 row created.
SQL> commit;
Commit complete.
SQL> select * from test;

——————————————————————————–
YPID
——————————————————————————–
aa
bb

SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production
Version 19.3.0.0.0

[[email protected] ~]$ expdp jyc/[email protected] dumpfile=t.dmp logfile=t.log directory=dmp tables=jyc.test
Export: Release 19.0.0.0.0 – Production on Tue Jun 29 16:54:57 2021
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.
Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production
UDE-04063: operation generated ORACLE error 4063
ORA-04063: package body “SYS.DBMS_DATAPUMP” has errors
ORA-06508: PL/SQL: could not find program unit being called: “SYS.DBMS_DATAPUMP”
ORA-06512: at line 1
[[email protected] ~]$ sqlplus jyc/[email protected]
SQL*Plus: Release 19.0.0.0.0 – Production on Tue Jun 29 16:57:00 2021
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle.  All rights reserved.
Last Successful login time: Tue Jun 29 2021 16:54:57 +08:00
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production
Version 19.3.0.0.0
SQL> select * from dba_errors where OWNER=’SYS’ and NAME=’DBMS_DATAPUMP’;
OWNER
——————————————————————————–
NAME
——————————————————————————–
TYPE                                     SEQUENCE       LINE   POSITION
————————————– ———- ———- ———-
TEXT
——————————————————————————–
ATTRIBUTE          MESSAGE_NUMBER
—————— ————–
SYS
DBMS_DATAPUMP
PACKAGE BODY                                    1       7294         17
OWNER
——————————————————————————–
NAME
——————————————————————————–
TYPE                                     SEQUENCE       LINE   POSITION
————————————– ———- ———- ———-
TEXT
——————————————————————————–
ATTRIBUTE          MESSAGE_NUMBER
—————— ————–
PLS-00593: default value of parameter “CLUSTER_OK” in body must match that of sp
ec
ERROR                         593
OWNER
——————————————————————————–
NAME
——————————————————————————–
TYPE                                     SEQUENCE       LINE   POSITION
————————————– ———- ———- ———-
TEXT
——————————————————————————–
ATTRIBUTE          MESSAGE_NUMBER
—————— ————–

SQL>
select * from dba_objects where status = ‘INVALID’
select owner, name, text, message_number from all_errors where owner=’SYS’;

Solution:
Execute rebuild dbms_datapump under cdb
cd $ORACLE_HOME/rdbms/admin
sqlplus/as sysdba
@dbmsdp.sql;
@utlrp.sql;
exit
Redirection is normal.
[[email protected] admin]$ expdp jyc/[email protected] dumpfile=t.dmp logfile=t.log directory=dmp tables=jyc.test
Export: Release 19.0.0.0.0 – Production on Thu Jul 1 10:29:24 2021
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.
Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production
FLASHBACK automatically enabled to preserve database integrity.
Starting “JYC”.”SYS_EXPORT_TABLE_01″:  jyc/********@jyc dumpfile=t.dmp logfile=t.log directory=dmp tables=jyc.test
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER
Processing object type TABLE_EXPORT/TABLE/PROCACT_INSTANCE
Processing object type TABLE_EXPORT/TABLE/TABLE
. . exported “JYC”.”TEST”                                    0 KB       0 rows
Master table “JYC”.”SYS_EXPORT_TABLE_01″ successfully loaded/unloaded
******************************************************************************
Dump file set for JYC.SYS_EXPORT_TABLE_01 is:
/home/oracle/dmp/t.dmp
Job “JYC”.”SYS_EXPORT_TABLE_01″ successfully completed at Thu Jul 1 10:29:32 2021 elapsed 0 00:00:08


Read More: