Oracle11g物理STANDBY開啟模式應用歸檔時無法執行備份

yangtingkun發表於2007-12-30

這個標題又夠長的,可是不這麼長無法將意思表達清楚。11.1.0.6上的bug,導致11g的物理STANDBY只讀開啟且應用日誌的時候是無法進行備份的。


STANDBY資料庫的兩種工作狀態:應用日誌狀態和只讀開啟狀態,都是可以進行備份的,而只讀開啟且同時應用日誌狀態備份報錯:

[oracle@yangtk2 ~]$ sqlplus "/ as sysdba"

SQL*Plus: Release 11.1.0.6.0 - Production on Wed Dec 19 08:44:50 2007

Copyright (c) 1982, 2007, Oracle. All rights reserved.

Connected to an idle instance.

SQL> startup mount ORACLE instance started.

Total System Global Area 267825152 bytes
Fixed Size 1299316 bytes
Variable Size 167775372 bytes
Database Buffers 96468992 bytes
Redo Buffers 2281472 bytes
Database mounted.
SQL> alter database recover managed standby database disconnect from session;

Database altered.

SQL> host
[oracle@yangtk2 ~]$ rman target /

Recovery Manager: Release 11.1.0.6.0 - Production on Wed Dec 19 08:45:33 2007

Copyright (c) 1982, 2007, Oracle. All rights reserved.

connected to target database: ORA11G (DBID=4026820313, not open)

RMAN> backup tablespace users;

Starting backup at 19-DEC-07
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=140 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00004 name=/data/oracle/oradata/ora11g/ORA11G_P/datafile/o1_mf_users_3d37bq45_.dbf
channel ORA_DISK_1: starting piece 1 at 19-DEC-07
channel ORA_DISK_1: finished piece 1 at 19-DEC-07
piece handle=/data1/backup/1sj3vru6_1_1 tag=TAG20071219T084558 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 19-DEC-07

RMAN> exit


Recovery Manager complete.
[oracle@yangtk2 ~]$ exit
exit

SQL> alter database recover managed standby database cancel;

Database altered.

SQL> alter database open;

Database altered.

SQL> host
[oracle@yangtk2 ~]$ rman target /

Recovery Manager: Release 11.1.0.6.0 - Production on Wed Dec 19 08:47:10 2007

Copyright (c) 1982, 2007, Oracle. All rights reserved.

connected to target database: ORA11G (DBID=4026820313)

RMAN> backup tablespace users;

Starting backup at 19-DEC-07
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=145 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00004 name=/data/oracle/oradata/ora11g/ORA11G_P/datafile/o1_mf_users_3d37bq45_.dbf
channel ORA_DISK_1: starting piece 1 at 19-DEC-07
channel ORA_DISK_1: finished piece 1 at 19-DEC-07
piece handle=/data1/backup/1tj3vs0m_1_1 tag=TAG20071219T084717 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 19-DEC-07

RMAN> exit


Recovery Manager complete.
[oracle@yangtk2 ~]$ exit
exit

SQL> alter database recover managed standby database disconnect from session;

Database altered.

SQL> host;
[oracle@yangtk2 ~]$ rman target /

Recovery Manager: Release 11.1.0.6.0 - Production on Wed Dec 19 08:47:42 2007

Copyright (c) 1982, 2007, Oracle. All rights reserved.

connected to target database: ORA11G (DBID=4026820313)

RMAN> backup tablespace users;

Starting backup at 19-DEC-07
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=137 device type=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 12/19/2007 08:47:47
ORA-01153: an incompatible media recovery is active

從原理上考慮,只讀開啟狀態不會對備份產生影響,既然應用日誌的時候可以進行備份,那麼只讀開啟狀態下應用日誌應該也是可以進行備份。

懷疑是Oraclebug,查詢Metalink,發現果然是bugBug No. 6454190Oracle計劃在11.1.0.7fixed這個bug

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/4227/viewspace-69565/,如需轉載,請註明出處,否則將追究法律責任。

相關文章