ORACLE 11G 配置DG 報ORA-10458、ORA-01152、ORA-01110

haoge0205發表於2013-11-28

作業系統:

Oracle Linux Server release 5.7

資料庫版本:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production

主:yoon 備:yoondg

備庫:

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: '/opt/oracle/oradata/yoon/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=yoon async valid_for=(
online_logfiles,primary_role)
db_unique_name=yoon
log_archive_dest_20 string

藍色地方設定錯誤:

SQL>alter system set log_archive_dest_2='servce=yoondg async valid_for=(online_logfiles,primary_role) db_unique_name=yoondg';

修改完再次檢視:

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=yoondg async valid_for=(
online_logfiles,primary_role)
db_unique_name=yoondg
log_archive_dest_20 string

依舊藍色地方設定錯誤:

SQL>alter system set log_archive_dest_2='service=yoon async valid_for=(online_logfies,primary_role) db_unique_name=yoon';

重啟備庫:

SQL>shutdown immediate;

SQL>startup nomount;

SQL>alter database mount standby database;

SQL>alter database open read only;

OK,問題解決.

配置ORACLE-DG的時候一定要認真、仔細,造成的報錯往往都是由於小錯誤引起的,報錯的時候不要著急,仔細分析alterSID.log和trace檔案.

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

相關文章