配置Oracle11gR2 Datagurad出現ORA-10458錯誤

mengzhaoliang發表於2011-01-06

備庫:
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/bhoms/system01.dbf'


檢視備庫:
SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;

SWITCHOVER_STATUS
--------------------
TO PRIMARY


檢視主庫:
SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;

SWITCHOVER_STATUS
--------------------
NOT ALLOWED

再次檢視主庫的引數:
SQL> show parameter LOG_ARCHIVE_DEST_2

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2                   string      service=standby lgwr async noa
                                                 ffirm
原來這裡設定錯誤:
SQL> alter system set log_archive_dest_2='service=bhoms02 async valid_for=(online_logfiles,primary_role) db_unique_name=bhoms02';

再查主庫:
SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;

SWITCHOVER_STATUS
--------------------
TO STANDBY

檢視備庫:
SQL> show parameter LOG_ARCHIVE_DEST_2

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2                   string      service=standby lgwr async noa
                                                 ffirm
原來這裡設定錯誤:
SQL> alter system set log_archive_dest_2='service=bhoms01 async valid_for=(online_logfiles,primary_role) db_unique_name=bhoms01';

重啟備庫,解決問題:
SQL> shutdown immediate;
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> startup nomount
ORACLE instance started.

Total System Global Area 6747725824 bytes
Fixed Size                  2213976 bytes
Variable Size            5100275624 bytes
Database Buffers         1610612736 bytes
Redo Buffers               34623488 bytes
SQL> alter database mount standby database;

Database altered.

SQL> alter database open read only;

Database altered.

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

Database altered.

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

相關文章