When I use expdp to export a schema, it throws ORA-39125:
-
-
> expdp system/system123 directory=DUMP_DIR dumpfile=hsfa.dump schemas=HSFA content=metadata_only
-
Export: Release 10.2.0.5.0 - 64bit Production on Thursday, 20 February, 2014 7:55:03
-
Copyright (c) 2003, 2007, Oracle. All rights reserved.
-
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
-
With the Partitioning, OLAP, Data Mining and Real Application Testing options
-
Starting "SYSTEM"."SYS_EXPORT_SCHEMA_16": system/******** directory=DUMP_DIR dumpfile=hsfa.dump schemas=HSFA content=metadata_only
-
Processing object type SCHEMA_EXPORT/USER
-
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/TABLESPACE_QUOTA
-
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
-
Processing object type SCHEMA_EXPORT/SYNONYM/SYNONYM
-
Processing object type SCHEMA_EXPORT/TYPE/TYPE_SPEC
-
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
-
Processing object type SCHEMA_EXPORT/TABLE/TABLE
-
Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
-
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
-
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
-
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
-
Processing object type SCHEMA_EXPORT/TABLE/COMMENT
-
Processing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_SPEC
-
Processing object type SCHEMA_EXPORT/FUNCTION/FUNCTION
-
Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE
-
Processing object type SCHEMA_EXPORT/PACKAGE/COMPILE_PACKAGE/PACKAGE_SPEC/ALTER_PACKAGE_SPEC
-
Processing object type SCHEMA_EXPORT/FUNCTION/ALTER_FUNCTION
-
Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
-
Processing object type SCHEMA_EXPORT/VIEW/VIEW
-
Processing object type SCHEMA_EXPORT/VIEW/GRANT/OWNER_GRANT/OBJECT_GRANT
-
Processing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_BODY
-
ORA-39125: Worker unexpected fatal error in KUPW$WORKER.UNLOAD_METADATA while calling DBMS_METADATA.FETCH_XML_CLOB [PACKAGE_BODY:"HSFA"."PKG_BDQS"]
-
ORA-22923: amount of data specified in streaming LOB write is 0
-
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
-
ORA-06512: at "SYS.KUPW$WORKER", line 6377
-
----- PL/SQL Call Stack -----
-
object line object
-
handle number name
-
0xdb33ab28 15370 package body SYS.KUPW$WORKER
-
0xdb33ab28 6436 package body SYS.KUPW$WORKER
-
0xdb33ab28 2454 package body SYS.KUPW$WORKER
-
0xdb33ab28 7036 package body SYS.KUPW$WORKER
-
0xdb33ab28 1340 package body SYS.KUPW$WORKER
-
0xc96a21a0 2 anonymous block
-
Job "SYSTEM"."SYS_EXPORT_SCHEMA_16" stopped due to fatal error at 07:55:30
But when I use exclude=PACKAGE, the expdp works fine:
-
-
> expdp system/system123 directory=DUMP_DIR dumpfile=hsfa.dump schemas=HSFA content=metadata_only exclude=PACKAGE
-
Export: Release 10.2.0.5.0 - 64bit Production on Thursday, 20 February, 2014 7:56:36
-
Copyright (c) 2003, 2007, Oracle. All rights reserved.
-
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
-
With the Partitioning, OLAP, Data Mining and Real Application Testing options
-
Starting "SYSTEM"."SYS_EXPORT_SCHEMA_17": system/******** directory=DUMP_DIR dumpfile=hsfa.dump schemas=HSFA content=metadata_only exclude=PACKAGE
-
Processing object type SCHEMA_EXPORT/USER
-
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/TABLESPACE_QUOTA
-
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
-
Processing object type SCHEMA_EXPORT/SYNONYM/SYNONYM
-
Processing object type SCHEMA_EXPORT/TYPE/TYPE_SPEC
-
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
-
Processing object type SCHEMA_EXPORT/TABLE/TABLE
-
Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
-
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
-
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
-
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
-
Processing object type SCHEMA_EXPORT/TABLE/COMMENT
-
Processing object type SCHEMA_EXPORT/FUNCTION/FUNCTION
-
Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE
-
Processing object type SCHEMA_EXPORT/FUNCTION/ALTER_FUNCTION
-
Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
-
Processing object type SCHEMA_EXPORT/VIEW/VIEW
-
Processing object type SCHEMA_EXPORT/VIEW/GRANT/OWNER_GRANT/OBJECT_GRANT
-
Processing object type SCHEMA_EXPORT/TYPE/TYPE_BODY
-
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
-
Master table "SYSTEM"."SYS_EXPORT_SCHEMA_17" successfully loaded/unloaded
-
******************************************************************************
-
Dump file set for SYSTEM.SYS_EXPORT_SCHEMA_17 is:
-
/NFS/hsfa.dump
-
Job "SYSTEM"."SYS_EXPORT_SCHEMA_17" successfully completed at 07:57:12
So it seems there is something wrong on PACKAGEs while exporting. so i try some effort on PACKAGEs. I find that there are 39PACKAGEs under the schema and there are two types of PACKAGEs: one is wrapped, the other is unwrapped. And after tried many times, I find that if exclude the PACKAGE:PKG_GZB, the expdp works fine:
-
-
> cat > hsfa.meta.par
-
directory=DUMP_DIR
-
dumpfile=hsfa.meta.dump
-
schemas=HSFA
-
content=METADATA_ONLY
-
exclude=PACKAGE:" IN ('PKG_GZB')"
-
> expdp system/system123 parfile=hsfa.meta.par
-
Export: Release 10.2.0.5.0 - 64bit Production on Thursday, 20 February, 2014 8:27:10
-
Copyright (c) 2003, 2007, Oracle. All rights reserved.
-
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
-
With the Partitioning, OLAP, Data Mining and Real Application Testing options
-
Starting "SYSTEM"."SYS_EXPORT_SCHEMA_22": system/******** parfile=hsfa.meta.par
-
Processing object type SCHEMA_EXPORT/USER
-
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/TABLESPACE_QUOTA
-
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
-
Processing object type SCHEMA_EXPORT/SYNONYM/SYNONYM
-
Processing object type SCHEMA_EXPORT/TYPE/TYPE_SPEC
-
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
-
Processing object type SCHEMA_EXPORT/TABLE/TABLE
-
Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
-
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
-
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
-
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
-
Processing object type SCHEMA_EXPORT/TABLE/COMMENT
-
Processing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_SPEC
-
Processing object type SCHEMA_EXPORT/FUNCTION/FUNCTION
-
Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE
-
Processing object type SCHEMA_EXPORT/PACKAGE/COMPILE_PACKAGE/PACKAGE_SPEC/ALTER_PACKAGE_SPEC
-
Processing object type SCHEMA_EXPORT/FUNCTION/ALTER_FUNCTION
-
Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
-
Processing object type SCHEMA_EXPORT/VIEW/VIEW
-
Processing object type SCHEMA_EXPORT/VIEW/GRANT/OWNER_GRANT/OBJECT_GRANT
-
Processing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_BODY
-
Processing object type SCHEMA_EXPORT/TYPE/TYPE_BODY
-
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
-
Master table "SYSTEM"."SYS_EXPORT_SCHEMA_22" successfully loaded/unloaded
-
******************************************************************************
-
Dump file set for SYSTEM.SYS_EXPORT_SCHEMA_22 is:
-
/NFS/hsfa.meta.dump
-
Job "SYSTEM"."SYS_EXPORT_SCHEMA_22" successfully completed at 08:27:45
The PKG_GZB is a wrapped package:
-
-
CREATE OR REPLACE package HSFA.PKG_GZB wrapped
-
0
-
abcd
-
abcd
-
abcd
-
abcd
-
abcd
-
abcd
-
abcd
-
abcd
-
abcd
-
abcd
-
abcd
-
abcd
-
abcd
-
abcd
-
abcd
-
3
-
9
-
9200000
-
1
-
4
-
0
-
23
-
2 :e:
-
1PACKAGE:
-
1PKG_GZB:
-
1PKGSP_RPT_XTGZB:
-
1ZTBH:
-
1NUMBER:
-
1RQ:
-
1DATE:
-
1AAUDIT:
-
1A_VC_CHECKER:
-
1VARCHAR2:
-
1RETURN_CODE:
-
1OUT:
-
1RETURN_STR:
-
1RS1:
-
1PKG_RETDS:
-
1DS:
-
1RS2:
-
1RS3:
-
1RS4:
-
1PKGSP_RPT_BXGZB:
-
1PKGSP_RPT_YHLCGZB:
-
1PKGSP_RPT_JJGZB:
-
1PKGSP_RPT_HBGZB:
-
1PKGSP_RPT_JJMRSJTJ:
-
1A_L_ZTBH:
-
1A_D_YWRQ:
-
1PKGSP_RPT_TJZTGZB:
-
1PKGSP_RPT_GLZTGZB:
-
...
And if try to export that package lonely, it throws the error:
-
-
> cat > hsfa.PKG_GZB.par
-
directory=DUMP_DIR
-
dumpfile=hsfa.PKG_GZB.dump
-
schemas=HSFA
-
include=PACKAGE:" IN ('PKG_GZB')"
-
> expdp system/system123 parfile=hsfa.PKG_GZB.par
-
Export: Release 10.2.0.5.0 - 64bit Production on Thursday, 20 February, 2014 8:36:55
-
Copyright (c) 2003, 2007, Oracle. All rights reserved.
-
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
-
With the Partitioning, OLAP, Data Mining and Real Application Testing options
-
Starting "SYSTEM"."SYS_EXPORT_SCHEMA_22": system/******** parfile=hsfa.PKG_GZB.par
-
Estimate in progress using BLOCKS method...
-
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
-
Total estimation using BLOCKS method: 0 KB
-
Processing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_SPEC
-
Processing object type SCHEMA_EXPORT/PACKAGE/COMPILE_PACKAGE/PACKAGE_SPEC/ALTER_PACKAGE_SPEC
-
ORA-39125: Worker unexpected fatal error in KUPW$WORKER.UNLOAD_METADATA while calling DBMS_METADATA.FETCH_XML_CLOB [ALTER_PACKAGE_SPEC:"HSFA"."PKG_GZB"]
-
ORA-22923: amount of data specified in streaming LOB write is 0
-
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
-
ORA-06512: at "SYS.KUPW$WORKER", line 6377
-
----- PL/SQL Call Stack -----
-
object line object
-
handle number name
-
0xdb33ab28 15370 package body SYS.KUPW$WORKER
-
0xdb33ab28 6436 package body SYS.KUPW$WORKER
-
0xdb33ab28 2454 package body SYS.KUPW$WORKER
-
0xdb33ab28 7036 package body SYS.KUPW$WORKER
-
0xdb33ab28 1340 package body SYS.KUPW$WORKER
-
0xc9476228 2 anonymous block
-
Job "SYSTEM"."SYS_EXPORT_SCHEMA_22" stopped due to fatal error at 08:36:57
the package is valid, the database version is 10.2.0.5.6, and all of the database components are valid
-
-
> ./opatch lsinventory
-
Invoking OPatch 10.2.0.5.1
-
Oracle Interim Patch Installer version 10.2.0.5.1
-
Copyright (c) 2010, Oracle Corporation. All rights reserved.
-
Oracle Home : /u01/app/oracle/product/10.2.0/db_1
-
Central Inventory : /u01/app/oracle/oraInventory
-
from : /etc/oraInst.loc
-
OPatch version : 10.2.0.5.1
-
OUI version : 10.2.0.5.0
-
OUI location : /u01/app/oracle/product/10.2.0/db_1/oui
-
Log file location : /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch2014-02-20_07-47-45AM.log
-
Patch history file: /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch_history.txt
-
Lsinventory Output file location : /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2014-02-20_07-47-45AM.txt
-
--------------------------------------------------------------------------------
-
Installed Top-level Products (3):
-
Oracle Database 10g 10.2.0.1.0
-
Oracle Database 10g Release 2 Patch Set 2 10.2.0.3.0
-
Oracle Database 10g Release 2 Patch Set 4 10.2.0.5.0
-
There are 3 products installed in this Oracle Home.
-
Interim patches (1) :
-
Patch 13343471 : applied on Wed Feb 19 20:08:02 CST 2014
-
Unique Patch ID: 14282265
-
Created on 20 Dec 2011, 21:48:08 hrs PST8PDT
-
Bugs fixed:
-
6402302, 10269717, 10327190, 11693109, 8865718, 10017048, 9024850
-
8394351, 8546356, 8224558, 13489660, 9360157, 9770451, 9020537, 9772888
-
8650138, 8664189, 8488233, 10091698, 10092858, 12551710, 7519406
-
13349665, 10132870, 8771916, 9109487, 7509714, 9171933, 10173237
-
9532911, 10139235, 10159846, 10068982, 8350262, 11792865, 7119382
-
7361418, 10306945, 8666117, 11724962, 11725006, 6157713, 10214450
-
9184754, 8966823, 8544696, 9320130, 9767674, 9323583, 7026523, 9399589
-
8277300, 9672816, 13343467, 9726739, 9499302, 8412426, 10165083, 10208905
-
12419392, 6651220, 9150282, 9145204, 9659614, 9949948, 11076894, 10327179
-
8882576, 7612454, 7111619, 7450366, 9711859, 11893577, 9714832, 9735237
-
8970313, 6011045, 11814891, 10162036, 10248542, 9952230, 9469117, 13359623
-
9952270, 9842573, 13343471, 8660422, 10324526, 11066597, 12419258
-
9322219, 8636407, 9713537, 12828105, 10010310, 9390484, 9824435, 12925532
-
9963497, 9032322, 12862186, 12551700, 12862187, 12551701, 10249537
-
12551702, 12551703, 9586877, 8211733, 12551704, 10076669, 6694396
-
9548269, 12551705, 12551706, 9337325, 12551707, 8354642, 7602341, 12551708
-
9308296, 12827745, 9072105, 8528171, 10157402, 12565867, 11737047
-
--------------------------------------------------------------------------------
-
OPatch succeeded.
-
-
SQL> select owner, object_name, object_type, status from dba_objects where object_name='PKG_GZB' and owner='HSFA';
-
OWNER OBJECT_NAME OBJECT_TYPE STATUS
-
-------------------- -------------------- ------------------------------ -------
-
HSFA PKG_GZB PACKAGE VALID
-
HSFA PKG_GZB PACKAGE BODY VALID
-
SQL> select comp_name, version, status from dba_registry;
-
COMP_NAME VERSION STATUS
-
---------------------------------------- ------------ ------------
-
Oracle Enterprise Manager 10.2.0.5.0 VALID
-
Spatial 10.2.0.5.0 VALID
-
Oracle interMedia 10.2.0.5.0 VALID
-
OLAP Catalog 10.2.0.5.0 VALID
-
Oracle XML Database 10.2.0.5.0 VALID
-
Oracle Text 10.2.0.5.0 VALID
-
Oracle Expression Filter 10.2.0.5.0 VALID
-
Oracle Rule Manager 10.2.0.5.0 VALID
-
Oracle Workspace Manager 10.2.0.5.0 VALID
-
Oracle Data Mining 10.2.0.5.0 VALID
-
Oracle Database Catalog Views 10.2.0.5.0 VALID
-
Oracle Database Packages and Types 10.2.0.5.0 VALID
-
JServer JAVA Virtual Machine 10.2.0.5.0 VALID
-
Oracle XDK 10.2.0.5.0 VALID
-
Oracle Database Java Packages 10.2.0.5.0 VALID
-
OLAP Analytic Workspace 10.2.0.5.0 VALID
-
Oracle OLAP API 10.2.0.5.0 VALID
-
17 rows selected.
so what's problem of the package? I didn't find out the reason yet...
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/13885898/viewspace-1651384/
,如需转载,请注明出处,否则将追究法律责任。