日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Oracle 应用归档 卡死,关于Oracle归档进程的运行机制

發布時間:2023/12/18 编程问答 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Oracle 应用归档 卡死,关于Oracle归档进程的运行机制 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

前幾天有位朋友在留言板上提了這樣一個問題:

Fri May 25 20:46:06 2007  //自動備份controlfile

Starting control autobackup

Control autobackup written to DISK device

handle '/ora_rman_backup/crtl_backup/c-4205638757-20070525-00'

Fri May 25 20:46:11 2007   //發生日志切換

Thread 1 advanced to log sequence 535

Current log# 1 seq# 535 mem# 0: /dev/udpay/lv_redo11_256m

Current log# 1 seq# 535 mem# 1: /dev/udpay/lv_redo12_256m

Fri May 25 20:46:11 2007   //同時啟動歸檔

ARCH: Evaluating archive  log 6 thread 1 sequence 534

ARCH: Beginning to archive log 6 thread 1 sequence 534

Creating archive destination LOG_ARCHIVE_DEST_1: '/archivelog/arch/1_534.dbf'

Fri May 25 20:46:12 2007   //一秒后另一進程啟動,失敗

ARC0: Evaluating archive  log 6 thread 1 sequence 534

ARC0: Unable to archive log 6 thread 1 sequence 534

Log actively being archived by another process

Fri May 25 20:46:15 2007   //3秒后成功歸檔

ARCH: Completed archiving log 6 thread 1 sequence 534

Fri May 25 20:46:18 2007   //3秒后日志切換

Thread 1 advanced to log sequence 536

Current log# 2 seq# 536 mem# 0: /dev/udpay/lv_redo21_256m

以上日志是備份過程中產生的,備份腳本如下:

$ORACLE_HOME/bin/rman

connect target sys/sys@udpay;

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/ora_rman_backup/crtl_backup/%F';

CONFIGURE CONTROLFILE AUTOBACKUP ON;

CROSSCHECK ARCHIVELOG ALL;

run{

ALLOCATE CHANNEL ch1 DEVICE TYPE DISK;

backup full database format 'D:/%T_%d' include current controlfile;

sql 'alter system archive log current';

backup filesperset 3 format 'D:/arch%u_%s_%p' archivelog all;

DELETE NOPROMPT ARCHIVELOG UNTIL TIME 'SYSDATE-2';

release channel ch1;

}

!!

這位朋友提出的問題是,為什么會有:

Log actively being archived by another process

如果一個歸檔進程已經開始歸檔日志,為什么另外一個進程又來歸檔日志?

研究了一下,有了一點新的發現。

首先,歸檔進程的數量是受初始化參數log_archive_max_processes控制,初始的,這個參數設置為2,Oracle啟動兩個歸檔進程:

[oracle@jumper bdump]$ ps -ef|grep ora_arc

oracle 11938 1 0 18:24 ? 00:00:00 ora_arc0_eygle

oracle 11940 1 0 18:24 ? 00:00:00 ora_arc1_eygle

oracle 16260 11894 0 20:21 pts/5 00:00:00 grep ora_arc

其中主歸檔進程會持續訪問控制文件:

*** 2007-06-06 20:23:50.510

WAIT #0: nam='rdbms ipc message' ela= 59999293 p1=6000 p2=0 p3=0

WAIT #0: nam='control file sequential read' ela= 76 p1=0 p2=1 p3=1

WAIT #0: nam='control file sequential read' ela= 36 p1=0 p2=370 p3=1

WAIT #0: nam='control file sequential read' ela= 36 p1=0 p2=8 p3=1

WAIT #0: nam='control file sequential read' ela= 30 p1=0 p2=9 p3=1

*** 2007-06-06 20:24:51.950

WAIT #0: nam='rdbms ipc message' ela= 59999344 p1=6000 p2=0 p3=0

WAIT #0: nam='control file sequential read' ela= 72 p1=0 p2=1 p3=1

WAIT #0: nam='control file sequential read' ela= 35 p1=0 p2=370 p3=1

WAIT #0: nam='control file sequential read' ela= 35 p1=0 p2=8 p3=1

WAIT #0: nam='control file sequential read' ela= 29 p1=0 p2=9 p3=1

另外一個歸檔進程以'rdbms ipc message' 事件處于等待:

*** 2007-06-06 20:01:15.830

WAIT #0: nam='rdbms ipc message' ela= 148300048 p1=14831 p2=0 p3=0

a*** 2007-06-06 20:06:23.030

WAIT #0: nam='rdbms ipc message' ela= 299999745 p1=30000 p2=0 p3=0

a*** 2007-06-06 20:11:30.230

WAIT #0: nam='rdbms ipc message' ela= 299999735 p1=30000 p2=0 p3=0

a*** 2007-06-06 20:16:37.430

WAIT #0: nam='rdbms ipc message' ela= 299999779 p1=30000 p2=0 p3=0

a*** 2007-06-06 20:21:44.630

當我們執行alter system archive log current命令時,Oracle Post歸檔進程時,主歸檔進程首先執行歸檔,而次歸檔進程則需要去讀取控制文件,以獲得當前及下一歸檔日志信息:

*** 2007-06-06 19:58:43.970

WAIT #0: nam='rdbms ipc message' ela= 148134746 p1=30000 p2=0 p3=0

WAIT #0: nam='control file sequential read' ela= 36 p1=0 p2=1 p3=1

WAIT #0: nam='control file sequential read' ela= 29 p1=0 p2=369 p3=1

WAIT #0: nam='control file sequential read' ela= 32 p1=0 p2=8 p3=1

WAIT #0: nam='control file sequential read' ela= 29 p1=0 p2=10 p3=1

這就導致次歸檔進程始終會落后于主歸檔進程,會在警告日志中看到如下信息:

Wed Jun 6 19:58:43 2007

ARCH: Evaluating archive log 4 thread 1 sequence 305

ARCH: Beginning to archive log 4 thread 1 sequence 305

Creating archive destination LOG_ARCHIVE_DEST_1: '/opt/oracle/product/9.2.0/dbs/arch1_305.dbf'

Wed Jun 6 19:58:43 2007

ARC1: Evaluating archive log 4 thread 1 sequence 305

ARC1: Unable to archive log 4 thread 1 sequence 305

Log actively being archived by another process

這在正常情況下是不會出現的,如果一個歸檔進程能夠滿足系統需要,第二個進程就無需啟動,而手動switch log則會Post所有歸檔進程。

在Oracle10g中,情況同樣如此:

Wed Jun 6 20:32:57 2007

ARCH: Evaluating archive log 4 thread 1 sequence 75268

Wed Jun 6 20:32:57 2007

ARC0: Evaluating archive log 4 thread 1 sequence 75268

ARC0: Unable to archive log 4 thread 1 sequence 75268

Log actively being archived by another process

Wed Jun 6 20:32:57 2007

ARCH: Beginning to archive log 4 thread 1 sequence 75268 (2074.-1351690850:2074.-1351608674) (mmsdb)

-The End-

創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎

總結

以上是生活随笔為你收集整理的Oracle 应用归档 卡死,关于Oracle归档进程的运行机制的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。