Rechercher dans ce blog

lundi 16 septembre 2013

snapshot standby test DR

snapshot standby test DR


1         Introduction :

Pour   faire les  test  DR  de ARDIX   on  a   besoin  d  isoler  d  un point  de  vue  reseau  les  serveur  de  standby.

On  va  passer la standby   de  physical  standby  a snapshot standby afin de pourvoir revenir en arrière sans avoir a reconstruire la standby.

Nomenclature :
 Primaire= PRDCRS = mtl04/mtl05 = Production= PROD
Standby = DRPRDCRS= dr-mtl04/dr-mtl05 = DR=DRP

2         IP des serveurs :

2.1      PROD T4 (Molson) :

network identity
IP
defined name
adresse host 1
10.81.25.16
mtl04
private1
192.168.10.14

adresse vip1
10.81.25.14
prd104-vip



adress host 2
10.81.25.12
mtl05
private2
192.168.10.15

adresse vip2
10.81.25.15
prd105-vip



scan vip1
10.81.25.19
PRD
scan vip2
10.81.25.17
PRD
scan vip3
10.81.25.18
PRD

2.2      StandbyT4 (LP) :

network identity
IP
defined name
adresse host 1
10.50.99.16
drp-mtl04
private1
192.168.10.14

adresse vip1
10.50.99.21
drp104-vip



adress host 2
10.50.99.13
drp-mtl05
private2
192.168.10.15

adresse vip2
10.50.99.24
drp105-vip



scan vip1
10.50.99.35
DRPPRD
scan vip2
10.50.99.36
DRPPRD
scan vip3
10.50.99.37
DRPPRD

3         Snapshot standby définition : 

A snapshot standby database can be opened in read-write mode and is fully updatable.
A snapshot standby database has the following characteristics:
·        A snapshot standby database cannot be the target of a switchover or failover. A snapshot standby database must first be converted back into a physical standby database before performing a role transition to it.
·        A snapshot standby database cannot be the only standby database in a Maximum Protection Data Guard configuration.
Note:
Flashback Database is used to convert a snapshot standby database back into a physical standby database. Any operation that cannot be reversed using Flashback Database technology will prevent a snapshot standby from being converted back to a physical standby.

4         Actions pour passer en snapshot  standby:


serveur
action
commandes
duree
PROD
modif de  parametrages
 alter  system  set  log_archive_dest_3='LOCATION=/dblogs/ARDPRD'  scope=both  sid='*';

PROD
backup  des  archives

30
PROD
modification RMAN
connection  catalog :
CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 1 TIMES TO 'SBT_TAPE';
backup archivelog like '+FRA%' delete input;

PROD
crontab commenter les scripts de  backup
40 7 * * * /appl/oracle/BIN/backup_db.ksh  1> /appl/oracle/LOG/bakdata.log 2>&1
44 3,5,8,11,14,17,20,22,23 * * * /appl/oracle/BIN/backup_archivelog.ksh  1> /appl/oracle/LOG/bakarch.log 2>&1

PROD
crontab  script de  backup  pour DR
activer les  scripts de  backup pour DR
#44 3,5,8,11,14,17,20,22,23 * * * /appl/oracle/BIN/DR/backup_archivelog.ksh  1> /appl/oracle/LOG/bakarch.log 2>&1
#40 7 * * * /appl/oracle/BIN/DR/backup_db.ksh  1> /appl/oracle/LOG/bakdata.log 2>&1

PROD
modification de  parameterages
Alter system set dg_broker_start=false scope=both sid=’*’;
4
PROD
modification de  parameterages
 alter  system  set  log_archive_dest_state_2='defer'  scope=both sid='*';

DRP
modification de  parameterages
Alter system set dg_broker_start=false scope=both sid=’*’;
4
DRP
arreter le recover managed
alter database recover managed standby database cancel;
4
DRP
activer le flashback
alter database flashback on;

DRP
crontab  commenter les   scripts de  la crontab
purge des  archives  rman  +  monitoring


manip  system  et  reseau


DRP
arreter les  2  nodes
Srvtl stop database -d DRARDPRD

DRP
start  instance DRP-mt05
Srvctl start instance -d DRAARDPRD –i DRARDPRD2 –o mount

DRP
Passer l imstance  en  mode  snapshot
alter database convert to snapshot  standby;

DRP
arreter les  2  nodes
Srvtl stop database -d DRARDPRD

DRP
demarrer les  2  nodes
Srvtl start database -d DRARDPRD

DRP
demarrer  les  services
srvctl   start  service - d DRARDPRD


5         Action   pour  revenir  en  arrière :

DRP
arreter les  2  nodes
Srvtl stop database -d DRARDPRD

DRP
start  instance DRP-mt05
Srvctl start instance -d DRAARDPRD –i DRARDPRD2 –o mount

DRP
Passer l imstance  en  mode  physical   standby
alter database convert to  physical standby;
20
DRP
desactiver le flashback
alter database flashback off;

DRP
arreter   l  instance 
Srvctl stop instance -d DRAARDPRD –i DRARDPRD2

manip  reseaux



DRP
start   database
srvctl   start   database   -d DRARDPRD

DRP
demarrer  le  recover managed
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM session;

DRP
crontab  decommenter les   scripts de  la crontab


DRP
attendre  la resynchro de  de la dataguard

300
PROD
modification de  parameterages
alter  system  set  log_archive_dest_state_2='enable'  scope=both sid='*';

PROD
modification de  parameterages
alter  system  set  log_archive_dest_state_3='defer'  scope=both sid='*';

PROD
modification RMAN
connection  catalog :
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY;

PROD
crontab decommenter les scripts de  backup
40 7 * * * /appl/oracle/BIN/backup_db.ksh  1> /appl/oracle/LOG/bakdata.log 2>&1
44 3,5,8,11,14,17,20,22,23 * * * /appl/oracle/BIN/backup_archivelog.ksh  1> /appl/oracle/LOG/bakarch.log 2>&1

PROD
crontab  commenter les   scripts de  backup  pour DR
activer les  scripts de  backup pour DR
#44 3,5,8,11,14,17,20,22,23 * * * /appl/oracle/BIN/DR/backup_archivelog.ksh  1> /appl/oracle/LOG/bakarch.log 2>&1
#40 7 * * * /appl/oracle/BIN/DR/backup_db.ksh  1> /appl/oracle/LOG/bakdata.log 2>&1

PROD
modification de  parameterages
Alter system set dg_broker_start=true scope=both sid=’*’;

DRP
modification de  parameterages
Alter system set dg_broker_start=true scope=both sid=’*’;