今天第一次配 Oracle 11g R2 Active Data Guard,在用 RMAN 建立好 physical standby database 後,
嘗試將 standby 以 read only 方式開啟時遇如下錯誤:
SQL> alter database open read only;
alter database open read only
*
ERROR at line 1:
ORA-10458: standby database requires recovery
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1:
'/u01/app/oracle/oradata/STANDBY/datafile/o1_mf_system_8v8y9m2x_.dbf'
metalink 文章[ID 1312376.1]上描述是 primary database 的 compatible 參數設定錯誤
Primary:
SQL> col host_name for a20
SQL> select instance_name,host_name,version,archiver,log_switch_wait from v$instance;
INSTANCE_NAME HOST_NAME VERSION ARCHIVE LOG_SWITCH_WAIT
---------------- -------------------- ----------------- ------- ---------------
prod prod.oracle.com 11.2.0.3.0 STARTED
Standby:
SQL> select instance_name,host_name,version,archiver,log_switch_wait from v$instance;
INSTANCE_NAME HOST_NAME VERSION ARCHIVE LOG_SWITCH_WAIT
---------------- -------------------- ----------------- ------- ---------------
standby standby.oracle.com 11.2.0.3.0 STARTED
Primary:
SQL> show parameter compatible
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
compatible string 11.2.0.0.0
Standby:
SQL> show parameter compatible
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
compatible string 11.2.0.0.0
將 Primary 和 Standby 的 compatible 參數全部修改為 11.2.0.2.0 後重啟便可將 standby 以 read only 方式開啟
primary:
SQL> alter system set compatible='11.2.0.2.0' scope=spfile;
SQL> shutdown immediate;
SQL> startup;
standby:
SQL> startup open read only;
SQL> select OPEN_MODE from v$database;
OPEN_MODE
--------------------
READ ONLY
轉載請註明作者出處及原文連結,否則將追究法律責任:
作者:xiangsir
原文連結:http://blog.csdn.net/xiangsir/article/details/9077527
QQ:444367417
MSN:xiangsir@hotmail.com