DR Dril Steps
DR Dril Steps
2. Media Recovery Process (MRP) is active on STANDBY and in sync with PRIMARY
database
Standby :- fal_server=primary
fal_client = standby
6. Also check the connectivity from DR to production using TNS entry mentioned in
log_archive_dest_2 parameter.
Pre- Req
Ensure BCV is complete.
###################################################################################
#######################
Implementation Plan:
###################################################################################
#######################
MOCK DR DRILL
On Primay:
=============
!date;hostname
1)Check whether managed recovery is running on the standby database
!date;hostname
select process,status,thread#,sequence# from v$managed_standby;
2)At primary site check the max archive log sequence that is generated
!date;hostname
select inst_id,max(sequence#) from gv$archived_log group by inst_id;
select thread#,max(sequence#) from v$archived_log group by thread#;
5) Verify whether all datafiles are online prior to swithover on both primary and
standby database
shut immediate;
startup;
!date;hostname
select switchover_status from v$database;
!date;hostname
alter database commit to switchover to primary with session shutdown;
14) Reset the job_queue_processes parameter to its original value in new primary
database(DR site)
alter system set job_queue_processes=100 scope=both;
!date;hostname
SWITCHBAK
1)
!date;hostname
select process,status,sequence# from v$managed_standby;
set lines 200 pages 50000
select PROCESS,PID,STATUS,CLIENT_PROCESS,THREAD#,SEQUENCE#,BLOCKS from
v$managed_standby where process like 'MRP%';
2)
!date;hostname
select inst_id,max(sequence#) from gv$archived_log group by inst_id;
select thread#,max(sequence#) from v$archived_log group by thread#;
3)
!date;hostname
select max(sequence#) from v$archived_log where applied='YES';
select thread#,max(sequence#) from v$archived_log where applied='YES' group by
thread#;
4)
!date;hostname
select * from dba_jobs_running;
Shutdown immediate;
startup
!date;hostname
alter database commit to switchover to physical standby with session shutdown;
shut abort;
startup mount;
Orig Primary
!date;hostname
alter database commit to switchover to primary with session shutdown;
alter database open;
!date;hostname
Orig DR
###################################################################################
###################################################################################
Primary:
DR:
=============================================================================
=> Convert To SNAPSHOT Standby:
SHUT IMMEDIATE;
STARTUP MOUNT;
ALTER DATABASE CONVERT TO PHYSICAL STANDBY;
SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
alter database flashback off;
ALTER DATABASE OPEN read only;
RECOVER MANAGED STANDBY DATABASE DISCONNECT from SESSION ;
SELECT flashback_on FROM v$database;
select inst_id, name, opne_mode, guard_status, database_role from gv$database;
+++++++
+================================================================================
Script to collect Diagnostic Information in a Dataguard Environment
On Primary -->
set linesize 300
set pages 70
col name for a30
col value for a60
col message for a90
col destination for a35
col dest_name for a40
select name,value from gv$parameter where name in
('db_name','db_unique_name','db_domain','db_file_name_convert','log_file_name_conve
rt','fal_server','fal_client','remote_login_passwordfile',
'standby_file_management','dg_broker_start','dg_broker_config_file1','dg_broker_con
fig_file2');
select
status,instance_name,database_role,open_mode,protection_mode,switchover_status from
gv$instance,gv$database;
select name,(space_limit/1024/1024/1024) "Limit in GB",(space_used/1024/1024/1024)
"Used in GB" from v$recovery_file_dest;
select thread#,max(sequence#) from gv$archived_log group by thread#;
select inst_id,dest_id, dest_name, status, target, archiver , destination from
GV$ARCHIVE_DEST where destination IS NOT NULL;
select * from (select severity,error_code,message,to_char(timestamp,'DD-MON-YYYY
HH24:MI:SS') from v$dataguard_status where dest_id=2 order by rownum DESC) where
rownum <= 7;
select group#,thread#,status,members,(bytes/1024/1024)"Each ORL File Size in MB"
from gv$log;
select group#,thread#,status,(bytes/1024/1024)"Each SRL File Size in MB" from
gv$standby_log;
On StandBy ---->
set linesize 300
set pages 70
col name for a30
col value for a60
col message for a90
col destination for a35
col dest_name for a40
select name,value from gv$parameter where name in
('db_name','db_unique_name','db_domain','db_file_name_convert','log_file_name_conve
rt','fal_server','fal_client','remote_login_passwordfile','standby_file_management'
,'dg_broker_start','dg_broker_config_file1','dg_broker_config_file2');
select
status,instance_name,database_role,open_mode,protection_mode,switchover_status from
gv$instance,gv$database;
select name,(space_limit/1024/1024/1024) "Limit in GB",(space_used/1024/1024/1024)
"Used in GB" from v$recovery_file_dest;
select thread#,max(sequence#) from gv$archived_log group by thread#;
select thread#,max(sequence#) from gv$archived_log where applied='YES' group by
thread#;
select dest_id, dest_name, status, target, archiver , destination from
GV$ARCHIVE_DEST where destination IS NOT NULL;
select inst_id,process,status,sequence#,thread#,client_process from
gv$managed_standby;
select group#,thread#,status,members,(bytes/1024/1024)"Each ORL File Size in MB"
from gv$log;
select group#,thread#,status,(bytes/1024/1024)"Each SRL File Size in MB" from
gv$standby_log;