Linux平臺Oracle 11g DataGuard Physical Standby 非正常關閉後的啟動

cow977發表於2012-01-31

Linux平臺Oracle 11g DataGuard Physical Standby 非正常關閉後的啟動

 

啟動11g DataGuard Physical Standby資料庫,報“ORA-10458”錯誤:

[oracle@rhel5 ~]$ export ORACLE_SID=stby

[oracle@rhel5 ~]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.1.0 Production on Jan 31 13:30:17 2012

 

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

 

SQL> conn / as sysdba

Connected.

SQL> shutdown abort

ORACLE instance shut down.

SQL> startup

ORACLE instance started.

 

Total System Global Area  814227456 bytes

Fixed Size                  2217752 bytes

Variable Size             478152936 bytes

Database Buffers          327155712 bytes

Redo Buffers                6701056 bytes

Database mounted.

ORA-10458: standby database requires recovery

ORA-01196: file 1 is inconsistent due to a failed media recovery session

ORA-01110: data file 1: '/…/oradata/stby/system01.dbf'

 

SQL> select open_mode from v$database;

 

OPEN_MODE

--------------------

MOUNTED

 

alert.log檔案:

ALTER DATABASE OPEN

AUDIT_TRAIL initialization parameter is changed to OS, as DB is NOT compatible for database opened with read-only access

Beginning standby crash recovery.

Serial Media Recovery started

Managed Standby Recovery starting Real Time Apply

Media Recovery of Online Log [Thread=1, Seq=580]

Recovery of Online Redo Log: Thread 1 Group 12 Seq 580 Reading mem 0

  Mem# 0: /…/oradata/stby/redo12.log

ARC1: Archival started

ARC0: STARTING ARCH PROCESSES COMPLETE

ARC0: Becoming the 'no FAL' ARCH

ARC1: Becoming the heartbeat ARCH

 

*********************************************************

Fatal NI connect error 12541, connecting to:

 (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rhel5)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=zw)(CID=(PROGRAM=oracle@rhel5)(HOST=rhel5)(USER=oracle))))

 

  VERSION INFORMATION:

        TNS for Linux: Version 11.2.0.1.0 - Production

        TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.1.0 - Production

  Time: 31-JAN-2012 13:30:40

  Tracing not turned on.

  Tns error struct:

    ns main err code: 12541

   

TNS-12541: TNS:no listener

    ns secondary err code: 12560

    nt main err code: 511

   

TNS-00511: No listener

    nt secondary err code: 111

    nt OS err code: 0

 

*************************************************************

 

Check whether the listener is up and running.

FAL[client, ARC1]: Error 12541 connecting to zw for fetching gap sequence

Errors in file /…/stby/trace/stby_arc1_19277.trc:

ORA-12541: TNS:no listener

Errors in file /…/stby/trace/stby_arc1_19277.trc:

ORA-12541: TNS:no listener

Tue Jan 31 13:33:40 2012

Standby crash recovery failed to bring standby database to a consistent

point because needed redo hasn't arrived yet.

MRP: Wait timeout: thread 1 sequence# 0

Standby crash recovery aborted due to error 16016.

Errors in file /…/stby/trace/stby_ora_19278.trc:

ORA-16016: archived log for thread 1 sequence# 580 unavailable

Recovery interrupted!

Some recovered datafiles maybe left media fuzzy

Media recovery may continue but open resetlogs may fail

Completed standby crash recovery.

Errors in file /…/rdbms/stby/stby/trace/stby_ora_19278.trc:

ORA-10458: standby database requires recovery

ORA-01196: file 1 is inconsistent due to a failed media recovery session

ORA-01110: data file 1: '/…/oradata/stby/system01.dbf'

ORA-10458 signalled during: ALTER DATABASE OPEN...

 

啟動主庫Listener後,可正常啟動standby資料庫。

SQL> alter database open;

Database altered.

 

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;

Database altered.

 

