expdp全庫備份rac數據庫因錯誤終止


1、expdp導出日志報錯如下:

ORA-39014: One or more workers have prematurely exited.

ORA-39029: worker 2 with process name "DW01" prematurely terminated

ORA-31671: Worker process DW01 had an unhandled exception.

ORA-39079: unable to enqueue message DG,KUPC$C_2_20161117180443,KUPC$A_2_194724682440000,MCP,139564,Y

ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86

ORA-06512: at "SYS.KUPC$QUE_INT", line 969

ORA-23603: Streams enqueue aborted due to low SGA

ORA-06512: at "SYS.KUPW$WORKER", line 1887

ORA-06512: at line 2

Job "LTBAK"."SYS_EXPORT_FULL_01" stopped due to fatal error at Fri Nov 18 07:27:19 2016 elapsed 0 13:22:31

2、查看alert日志,發現錯誤如下:

Fri Nov 18 07:25:40 2016

DW00 terminating with fatal err=39079, pid=117, wid=1, job LTBAK.SYS_EXPORT_FULL_01

Fri Nov 18 07:26:16 2016

DW06 started with pid=56, OS id=13383, wid=3, job LTBAK.SYS_EXPORT_FULL_01

Fri Nov 18 07:27:00 2016

DW01 terminating with fatal err=39079, pid=52, wid=2, job LTBAK.SYS_EXPORT_FULL_01

3、查看ora-39097錯誤原因

[oracle@node2 ~]$ oerr ora 39079

39079, 00000, "unable to enqueue message %s"

// *Cause: The Data Pump's communication layer was unable to send the

// specified message on the control or status queue. Subsequent

// messages will detail the problem.

// *Action: Fix the problem if possible, or contact Oracle Customer Support.

以上是從數據庫上收集到的報錯信息,究竟是什么原因導致expdp對數據庫的全備份異常終止的呢?

以下內容來源於網絡:

SYMPTOMS

DataPump fails with errorstack similar to the following:

ORA-39014: One or more workers have prematurely exited.
ORA-39029: worker 1 with process name "DW01" prematurely terminated
ORA-31671: Worker process DW01 had an unhandled exception.
ORA-39079: unable to enqueue message DG,KUPC$C_1_20071030223003,KUPC$A_1_20071030223013,MCP,8473,Y
ORA-06512: at "SYS.KUPW$WORKER", line 1342
ORA-06512: at line 2
Job "SYS"."SYS_EXPORT_FULL_01" stopped due to fatal error at 00:44:51
ORA-39014: One or more workers have prematurely exited.
CAUSE

The important errors here are the ORA-39014 and ORA-39079. The DataPump utility uses Streams in the background and if the Streams memory pool is not large enough, it can result in this error stack.
Use a queries below to investigate memory usage and settings

col bytes format 999,999,999,999
select * from v$sgastat where pool='streams pool';select * from v$sgainfo;

If using auto-tuning in the SGA, you may find the memory manager is having difficulty moving memory to satisfy memory needs in the Streams Pool.

set lines 200
col component format a20
col initial_size format 999,999,999,999
col finish_size format 999,999,999,999
col target_size format 999,999,999,999
select to_char(end_time, 'dd-MON-yyyy hh24:mi:ss') end_time,
component, initial_size, target_size,
final_size, status
from v$sga_resize_ops
order by end_time;

Look for STATUS showing up as ERROR or DEFERRED.   This can mean that SGA_TARGET is too small to meet all SGA memory needs.   This can also indicate that minimum sizes (explicit settings) are not included in the spfile, so under stress the auto-tuner could get too aggressive moving memory inside the SGA.

SOLUTION

Increase the memory allocated in the streams_pool_size to resolve this issue.

If using auto-tuning a higher value for streams_pool_size will act a higher minimum value and keep the memory tuner from shrinking the Streams Pool too small for workload.

DataPump export on one certain RAC instance fails with errors:
ORA-39006: internal error
ORA-39065: unexpected master process exception in DISPATCH
ORA-39079: unable to enqueue message DG,KUPC$S_2_20090927001645,MCP, ,1,Y
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
ORA-06512: at "SYS.KUPC$QUE_INT", line 924
ORA-25306: Cannot connect to buffered queue's owner instance
The AQ_TM_PROCESSES instance parameter has been set to 0
Advanced Queueing is required by Datapump. As such the AQ_TM_PROCESSES parameter must have a value > 0 for EXPDP to succeed.

1:解決ORA-39095報錯,出現該報錯的原因一般分為兩種情況。

第一種情況是因為在expdp的時候給才轉儲空間太小,數據無法寫入轉儲文件內,所以報錯,這種報錯很好解決,只需要進入交互模式下,可以用add_file來增加轉儲文件,然后restart該job即可。

第二種情況則是因為設置參數parallel大於轉儲文件數目引起的,官方文檔的解釋是parallel io server processes寫文件不能同時寫一個,如果只有一個dumpfile(或少於parallel)就會影響性能。不但如此,當一個io server process在等待從而不能寫dumpfile的時候就會報ORA-39095

