您好,登錄后才能下訂單哦!
環(huán)境:
centos 6.5 X64
Oracle 11g Enterprise Edition Release 11.2.0.2.0
故障現(xiàn)象:
rman自動備份腳本失敗,報錯現(xiàn)象:
Starting backup at 30-JUL-15
current log archived
released channel: disk1
released channel: disk2
released channel: disk3
released channel: disk4
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 07/30/2015 23:00:27
RMAN-06059: expected archived log not found, loss of archived log compromises recoverability
ORA-19625: error identifying file /data0/oracle/database/archive/1_985092_843387931.arc
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Recovery Manager complete
從報錯現(xiàn)象上看,是因為歸檔日志 985092 文件被刪除了。
分析主要原因是因為此數(shù)據(jù)庫為dataguard 架構,同事做了v$archived max(SEQUENCE#)-500保留歸檔而且是每小時執(zhí)行一次刪除歸檔日志。因為晚上11點整點開始備份,也就說當整點rman開始執(zhí)行run{}并分配通道后已經是23:04以后了,但是刪除腳本已經在整點23:00已經執(zhí)行。 這個時候rman archive backup 腳本執(zhí)行 input archived log thread=1 sequence=985092 文件時發(fā)現(xiàn)文件不存在。導致rman 歸檔備份失敗。
查看時間:
SQL> SELECT APPLIED,to_char(FIRST_TIME, 'yyyy-mm-dd hh34:mi:ss') as FIRST_TIME,
2 to_char(NEXT_TIME, 'yyyy-mm-dd hh34:mi:ss') as NEXT_TIME
3 from V$ARCHIVED_LOG
4 where SEQUENCE#= 985092;
APPLIED FIRST_TIME NEXT_TIME
--------- ------------------- -------------------
YES 2015-07-30 16:03:06 2015-07-30 16:03:12
NO 2015-07-30 16:03:06 2015-07-30 16:03:12
處理倆種方法:
1、綜合考慮服務器硬盤存儲空間【言外之意就是數(shù)據(jù)庫要保留一天的歸檔日志】,取消自動刪除歸檔日志腳本。讓rman 做歸檔備份完成之后自動刪除歸檔日志。
2、修改rman 歸檔備份時間和備份腳本,如:23:10開始備份。
如:
RUN {
allocate channel disk1 type disk maxpiecesize 4000M;
allocate channel disk2 type disk maxpiecesize 4000M;
sql 'alter system archive log current';
backup archivelog all delete input format '/opt/oracle/backup/arch_backup/archbackup/%d_arch_%s_%p_%h.arh' filesperset = 50;
# Control file backup
backup as compressed backupset format '/opt/oracle/backup/arch_backup/archbackup/CF_%t_%s_%p_D%T.ctl' current controlfile;
}
如果空間夠用,就推薦使用第二種,這樣數(shù)據(jù)可用范圍大。
免責聲明:本站發(fā)布的內容(圖片、視頻和文字)以原創(chuàng)、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關證據(jù),一經查實,將立刻刪除涉嫌侵權內容。