SQL> select open_mode from v$database;

OPEN_MODE

--------------------

READ ONLY WITH APPLY

 

alert.log檔案:

Tue Jan 31 13:53:20 2012

alter database open

Beginning standby crash recovery.

Serial Media Recovery started

Managed Standby Recovery starting Real Time Apply

Media Recovery of Online Log [Thread=1, Seq=580]

Recovery of Online Redo Log: Thread 1 Group 12 Seq 580 Reading mem 0

  Mem# 0: /home/oracle/oradata/stby/redo12.log

Tue Jan 31 13:53:29 2012

Using STANDBY_ARCHIVE_DEST parameter default value as /home/oracle/archive/stby

RFS[1]: Assigned to RFS process 19506

RFS[1]: Identified database type as 'physical standby': Client is ARCH pid 18937

RFS[1]: Selected log 12 for thread 1 sequence 580 dbid -245776544 branch 764329253

Incomplete Recovery applied until change 12754156 time 01/31/2012 13:30:26

Tue Jan 31 13:53:30 2012

Archived Log entry 356 added for thread 1 sequence 580 ID 0xf1594c60 dest 1:

Tue Jan 31 13:53:31 2012

Completed standby crash recovery.

Tue Jan 31 13:53:31 2012

RFS[2]: Assigned to RFS process 19508

RFS[2]: Identified database type as 'physical standby': Client is LGWR SYNC pid 18876

Tue Jan 31 13:53:31 2012

SMON: enabling cache recovery

Primary database is in MAXIMUM AVAILABILITY mode

Changing standby controlfile to RESYNCHRONIZATION level

Standby controlfile consistent with primary

RFS[2]: Selected log 11 for thread 1 sequence 582 dbid -245776544 branch 764329253

Dictionary check beginning

Dictionary check complete

Database Characterset is ZHS16GBK

RFS[1]: Selected log 12 for thread 1 sequence 581 dbid -245776544 branch 764329253

No Resource Manager plan active

Archived Log entry 357 added for thread 1 sequence 581 ID 0xf1594c60 dest 1:

replication_dependency_tracking turned off (no async multimaster replication found)

Standby controlfile consistent with primary

Archived Log entry 358 added for thread 1 sequence 582 ID 0xf1594c60 dest 1:

RFS[2]: Selected log 11 for thread 1 sequence 583 dbid -245776544 branch 764329253

Physical standby database opened for read only access.

Completed: alter database open

Tue Jan 31 13:53:43 2012

Changing standby controlfile to MAXIMUM AVAILABILITY level

Tue Jan 31 13:53:43 2012

Archived Log entry 359 added for thread 1 sequence 583 ID 0xf1594c60 dest 1:

RFS[2]: Selected log 11 for thread 1 sequence 584 dbid -245776544 branch 764329253

Tue Jan 31 13:57:43 2012

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT

Attempt to start background Managed Standby Recovery process (stby)

Tue Jan 31 13:57:43 2012

MRP0 started with pid=25, OS id=19542

MRP0: Background Managed Standby Recovery process started (stby)

 started logmerger process

Tue Jan 31 13:57:48 2012

Managed Standby Recovery starting Real Time Apply

Parallel Media Recovery started with 4 slaves

Waiting for all non-current ORLs to be archived...

All non-current ORLs have been archived.

Media Recovery Log /…/archive/stby/zw_1_580_764329253.log

Completed: ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT

Media Recovery Log /…/archive/stby/zw_1_581_764329253.log

Media Recovery Log /…/archive/stby/zw_1_582_764329253.log

Media Recovery Log /…/archive/stby/zw_1_583_764329253.log

Media Recovery Waiting for thread 1 sequence 584 (in transit)

Recovery of Online Redo Log: Thread 1 Group 11 Seq 584 Reading mem 0

  Mem# 0: /home/oracle/oradata/stby/redo11.log

 

 

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

相關文章