Recover Physical Standby Database Error [message #681560] |
Tue, 04 August 2020 02:19  |
 |
keenweng2001
Messages: 9 Registered: August 2020
|
Junior Member |
|
|
I am trying to resolve a DG gaps by following the link
https://dbaclass.com/article/how-to-recover-standby-database-when-archive-logs-are-missing-in-primary
When i start to recover the standby database , i hit some error. I cross check the list of arch logs are available in the /u03/uat1/arch directory . How do i fixed this issues without re-initialize the entire standby database ?
PRIMARY :
RMAN> run {
allocate channel c1 type disk format '/u04/resync_standby_manual/uat1/rman_bkup%U.rmb';
backup incremental from scn 211342032 database;
}
alter database create standby controlfile as '/u04/resync_standby_manual/uat1/PG_standby_control.ctl';
STANDBY:
During recover database at standby server using the incremental backup and standby control file , i hit the error below:
SQL> select current_scn from v$database;
CURRENT_SCN
-----------
211342032
cp /u04/temp/resync_standby_manual/uat1/PG_standby_control.ctl /u01/app/oracle/oradata/uat1/control01.ctl
catalog start with '/u04/resync_standby_manual/uat1/';
recover database
archived log for thread 1 with sequence 146446 is already on disk as file /u03/uat1/arch/1_146446_887236966.arc
archived log for thread 1 with sequence 146447 is already on disk as file /u03/uat1/arch/1_146447_887236966.arc
archived log file name=/u03/uat1/arch/1_16609_887236966.arc thread=1 sequence=16609
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 08/03/2020 16:10:19
RMAN-11003: failure during parse/execution of SQL statement: alter database recover logfile '/u03/uat1/arch/1_16609_887236966.arc'
ORA-00328: archived log ends at change 174537997, need later change 174855353
ORA-00334: archived log: '/u03/uat1/arch/1_16609_887236966.arc'
SQL> select name, thread#, sequence#, archived, applied, status from
2 v$archived_log
3 where 174855353 between FIRST_CHANGE# and NEXT_CHANGE#;
no rows return
|
|
|
|
|
Re: Recover Physical Standby Database Error [message #681564 is a reply to message #681562] |
Tue, 04 August 2020 05:24   |
John Watson
Messages: 8976 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
Quote:You need to start the redo transport and the managed recovery. That is two things you need to do. It looks as though you have done only one of them.
Apart from that, you need standby logfiles and your recovery command should include the USING CURRENT LOGFILE clause.
|
|
|
Re: Recover Physical Standby Database Error [message #681566 is a reply to message #681564] |
Tue, 04 August 2020 10:22   |
 |
keenweng2001
Messages: 9 Registered: August 2020
|
Junior Member |
|
|
i have try using recover with current logfile option but same error . I could not start the redo transport. I try apply-off and apply-on in DGMGRL but it still showing Redo apply is stopped .
i think i need to resolve this error : ORA-16086 first before performing the recovery again . When can i find the exact problem when transferring the log file to standby server ? any trace log ?
DGMGRL> show configuration
Configuration - uat_dgConfig
Protection Mode: MaxAvailability
Databases:
uat - Primary database
Error: ORA-16810: multiple errors or warnings detected for the database
uat1 - Physical standby database
Error: ORA-16810: multiple errors or warnings detected for the database
Fast-Start Failover: DISABLED
Configuration Status:
ERROR
DGMGRL> show database uat1
Database - uat1
Role: PHYSICAL STANDBY
Intended State: APPLY-ON
Transport Lag: (unknown)
Apply Lag: 868 days 23 hours 2 minutes 25 seconds (computed 137 seconds ago)
Apply Rate: (unknown)
Real Time Query: OFF
Instance(s):
uat1
Database Error(s):
ORA-16766: Redo Apply is stopped
Database Status:
ERROR
SYS@uat>select dest_id, status, error from v$archive_dest where target='Y';
DEST_ID STATUS ERROR
-----------------------------------------------------------------
2 ERROR ORA-16086: Redo data cannot be written to the standby redo log
SQL> SELECT group#, type, member FROM v$logfile WHERE type = 'STANDBY' order by group#;
GROUP# TYPE MEMBER
--------------------------------------------------------------------------------
4 STANDBY /u01/app/oracle/oradata/uat/stndbyuat_01.log
5 STANDBY /u01/app/oracle/oradata/uat/stndbyuat_02.log
6 STANDBY /u01/app/oracle/oradata/uat/stndbyuat_03.log
7 STANDBY /u01/app/oracle/oradata/uat/stndbyuat_04.log
SQL> column DBID format a20
SQL> SELECT group#, dbid, thread#, sequence#, status FROM v$standby_log;
GROUP# DBID THREAD# SEQUENCE# STATUS
---------- -------------------- ---------- ---------- ----------
4 UNASSIGNED 0 0 UNASSIGNED
5 UNASSIGNED 0 0 UNASSIGNED
6 UNASSIGNED 0 0 UNASSIGNED
7 UNASSIGNED 0 0 UNASSIGNED
[Updated on: Tue, 04 August 2020 10:24] Report message to a moderator
|
|
|
Re: Recover Physical Standby Database Error [message #681567 is a reply to message #681566] |
Tue, 04 August 2020 11:20   |
John Watson
Messages: 8976 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
Quote: I could not start the redo transport How did you try to start it? What was the result?
However, the Data Guard Broker is telling you that the situation is 100% disastrous. If I were you, I would remove the Broker configuration, remove the standby database, and create a new one. It is a simple task, probably much easier than tryiung to salvage somethiung from what you have now.
|
|
|
|
|
|
Re: Recover Physical Standby Database Error [message #681581 is a reply to message #681570] |
Wed, 05 August 2020 08:29  |
 |
keenweng2001
Messages: 9 Registered: August 2020
|
Junior Member |
|
|
I try to perform a manual switch logfile in primary server and i do see the logs transfer to the standby server :
PRIMARY:
SYS@uat>alter system switch logfile;
System altered.
SYS@uat>ARCHIVE LOG LIST;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 146986
Next log sequence to archive 146988
Current log sequence 146988
STANDBY:
SQL> select thread#, max(sequence#) "Last Standby Seq Received" from v$archived_log val, v$database vdb where val.resetlogs_change# = vdb.resetlogs_change# group by thread# order by 1;
THREAD# Last Standby Seq Received
---------- -------------------------
1 146985
SQL> select thread#, max(sequence#) "Last Standby Seq Applied" from v$archived_log val, v$database vdb where val.resetlogs_change# = vdb.resetlogs_change# and val.applied in ('YES','IN-MEMORY') group by thread# order by 1;
THREAD# Last Standby Seq Applied
---------- ------------------------
1 16609
|
|
|