PREREQUISITES
Close any gap.
If it is possible, review standby synchronization at least one day and few hours before the execution of these procedures. Any gap, even if it won’t prevent the success of database movement, may delay procedure execution.
Review OEM targets blackout.
Inside OEM Cloud Control 12c, is necessary to be sure that blackout has been set to primery_server and stanby_server targets. This will help us preventing fake alerts or notifications from Monitoring System.
Note: After DR Drill exercise is completed, these blackouts need to be removed.
Set freeze to DB clusters.
Ask Unix team to perform this task for both environments (primery_server and stanby_server)./* this step is only applicable when if database is running on cluster */
Stop DB backups.
Edit crontab and comment all lines referring to DB backups.
Note: After DR Drill exercise is completed, edit crontab again and uncomment the lines you commented. Do not forget, those are critical maintenance scripts.
Stop any other maintenance job in crontab
Edit crontab and comment all other jobs at both servers. After DR Drill exercise, comment at Standby those jobs that must run only against Primary.
== if jobs are scheduled through autosys or oem make sure all the jobs are freezed during switchover period
SWITCHOVER PROD TO stanby
Step 1: Take incremental database backup. TARGET: (primary).
Step 2: Verify Data Guard replication state. TARGET: (primary).
Step 3: Verify NO database user connections, kill them if any. TARGET: (primary)
Step 4: Turn OFF database flashback. TARGET: (standby)
sqlplus / as sysdba
SQL> ALTER DATABASE FLASHBACK OFF;
SQL> SELECT FLASHBACK_ON FROM V$DATABASE;
Step 5: Review database state using Data Guard Broker. TARGET: (primary).
Look for:
Database Status = SUCCESS
Transport Lag = 0 seconds
Apply Lag= 0 seconds
dgmgrl
DGMGRL> connect sys/<sys_password>@ora_servername_dbname
DGMGRL> show database verbose 'ora_servername_dbname';
DGMGRL> show database verbose 'ora_servername_dbname';
Step 6: Perform Switchover using DG Broker. TARGET: (primary)
dgmgrl
DGMGRL> connect sys/<sys_password>@ora_servername_dbname
DGMGRL> switchover to 'ora_servername_dbname';
Step 7: Turn ON database Flashback, enable Active Data Guard. TARGET: (new standby)
--7A.- Disable Apply Process
dgmgrl
DGMGRL> connect sys/<sys_password>@ora_servername_dbname
DGMGRL> edit database 'ora_servername_dbname' set state ='LOG-APPLY-OFF';
--7B.- Enable Flashback and Active Data Guard
sqlplus / as sysdba
SQL> ALTER DATABASE FLASHBACK ON;
SQL> SELECT FLASHBACK_ON FROM V$DATABASE;
SQL> ALTER DATABASE OPEN READ ONLY;
--7C.- Enable Apply Process
dgmgrl
DGMGRL> connect sys/<sys_password>@ora_servername_dbname
DGMGRL> edit database 'ora_servername_dbname' set state ='ONLINE';
Step 8: Verify database state using sqlplus. TARGET: (new primary)
Look for:
Delta = 1
FlashBackOption = NO
Role = PRIMARY
sqlplus / as sysdba
@dg_state.sql /* one can check manually if dont have the script */
Step 9: Review database state using DG Broker. TARGET: (new standby)
Look for:
Database Status = SUCCESS
Transport Lag = 0 seconds
Apply Lag = 0 seconds
Real Time Query = ON
dgmgrl
DGMGRL> connect sys/<sys_password>@ora_servername_dbname
DGMGRL> show database verbose 'ora_servername_dbname';
DGMGRL> show database verbose 'ora_servername_dbname';
Step 10: Review database state using sqlplus. TARGET : (new standby)
Look for:
OpenMode = READ ONLY WITH APPLY
Role = PHYSICAL STANDBY
FlashBackOption = YES
FAILOVER PROD TO APE(Standby)
Note: This is for a real emergency. Perform with care, not for use on drills.
Step 1: Turn OFF database flashback. TARGET: (standby)
sqlplus / as sysdba
SQL> ALTER DATABASE FLASHBACK OFF;
SQL> SELECT FLASHBACK_ON FROM V$DATABASE;
Step 2: Perform Failover using DG Broker. TARGET: (standby)
dgmgrl
DGMGRL> connect sys/<sys_password>@ora_servername_dbname
DGMGRL> failover to 'ora_servername_dbname';
Step 3: Disable Transport Log. TARGET: (new standalone primary)
dgmgrl
DGMGRL> connect sys/<sys_password>@ora_servername_dbname
DGMGRL> EDIT DATABASE 'ora_servername_dbname' SET STATE='LOG-TRANSPORT-OFF';
SAP Grc online courses
ReplyDeleteSAP Secrity online courses
oracle sql plsql online courses
go langaunage online courses
azure online courses
java online courses
salesforce online courses