備庫:
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
再次查看主庫的參數(shù):
SQL> show parameter LOG_ARCHIVE_DEST_2
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2 string service=standby lgwr async noa
ffirm
原來這里設(shè)置錯誤:
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
原來這里設(shè)置錯誤:
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. 本文出自:億恩科技【mszdt.com】
服務(wù)器租用/服務(wù)器托管中國五強(qiáng)!虛擬主機(jī)域名注冊頂級提供商!15年品質(zhì)保障!--億恩科技[ENKJ.COM]
|