解決該問題一共兩種辦法

1:進入到交互模式,減少parallel的數量,使其等於dmp文件的數量或增加dmp文件,使其與parallel數量相等。

2:在寫導出語句的時候指定dumpfile中使用變量 %u(大小寫均可),讓其自由分配轉儲文件即可。

2:解決ORA-39097報錯

該報錯我並沒有查找到根本的原因,去metalink上看到有解決辦法,則是加大streams_pool_size即可,導出恢復正常 alter system set streams_pool_size = 48M;

EXPDP/IMPDP進行Oracle數據遷移從高版本(11g)到底版本(10g)步驟 Oralce數據導入

可能產生的錯誤

ORA-39095: Dump file space has been exhausted: Unable to allocate 8192 bytes
Job "SYSTEM"."SYS_EXPORT_SCHEMA_01" stopped due to fatal error at 13:34:40

expdp時parallel不當也會引起ORA-39095
2008-09-24 15:01

在expdp做導出的時候會有碰到ora-39095的錯誤,引起這個錯誤的原因有兩種。一一說來
先看官方的解釋:
ORA-39095: Dump file space has been exhausted: Unable to allocate string bytes
Cause: The Export job ran out of dump file space before the job was completed.
Action: Reattach to the job and add additional dump files to the job restarting the job.
從字面意思就解釋了第一種原因,那就是:空間不夠了。解決方法也簡單,多來點空間。
還有第二中原因:當使用了PARALLEL但是dumpfile卻只有一個或小於parallel數,下面是官方的說明:

Oracle? Database Utilities
10g Release 2 (10.2)
2 Data Pump Export
PARALLEL=integer
The value you specify for integer should be less than, or equal to, the number of files in the dump file set (or you should specify substitution variables in the dump file specifications).
Because each active worker process or I/O server process writes exclusively to one file at a time, an insufficient number of files can have adverse effects. Some of the worker processes will be idle while waiting for files, thereby degrading the overall performance of the job.(第一個原因是影響性能)
More importantly, if any member of a cooperating group of parallel I/O server processes cannot obtain a file for output, then the export operation will be stopped with an ORA-39095 error. (ora-39095的成因)Both situations can be corrected by attaching to the job using the Data Pump Export utility, adding more files using the ADD_FILE command while in interactive mode, and in the case of a stopped job, restarting the job.
說白話點就是:parallel io server processes寫文件不能同時寫一個,如果只有一個dumpfile(或少於parallel)就會影響性能。不但如此,當一個io server process在等待從而不能寫dumpfile的時候就會報ora-39095
要解決:expdp ATTACH 連上作業然后減少parallel或者增加dumpfile
從起源解決的話就是:指定parallel的時候就要指定至少同樣多的dumpfile或者使用類似下面的命令(注意紅字):
expdp hr/hr DIRECTORY=dpump_dir1 LOGFILE=parallel_export.log JOB_NAME=par4_job DUMPFILE=par_exp%u.dmp PARALLEL=4

根據expdp輸出日志的分析和網絡資料的分析,估計是跟內存或job相關的參數設置有關?那么我首先檢查一下相關初始化參數吧!

SQL> show parameter sga

NAME TYPE VALUE

------------------------------------ --------------------------------- ------------------------------

lock_sga boolean FALSE

pre_page_sga boolean FALSE

sga_max_size big integer 3008M

sga_target big integer 3008M

SQL> show parameter pga

NAME TYPE VALUE

------------------------------------ --------------------------------- ------------------------------

pga_aggregate_target big integer 998M

SQL> show parameter stream

NAME TYPE VALUE

------------------------------------ --------------------------------- ------------------------------

streams_pool_size big integer 0

SQL> show parameter aq

NAME TYPE VALUE

------------------------------------ --------------------------------- ------------------------------

aq_tm_processes integer 1

根據以上結果我們發現內存管理方式采用了自動管理,aq_tm_processes參數值大於0。更改必要參數:

SQL> create pfile='/u01/app/oracle/admin/ltdb/pfile/pfile161118.ora' from spfile;

File created.

SQL> alter system set aq_tm_processes=10 scope=both sid='*';

System altered.

SQL> alter system set streams_pool_size=48m scope=spfile sid='*';

System altered.

SQL> show parameter sga

NAME TYPE VALUE

------------------------------------ --------------------------------- ------------------------------

lock_sga boolean FALSE

pre_page_sga boolean FALSE

sga_max_size big integer 3008M

sga_target big integer 3008M

SQL> show parameter pga

NAME TYPE VALUE

------------------------------------ --------------------------------- ------------------------------

pga_aggregate_target big integer 998M

SQL> show parameter aq

NAME TYPE VALUE

------------------------------------ --------------------------------- ------------------------------

aq_tm_processes integer 10

SQL> show parameter streams

NAME TYPE VALUE

------------------------------------ --------------------------------- ------------------------------

streams_pool_size big integer 48M


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM