今天在进行例检的时候,发现dp在凌晨一点多的时候备份归档日志发生了一些错误,具体的rman报错为
OB2BAR application on "XXXX02" successfully started.
ob2rman.exe started with arguments:
-backup -full
Recovery Manager: Release 9.2.0.6.0 - 64bit Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
RMAN>
connected to target database: XXXX (DBID=169290886)
RMAN>
connected to recovery catalog database
RMAN>
RMAN> run {
2> allocate channel 'dev_0' type 'sbt_tape'
3> parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=XXXX2,OB2BARLIST=XXXX2_arch,OB2BARHOSTNAME=fj_db02)';
4> allocate channel 'dev_1' type 'sbt_tape'
5> parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=XXXX2,OB2BARLIST=XXXX2_arch,OB2BARHOSTNAME=fj_db02)';
6> allocate channel 'dev_2' type 'sbt_tape'
7> parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=XXXX2,OB2BARLIST=XXXX2_arch,OB2BARHOSTNAME=fj_db02)';
8> allocate channel 'dev_3' type 'sbt_tape'
9> parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=XXXX2,OB2BARLIST=XXXX2_arch,OB2BARHOSTNAME=fj_db02)';
10> crosscheck archivelog from time 'sysdate-1' until time 'sysdate';
11> backup
12> format 'XXXX2_arch.dbf'
13> archivelog like '/archlog2/XXXX2%'
14> delete input;
15> }
allocated channel: dev_0
channel dev_0: sid=251 devtype=SBT_TAPE
channel dev_0: Data Protector A.05.50/330
allocated channel: dev_1
channel dev_1: sid=276 devtype=SBT_TAPE
channel dev_1: Data Protector A.05.50/330
allocated channel: dev_2
channel dev_2: sid=204 devtype=SBT_TAPE
channel dev_2: Data Protector A.05.50/330
allocated channel: dev_3
channel dev_3: sid=301 devtype=SBT_TAPE
channel dev_3: Data Protector A.05.50/330
validation succeeded for archived log
archive log filename=/archlog1/XXXX_1_21584.arc recid=38312 stamp=681012033
validation succeeded for archived log
archive log filename=/archlog1/XXXX_1_21585.arc recid=38315 stamp=681032056
Crosschecked 2 objects
Starting backup at 03/09/2009 [09:16:19]
released channel: dev_0
released channel: dev_1
released channel: dev_2
released channel: dev_3
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 03/09/2009 09:16:19
RMAN-06004: ORACLE error from recovery catalog database: RMAN-20242: specification does not match any archive log in the recovery catalog
RMAN> **end-of-file**
RMAN>
Recovery Manager complete.
[@more@]一开始还以为是存储的问题,吓了一跳,后来联系主机工程师查看以后发现存储没有问题.估计是当时的归档文件夹下确实没有文件造成的,因为 archivelog like '/archlog2/XXXX2%' 用了like所以很有可能
于是模拟了一下当时的情形
$ sqlplus "/ as sysdba"
SQL*Plus: Release 9.2.0.1.0 - Production on Mon Mar 9 11:03:20 2009
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /oracle/product/9.2.0.4/dbs/arch
Oldest online log sequence 30
Next log sequence to archive 33
Current log sequence 33
SQL> !ll /oracle/product/9.2.0.4/dbs/arch
total 0
SQL>
SQL> alter system switch logfile;
System altered.
SQL> /
System altered.
SQL> /
System altered.
SQL> !ll /oracle/product/9.2.0.4/dbs/arch
total 2440
-rw-rw---- 1 oracle dba 1225728 Mar 9 11:03 ora9i_1_33.arc
-rw-rw---- 1 oracle dba 2048 Mar 9 11:03 ora9i_1_34.arc
-rw-rw---- 1 oracle dba 4096 Mar 9 11:03 ora9i_1_35.arc
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
$
$
$
$
$ rman target / nocatalog
Recovery Manager: Release 9.2.0.1.0 - 64bit Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: ORA9I (DBID=2432039804)
using target database controlfile instead of recovery catalog
RMAN> run {
2> allocate channel t1 type disk;
3> allocate channel t2 type disk;
4> allocate channel t3 type disk;
5> allocate channel t4 type disk;
6> crosscheck archivelog from time 'sysdate-1' until time 'sysdate';
7> backup
8> format 'arch_%u%p%s.rmn'
9> archivelog like '/oracle/product/9.2.0.4/dbs/arch/ora9i_1%'
10> delete input;
11> }
allocated channel: t1
channel t1: sid=16 devtype=DISK
allocated channel: t2
channel t2: sid=17 devtype=DISK
allocated channel: t3
channel t3: sid=18 devtype=DISK
allocated channel: t4
channel t4: sid=19 devtype=DISK
validation succeeded for archived log
archive log filename=/oracle/product/9.2.0.4/dbs/arch/ora9i_1_33.arc recid=4 stamp=681044622
validation succeeded for archived log
archive log filename=/oracle/product/9.2.0.4/dbs/arch/ora9i_1_34.arc recid=5 stamp=681044622
validation succeeded for archived log
archive log filename=/oracle/product/9.2.0.4/dbs/arch/ora9i_1_35.arc recid=6 stamp=681044623
Crosschecked 3 objects
Starting backup at 09-MAR-09
channel t1: starting archive log backupset
channel t1: specifying archive log(s) in backup set
input archive log thread=1 sequence=33 recid=4 stamp=681044622
channel t1: starting piece 1 at 09-MAR-09
channel t2: starting archive log backupset
channel t2: specifying archive log(s) in backup set
input archive log thread=1 sequence=34 recid=5 stamp=681044622
channel t2: starting piece 1 at 09-MAR-09
channel t3: starting archive log backupset
channel t3: specifying archive log(s) in backup set
input archive log thread=1 sequence=35 recid=6 stamp=681044623
channel t3: starting piece 1 at 09-MAR-09
channel t1: finished piece 1 at 09-MAR-09
piece handle=/oracle/product/9.2.0.4/dbs/arch_02k9fqlf12.rmn comment=NONE
channel t1: backup set complete, elapsed time: 00:00:02
channel t1: deleting archive log(s)
archive log filename=/oracle/product/9.2.0.4/dbs/arch/ora9i_1_33.arc recid=4 stamp=681044622
channel t2: finished piece 1 at 09-MAR-09
piece handle=/oracle/product/9.2.0.4/dbs/arch_03k9fqlf13.rmn comment=NONE
channel t2: backup set complete, elapsed time: 00:00:02
channel t2: deleting archive log(s)
archive log filename=/oracle/product/9.2.0.4/dbs/arch/ora9i_1_34.arc recid=5 stamp=681044622
channel t3: finished piece 1 at 09-MAR-09
piece handle=/oracle/product/9.2.0.4/dbs/arch_04k9fqlf14.rmn comment=NONE
channel t3: backup set complete, elapsed time: 00:00:02
channel t3: deleting archive log(s)
archive log filename=/oracle/product/9.2.0.4/dbs/arch/ora9i_1_35.arc recid=6 stamp=681044623
Finished backup at 09-MAR-09
released channel: t1
released channel: t2
released channel: t3
released channel: t4
RMAN>
RMAN>
RMAN> exit
Recovery Manager complete.
$
$ ll /oracle/product/9.2.0.4/dbs/arch
total 0
$
$
$
$ rman target / nocatalog
Recovery Manager: Release 9.2.0.1.0 - 64bit Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: ORA9I (DBID=2432039804)
using target database controlfile instead of recovery catalog
RMAN>
RMAN> run {
2> allocate channel t1 type disk;
3> allocate channel t2 type disk;
4> allocate channel t3 type disk;
5> allocate channel t4 type disk;
6> crosscheck archivelog from time 'sysdate-1' until time 'sysdate';
7> backup
8> format 'arch_%u%p%s.rmn'
9> archivelog like '/oracle/product/9.2.0.4/dbs/arch/ora9i_1%'
10> delete input;
11> }
allocated channel: t1
channel t1: sid=18 devtype=DISK
allocated channel: t2
channel t2: sid=17 devtype=DISK
allocated channel: t3
channel t3: sid=16 devtype=DISK
allocated channel: t4
channel t4: sid=11 devtype=DISK
specification does not match any archive log in the recovery catalog
Starting backup at 09-MAR-09
released channel: t1
released channel: t2
released channel: t3
released channel: t4
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 03/09/2009 11:04:45
RMAN-20242: specification does not match any archive log in the recovery catalog
RMAN>
RMAN>
从上面的结果可以看出,确实是因为当时没有需要归档的文件造成的,可能是当时业务不繁忙,还没产生归档日志
于是在当前的备份命令前加了一句 alter system archivelog current,强制生成一个归档日志来忽悠一下dp,这样dp就不会告警了.
在此问题的处理过程中,感谢jimmy的大力支持.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/60217/viewspace-1018332/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/60217/viewspace-1018332/