meta données pour cette page
DATAGUARD RAC
création DB
odacli create-database --cdb --dbname C1DEVOPS --dbhomeid 821c63c9-d1c6-4501-91a7-fb8591fb6935 --dbshape odb2 -cl OLTP --pdbname MDLPDB1 --databaseUniqueName C1DEVOPSDR
oratab sur les deux noeuds
⇒ irisdevprea
C1DEVOPSDR1:/u01/app/odaorahome/oracle/product/19.0.0.0/dbhome_1:N #
⇒ irisdevpreb
C1DEVOPSDR2:/u01/app/odaorahome/oracle/product/19.0.0.0/dbhome_1:N #
# ⇒ suppression PDB et redémarrage en nomount
[oracle@irisdevprea ~]$ srvctl status database -d C1DEVOPSDR Instance C1DEVOPS1 is running on node irisdevprea Instance C1DEVOPS2 is running on node irisdevpreb srvctl stop database -d C1DEVOPSDR asmcmd ls */C1DEVOPSDR +DATA/C1DEVOPSDR/: 0BE03207E6CAB5ABE0635404F40A6DD6/ 15BBD729E64D2089E0630469D5B4DE6A/ 15BBF80E614E5810E0630469D5B45736/ DATAFILE/ PARAMETERFILE/ PASSWORD/ TEMPFILE/ arc10/ +RECO/C1DEVOPSDR/: ARCHIVELOG/ AUTOBACKUP/ CONTROLFILE/ +REDO/C1DEVOPSDR/: CONTROLFILE/ ONLINELOG/ asmcmd rm -rf +DATA/C1DEVOPSDR/0BE03207E6CAB5ABE0635404F40A6DD6/ +DATA/C1DEVOPSDR/15BBD729E64D2089E0630469D5B4DE6A/ +DATA/C1DEVOPSDR/15BBF80E614E5810E0630469D5B45736/ +DATA/C1DEVOPSDR/DATAFILE/ +DATA/C1DEVOPSDR/TEMPFILE/ +DATA/C1DEVOPSDR/arc10/ +RECO/C1DEVOPSDR/ARCHIVELOG/ +RECO/C1DEVOPSDR/AUTOBACKUP/ +RECO/C1DEVOPSDR/CONTROLFILE/ +RECO/C1DEVOPSDR/ONLINELOG/
–> on démarre que sur un seul noeud
srvctl start instance -d C1DEVOPSDR -node irisdevprea -o nomount [oracle@irisdevprea ~]$ srvctl status database -d C1DEVOPSDR Instance C1DEVOPS1 is running on node irisdevprea Instance C1DEVOPS2 is not running on node irisdevpreb
# TNS
S1DEVOPS = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = enyodevpre.corp.sch.ch)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (UR = A) (SERVICE_NAME = S1DEVOPS.corp.sch.ch) ) ) C1DEVOPSDR = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = irisdevpre.corp.sch.ch)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (UR = A) (SERVICE_NAME = C1DEVOPSDR.corp.sch.ch) ) )
- activation DG Broker et STDY redolog
set lines 300 col member format A60 SELECT group#, type, member FROM v$logfile order by group#; -> primaire alter system set dg_broker_start=false SCOPE=BOTH sid='*'; alter system set dg_broker_config_file1='+DATA/S1DEVOPS/DATAGUARDCONFIG/dr1C1DEVOPS.dat' SCOPE=BOTH sid='*'; alter system set dg_broker_config_file2='+DATA/S1DEVOPS/DATAGUARDCONFIG/dr2C1DEVOPS.dat' SCOPE=BOTH sid='*'; alter system set dg_broker_start=true SCOPE=BOTH sid='*'; alter database add standby logfile thread 1 size 2096m; alter database add standby logfile thread 1 size 2096m; alter database add standby logfile thread 2 size 2096m; alter database add standby logfile thread 2 size 2096m; -> STDY alter system set dg_broker_start=false SCOPE=BOTH sid='*'; alter system set dg_broker_config_file1='+DATA/C1DEVOPSDR/DATAGUARDCONFIG/dr1C1DEVOPS.dat' SCOPE=BOTH sid='*'; alter system set dg_broker_config_file2='+DATA/C1DEVOPSDR/DATAGUARDCONFIG/dr2C1DEVOPS.dat' SCOPE=BOTH sid='*'; alter system set dg_broker_start=true SCOPE=BOTH sid='*';
- RMAN duplicate
rman target sys/xxxxxx@S1DEVOPS connect auxiliary sys/xxxxxx@C1DEVOPSDR run { allocate channel c1 type disk; allocate channel c2 type disk; allocate channel c3 type disk; allocate channel c4 type disk; allocate channel c5 type disk; allocate channel c6 type disk; allocate channel c7 type disk; allocate channel c8 type disk; allocate auxiliary channel t1 type disk; allocate auxiliary channel t2 type disk; allocate auxiliary channel t3 type disk; allocate auxiliary channel t4 type disk; allocate auxiliary channel t5 type disk; allocate auxiliary channel t6 type disk; allocate auxiliary channel t7 type disk; allocate auxiliary channel t8 type disk; duplicate target database for standby from active database nofilenamecheck dorecover; }
# Demarrage instance STDY 2
srvctl start instance -d C1DEVOPSDR -node irisdevpreb -o mount
# ⇒ creation Dataguard – PRIMARY
dgmgrl /
CREATE CONFIGURATION DG_C1DEVOPS AS PRIMARY DATABASE IS S1DEVOPS CONNECT IDENTIFIER IS S1DEVOPS;
ADD DATABASE C1DEVOPSDR AS CONNECT IDENTIFIER IS C1DEVOPSDR MAINTAINED AS PHYSICAL;
ENABLE CONFIGURATION;
ENABLE DATABASE C1DEVOPSDR;
# Paramétrage supplémentaire (sur 2 noeuds)
alter system set standby_file_management=AUTO scope=both sid='*';