【EXPDP】使用EXPDP備份資料時ORA-39125、ORA-04031錯誤原因分析與排查
如果資料庫伺服器的shared pool過小或碎片過多會導致EXPDP工具無法完成備份,通常伴隨如下錯誤資訊:
ORA-39125: Worker unexpected fatal error in KUPW$WORKER.UNLOAD_METADATA while calling DBMS_METADATA.FETCH_XML_CLOB [TABLE:"SEC"."T3"]
ORA-04031: unable to allocate 56 bytes of shared memory ("shared pool","SELECT /*+rule*/ SYS_XMLGEN(...","sql area","idndef*[]: qkexrPackName")
模擬再現一下這個問題,並給出處理方法,供參考。
1.問題再現
1)確認作業系統資訊
ora10g@secDB /expdp$ uname -a
Linux secDB 2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38 EST 2008 x86_64 x86_64 x86_64 GNU/Linux
2)確認資料庫版本
sys@ora10g> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi
PL/SQL Release 10.2.0.3.0 - Production
CORE 10.2.0.3.0 Production
TNS for Linux: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production
3)使用EXPDP工具備份sec使用者資料
ora10g@secDB /expdp$ rm -f sec.dmp sec.log
ora10g@secDB /expdp$ expdp sec/sec directory=dump_dir dumpfile=sec.dmp logfile=sec.log
Export: Release 10.2.0.3.0 - 64bit Production on Monday, 08 March, 2010 9:45:57
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine options
Starting "SEC"."SYS_EXPORT_SCHEMA_02": sec/******** directory=dump_dir dumpfile=sec.dmp logfile=sec.log
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 448 KB
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/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
ORA-39125: Worker unexpected fatal error in KUPW$WORKER.UNLOAD_METADATA while calling DBMS_METADATA.FETCH_XML_CLOB [TABLE:"SEC"."T3"]
ORA-04031: unable to allocate 56 bytes of shared memory ("shared pool","SELECT /*+rule*/ SYS_XMLGEN(...","sql area","idndef*[]: qkexrPackName")
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
ORA-06512: at "SYS.KUPW$WORKER", line 6234
----- PL/SQL Call Stack -----
object line object
handle number name
0x664d6bc8 14916 package body SYS.KUPW$WORKER
0x664d6bc8 6293 package body SYS.KUPW$WORKER
0x664d6bc8 2339 package body SYS.KUPW$WORKER
0x664d6bc8 6854 package body SYS.KUPW$WORKER
0x664d6bc8 1259 package body SYS.KUPW$WORKER
0x6661f1a8 2 anonymous block
Job "SEC"."SYS_EXPORT_SCHEMA_02" stopped due to fatal error at 09:46:04
2.問題原因
參考MOS的OERR: ORA 4031 "unable to allocate %s bytes of shared memory ("%s","%s","%s")" [ID 19837.1]
Error: ORA 4031
Text: unable to allocate %s bytes of shared memory (%s,%s,%s)
-------------------------------------------------------------------------------
Cause: More shared memory is needed than was allocated in the shared
pool.
Action: Either use the dbms_shared_pool package to pin large packages,
reduce your use of shared memory, or increase the amount of
available shared memory by increasing the value of the
init.ora parameter "shared_pool_size".
原因是:shared pool過小或因為碎片太多導致沒有大段的內容可用
處理方法:增加shared pool。
3.問題處理
1)調整一下SGA的配置
sys@ora10g> alter system set sga_max_size=300m scope=spfile;
System altered.
sys@ora10g> alter system set sga_target=300m scope=spfile;
System altered.
2)重啟資料庫
sys@ora10g> startup force;
ORACLE instance started.
Total System Global Area 314572800 bytes
Fixed Size 2072448 bytes
Variable Size 113246336 bytes
Database Buffers 192937984 bytes
Redo Buffers 6316032 bytes
Database mounted.
Database opened.
3)再次完成備份,成功。
ora10g@secDB /expdp$ rm -f sec*
ora10g@secDB /expdp$ expdp sec/sec directory=dump_dir dumpfile=sec.dmp logfile=sec.log
Export: Release 10.2.0.3.0 - 64bit Production on Monday, 08 March, 2010 9:56:14
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine options
Starting "SEC"."SYS_EXPORT_SCHEMA_03": sec/******** directory=dump_dir dumpfile=sec.dmp logfile=sec.log
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 704 KB
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/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
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
. . exported "SEC"."SYS_EXPORT_SCHEMA_01" 117.4 KB 1055 rows
. . exported "SEC"."SYS_EXPORT_SCHEMA_02" 113.9 KB 1055 rows
. . exported "SEC"."T1" 4.914 KB 1 rows
. . exported "SEC"."T2" 4.914 KB 1 rows
. . exported "SEC"."T3" 4.914 KB 1 rows
Master table "SEC"."SYS_EXPORT_SCHEMA_03" successfully loaded/unloaded
******************************************************************************
Dump file set for SEC.SYS_EXPORT_SCHEMA_03 is:
/expdp/sec.dmp
Job "SEC"."SYS_EXPORT_SCHEMA_03" successfully completed at 09:56:23
4.小結
ORA-04031錯誤多數是由shared pool過小或碎片太多引起的。
處理方法有兩種:第一種就是適當的增大shared pool的大小,另外一種方法就是清理shared pool的碎片。
Good luck.
secooler
10.03.09
-- The End --
ORA-39125: Worker unexpected fatal error in KUPW$WORKER.UNLOAD_METADATA while calling DBMS_METADATA.FETCH_XML_CLOB [TABLE:"SEC"."T3"]
ORA-04031: unable to allocate 56 bytes of shared memory ("shared pool","SELECT /*+rule*/ SYS_XMLGEN(...","sql area","idndef*[]: qkexrPackName")
模擬再現一下這個問題,並給出處理方法,供參考。
1.問題再現
1)確認作業系統資訊
ora10g@secDB /expdp$ uname -a
Linux secDB 2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38 EST 2008 x86_64 x86_64 x86_64 GNU/Linux
2)確認資料庫版本
sys@ora10g> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi
PL/SQL Release 10.2.0.3.0 - Production
CORE 10.2.0.3.0 Production
TNS for Linux: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production
3)使用EXPDP工具備份sec使用者資料
ora10g@secDB /expdp$ rm -f sec.dmp sec.log
ora10g@secDB /expdp$ expdp sec/sec directory=dump_dir dumpfile=sec.dmp logfile=sec.log
Export: Release 10.2.0.3.0 - 64bit Production on Monday, 08 March, 2010 9:45:57
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine options
Starting "SEC"."SYS_EXPORT_SCHEMA_02": sec/******** directory=dump_dir dumpfile=sec.dmp logfile=sec.log
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 448 KB
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/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
ORA-39125: Worker unexpected fatal error in KUPW$WORKER.UNLOAD_METADATA while calling DBMS_METADATA.FETCH_XML_CLOB [TABLE:"SEC"."T3"]
ORA-04031: unable to allocate 56 bytes of shared memory ("shared pool","SELECT /*+rule*/ SYS_XMLGEN(...","sql area","idndef*[]: qkexrPackName")
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
ORA-06512: at "SYS.KUPW$WORKER", line 6234
----- PL/SQL Call Stack -----
object line object
handle number name
0x664d6bc8 14916 package body SYS.KUPW$WORKER
0x664d6bc8 6293 package body SYS.KUPW$WORKER
0x664d6bc8 2339 package body SYS.KUPW$WORKER
0x664d6bc8 6854 package body SYS.KUPW$WORKER
0x664d6bc8 1259 package body SYS.KUPW$WORKER
0x6661f1a8 2 anonymous block
Job "SEC"."SYS_EXPORT_SCHEMA_02" stopped due to fatal error at 09:46:04
2.問題原因
參考MOS的OERR: ORA 4031 "unable to allocate %s bytes of shared memory ("%s","%s","%s")" [ID 19837.1]
Error: ORA 4031
Text: unable to allocate %s bytes of shared memory (%s,%s,%s)
-------------------------------------------------------------------------------
Cause: More shared memory is needed than was allocated in the shared
pool.
Action: Either use the dbms_shared_pool package to pin large packages,
reduce your use of shared memory, or increase the amount of
available shared memory by increasing the value of the
init.ora parameter "shared_pool_size".
原因是:shared pool過小或因為碎片太多導致沒有大段的內容可用
處理方法:增加shared pool。
3.問題處理
1)調整一下SGA的配置
sys@ora10g> alter system set sga_max_size=300m scope=spfile;
System altered.
sys@ora10g> alter system set sga_target=300m scope=spfile;
System altered.
2)重啟資料庫
sys@ora10g> startup force;
ORACLE instance started.
Total System Global Area 314572800 bytes
Fixed Size 2072448 bytes
Variable Size 113246336 bytes
Database Buffers 192937984 bytes
Redo Buffers 6316032 bytes
Database mounted.
Database opened.
3)再次完成備份,成功。
ora10g@secDB /expdp$ rm -f sec*
ora10g@secDB /expdp$ expdp sec/sec directory=dump_dir dumpfile=sec.dmp logfile=sec.log
Export: Release 10.2.0.3.0 - 64bit Production on Monday, 08 March, 2010 9:56:14
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine options
Starting "SEC"."SYS_EXPORT_SCHEMA_03": sec/******** directory=dump_dir dumpfile=sec.dmp logfile=sec.log
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 704 KB
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/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
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
. . exported "SEC"."SYS_EXPORT_SCHEMA_01" 117.4 KB 1055 rows
. . exported "SEC"."SYS_EXPORT_SCHEMA_02" 113.9 KB 1055 rows
. . exported "SEC"."T1" 4.914 KB 1 rows
. . exported "SEC"."T2" 4.914 KB 1 rows
. . exported "SEC"."T3" 4.914 KB 1 rows
Master table "SEC"."SYS_EXPORT_SCHEMA_03" successfully loaded/unloaded
******************************************************************************
Dump file set for SEC.SYS_EXPORT_SCHEMA_03 is:
/expdp/sec.dmp
Job "SEC"."SYS_EXPORT_SCHEMA_03" successfully completed at 09:56:23
4.小結
ORA-04031錯誤多數是由shared pool過小或碎片太多引起的。
處理方法有兩種:第一種就是適當的增大shared pool的大小,另外一種方法就是清理shared pool的碎片。
Good luck.
secooler
10.03.09
-- The End --
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/519536/viewspace-629040/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【EXPDP】使用EXPDP備份資料時預估大小——ESTIMATE引數
- 【EXPDP】不使用DIRECTORY引數完成expdp資料備份
- 【EXPDP】使用expdp的QUERY引數限定備份資料的範圍
- oracle資料泵備份(Expdp命令)Oracle
- expdp with error: ORA-39125Error
- 【expdp】資料泵備份遭遇ORA-00600: internal error code, arguments: [17020]錯誤Error
- 使用crontab和expdp實現資料庫定期邏輯備份資料庫
- Oracle資料庫的邏輯備份工具-expdp資料泵Oracle資料庫
- windowns系統,oracle資料庫expdp自動備份Oracle資料庫
- Oracle 邏輯備份 expdp/impdpOracle
- expdp 邏輯備份指令碼指令碼
- EXPDP Fails With ORA-04031 ("streams pool", ...)AI
- 今天早上檢查資料庫的備份日誌,發現其中一個資料庫的expdp錯誤:資料庫
- 揭祕ORACLE備份之--邏輯備份(EXPDP)Oracle
- expdp備份+FTP自動上傳FTP
- Oracle expdp/impdp匯出匯入命令及資料庫備份Oracle資料庫
- 監控資料備份恢復完成進度(EXPDP/IMPDP/RMAN)
- Oracle expdp/impdp匯入匯出備份資料庫指令碼Oracle資料庫指令碼
- 【Toad】使用Toad呼叫expdp資料泵備份資料步驟及注意事項
- EXPDP資料泵使用方法
- Oracle 邏輯備份之EXPDP精講Oracle
- Linux 平臺下 Oracle 資料泵備份(expdp) SHELL 指令碼LinuxOracle指令碼
- [EXPDP]使用11g的資料泵實現對邏輯備份資料進行加密加密
- 【EXPDP】使用11g的資料泵實現對邏輯備份資料進行加密加密
- 使用expdp匯出資料,報ORA-01691表空間不足錯誤
- expdp 使用QUERY 匯出部分資料。
- 使用expdp、impdp遷移資料庫資料庫
- ORA-04031錯誤分析
- Expdp 備份到ASM之 ORA-39070ASM
- Linux或UNIX系統下oracle資料庫expdp自動備份LinuxOracle資料庫
- 使用資料泵工具expdp工具匯出資料
- 記一次 oracle expdp 匯出錯誤Oracle
- expdp impdp Data Pump(資料泵)使用解析
- EXPDP 和 IMPDP 資料泵的使用_1
- EXPDP 和 IMPDP 資料泵的使用_2
- 資料泵 EXPDP 匯出工具的使用
- Oracle 效能優化-expdp備份速度優化02Oracle優化
- Oracle 效能優化-expdp備份速度優化03Oracle優化