After
Setup Standby Database some times you might see below error in Standby Alert
log . Because of you got primary standby redo logs while setting up
standby.
ORA-00313:
open failed for members of log group 11 of thread 1
ORA-00312:
online log 11 thread 1: '+DATA/XXXSTBY/onlinelog/group_11.458.942941017'
ORA-17503:
ksfdopn:2 Failed to open file +DATA/XXXSTBY/onlinelog/group_11.458.942941017
ORA-15173:
entry 'group_11.458.942941017' does not exist in directory 'onlinelog'
To fix
Above Needs to Drop Standby redo logs which are exists before
rebuild the Standby or Which are exists on primary standby redo log groups we
need to drop on standby . My Primary and standby database versions are 12.1.0.2.0
version.
On
Primary Database:-
SQL>
select group#, thread#, bytes/1024/1024 MB from v$standby_log;
GROUP# THREAD# MB
----------
---------- ----------
4 0
500
5 0
500
6 0
500
7 0
500
8 1
500
9 1
500
10 1
500
11 1
500
12 1
500
On
Standby Database : -
SQL>
select group#, thread#, bytes/1024/1024 MB from v$standby_log;
GROUP# THREAD# MB
----------
---------- ----------
4 0
500
5 0
500
6 0
500
7 0
500
8 1
500
9 1
500
10 1
500
11 1
500
12 1
500
13 1
500
14 1
500
15 1
500
SQL>
select member,type from v$logfile;
Group 4
to Group 11 I have to drop Since Those are exists on primary database Which
are exists on primary database which are reported errors in standby database
alert log.
Errors in
file /u00/app/oracle/diag/rdbms/XXXXX/XXXSTBY/trace/XXXSTBY_rfs_24400.trc:
ORA-00313:
open failed for members of log group 11 of thread 1
ORA-00312:
online log 11 thread 1: '+DATA/XXXSTBY/onlinelog/group_11.458.942941017'
ORA-17503:
ksfdopn:2 Failed to open file +DATA/XXXSTBY/onlinelog/group_11.458.942941017
ORA-15173:
entry 'group_11.458.942941017' does not exist in directory 'onlinelog'
Here,we
have to drop the 8 standby redolog groups. .
SQL>
alter database drop standby logfile group 4;
alter
database drop standby logfile group 4
*
ERROR at
line 1:
ORA-01156:
recovery or flashback in progress may need access to files
Now to
solve this issue we have cancel the managed recovery session and set
"standby_file_management" to manual and drop the standby
redolog file as
SQL>
alter database recover managed standby database cancel ;
Database
altered.
SQL>
alter system set standby_file_management='MANUAL' ;
System
altered.
SQL>
alter database drop standby logfile group 4;
Database
altered.
SQL>
alter database drop standby logfile group 5;
Database
altered.
SQL>
alter database drop standby logfile group 6;
Database
altered.
SQL>
alter database drop standby logfile group 7;
Database
altered.
SQL>
alter database drop standby logfile group 8;
Database
altered.
SQL>
alter database drop standby logfile group 9;
Database
altered.
SQL>
alter database drop standby logfile group 10;
Database
altered.
SQL>
alter database drop standby logfile group 11;
Database
altered.
If the
status of standby redo log show the "clearing_current" then we cannot
drop "clearing_current" status logs,and for that we have to sync with
Primary and clear the log first before dropping as
SQL>
alter database clear logfile group n;
Once the
standby redo logs are dropped then again back to recover the standby.
SQL>
alter system set standby_file_management='AUTO' ;
System
altered.
SQL>
alter database recover managed standby database disconnect from session ;
Database
altered.
After
Dropped standby redo logs which are reported in standby database alert
log you will not see any more this error.
No comments:
Post a Comment