ORACLE DATAGUARD SWITCHOVER PROCESS.
Database Administration Unit Technical Document
Purpose:
This document details the Dataguard switchover process for Co-operative Bank Oracle database
environments using Oracle Dataguard Technology.
Database Switchover
This section details the switchover procedure to take for CMS database switchover.
The database will be switched from Production server to standby server. The roles will be reversed after
successful test.
Steps:
1. Make sure each DB instance is remotely reachable (standby and primary) using the service name
configured on the listener.
2. Check that the following DB parameters are configured properly on each DB instance involved in the
switchover/switchback process:
fal_server
fal_client
local_listener
remote_listener
log_archive_config
log_archive_dest_<n>
log_archive_dest_<n>_state
standby_archive_dest
dg_broker_start
log_file_name_convert
3. Verify the standby status of both Primary and Standby:
Primary:
1
Standby:
4. Verify the logs on both sites are in sync and logs are properly applied on the standby database.
Select thread#, max (sequence#) from v$archived_log group by thread#;
5. Confirm switchover status from both sides
SQL>SELECT SWITCHOVER_STATUS FROM V$DATABASE;
6. Start the switchover process
On Primary:
SQL> alter database commit to switchover to physical standby with session shutdown;
SQL>Exit;
SQl> startup nomount
On the Standby:
SQL> alter database commit to switchover to primary;
SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY WITH SESSION SHUTDOWN;
On Primary:
SQL>alter database mount;
2
On Standby:
SQL>shutdown immediate;
SQL>alter database mount;
SQL>startup
On Primary:
SQL>alter database open;
7. Start Redo Apply on the new physical standby database.
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT
FROM SESSION;
8. Confirm the status of both primary and standby:
SQL>SELECT SWITCHOVER_STATUS FROM V$DATABASE;
SQL> select name, log_mode, open_mode,controlfile_type,switchover_status,database_role from v$database;
SQL> select name, open_mode,controlfile_type,database_role from v$database;
Considerations:
It is considered that during the switchover details are observed:
IP addresses of the database servers are not being changed i.e. production & standby servers
maintain current IP addresses and only the roles change.
Clients should ensure they point to the new primary database i.e. CMSTBY on 172.16.204.104
Database links to the databases (e.g. to standby environments) will be pointed to new standby (old
production) once switchover takes effect.
Once switchover window is complete and a switch back to the original setup is complete all clients
as well as database links should be pointed back to the primary databases.