DGMGRL > switchover to standby
is hanged and not completed
Errors
Both Database’s
became to Standby Status after braking the operation
Data Guard Error > DGM-17017: unable to determine configuration status
Error: ORA-16782: instance not open for read and write
access,
This service status is getting offline > ora.XX.XXX.svc :
Multiple errors on DG status
Scenerio
Both Primary and Stand by database's became to standby db role and Data Guard configuration is not shoowing success message.Requirment is to solve the issue and switch to Standby Site.
DGMGRL> show configuration
Configuration - dataguard
Protection Mode: MaxPerformance
Databases:
Primary - Primary database
Error: ORA-16782: instance not open for read and write access
Standby - Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
ERROR
Configuration - dataguard
Protection Mode: MaxPerformance
Databases:
Primary - Primary database
Error: ORA-16782: instance not open for read and write access
Standby - Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
ERROR
SQL> select database_role from gv$database;
DATABASE_ROLE
----------------
PHYSICAL STANDBY
DATABASE_ROLE
----------------
PHYSICAL STANDBY
PHYSICAL STANDBY
Solution
First requrment is to make Primary database status as Primary (Now both servers are in standby mode and read only)
srvctl stop database -d primary
srvctl start database -d primary -o mount \
SQL> alter database recover managed standby database cancel;
SQL> alter database recover managed standby database finish;
SQL> ALTER database commit to switchover to primary with session shutdown;
SQL> alter database open;
SQL> select database_role from v$database;
DATABASE_ROLE
----------------
PRIMARY
Manualt start the failed crs service
crs_start ora.XX.XXX.svc
Use crs_stat and ensure all relevent crs services are running
Perform a Manual Log switching and check whether they are applied in standyby
SQL> aler system switch logfile
System altered.
SQL> select THREAD#, max(SEQUENCE#) from v$archived_log where APPLIED='YES' group by THREAD#;
THREAD# MAX(SEQUENCE#)
---------- --------------
1 22598
2 22009
SQL> select THREAD#, max(SEQUENCE#) from v$archived_log group by THREAD#;
THREAD# MAX(SEQUENCE#)
---------- --------------
1 22598
2 22010
SQL> alter system switch logfile;
System altered.
SQL> select THREAD#, max(SEQUENCE#) from v$archived_log group by THREAD#;
THREAD# MAX(SEQUENCE#)
---------- --------------
1 22599
2 22010
If every thing is ok (
1.
Check DB Roles, Log Sequence, DG Status ,Alert Logs,
Open Mode on both standby and Primary)
switch over to standby again
SQL> select open_mode from gv$database;
OPEN_MODE
--------------------
READ WRITE
READ WRITE
OPEN_MODE
--------------------
READ WRITE
READ WRITE
DGMGRL> switch over to standby
Then make Previous primary to mount mode
srvctl stop database -d previousprimary
srvctl start database -d previousprimary -o mount
Confirm new DG status
DGMGRL> show configuration
Configuration - NewPrimary
Protection Mode: MaxPerformance
Databases:
imalstdby - NewPrimary
imal - EarlierPrimary(Now standby)
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS
Configuration - NewPrimary
Protection Mode: MaxPerformance
Databases:
imalstdby - NewPrimary
imal - EarlierPrimary(Now standby)
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS
Cheers !!
No comments:
Post a Comment