Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

DR RAC BUILD

Referred link:

https://oracledbwr.com/step-by-step-configuration-of-oracle-11gr2-two-node-rac-dataguard-setup/

FYI Memory is 90 Gb.

SGA assigned

sga_target=57982058496 --- 54 Gb

pga_aggregate_target=6442450944 --- 6 Gb

1) DB build steps.

 Take the pfile from source and modify it accordingly.

 Login to sql now

 Sql> Startup nomount pfile=’pfile location’

 Sql> !rman target /

 Restore control file. – you must have taken backup of control file.

RMAN > RESTORE STANDBY CONTROLFILE FROM '/Oraarch/Remdy_20Sep/std_mfsevde4_1_1';

 Mount the DB

RMAN > SQL 'ALTER DATABASE MOUNT STANDBY DATABASE';

 Restore the DB

For restoration the command used - https://blog.oracle-ninja.com/2015/09/01/restoring-a-database-to-a-new-


diskgroup/

run {
set newname for database to '+CRMOLTP_ASMDG';
restore database;
switch datafile all;
}
Steps to perform once the restoration is completed.

2) The DB will be mounted already now.

3) Once restore is completed run the below sql to rename the redo logs – Optional but would be good if done. The
redo log should be move to +ACFS_ARCHIVE, if already there should not be a problem

Check using
Select group#,member,status from v$logfile;

4) Shutdown the DB
Shut immediate;

5) Bring the DB to mount stage.

6) Now we have to make the DB know where the archive present are.

NEW ARCHIVED MOVED LOCATION.- All the archive after the backup was started are moved to the below
location
********************************************
/RmanDR/28augRMAN_2019/archive

Sql> !rman target /

Rman> catalog start with ‘/RmanDR/28augRMAN_2019/archive’;

Now it will list down all the archive present in the mount point type ‘YES’.

7) Now do

Rman> Recover database noredo;

8) come to sql prompt

9) we have to bring the DB to read only mode.

10) You may face the challenge for any data file during bringing the db in read only mode, in this case we have to
just take a backup of that problematic data file and again do the restoration for that data file in DR.

Note ### We need to restore the standby control file (take a fresh backup from dr) now after the restoration of
Data File.

11) Step 8-9 is has to be repeated when we are trying to bring the DB in read only mode.

12) Now once the DB has come to read only mode.

SQL> select instance_name from v$instance;


13) Shut down the database and listener add the cluster parameters in standby and convert to three node RAC data
guard.

SQL> create pfile from spfile;


File created.

SQL> shut immediate

14) Change the parameter file name

cd /oradata/rdbms/11.2.0.3/dbs

mv initMPCD.ora initMPCD1.ora

I have kept an original file at the above location please rename it.

initMPCD1.ora_COPY_6SEP

pfile_value.txt

15) Copy the new pfile to Node2 & Node3 of Standby and startup the instance in all the nodes.

Environment variable setup on node1:

export ORACLE_HOME=/oradata/rdbms/11.2.0.3
export CRS_HOME=/oradata/crs/11.2.0.3
export ORACLE_SID=MPCD1
export PATH=$ORACLE_HOME/bin:$PATH

Environment variable setup on node2:

export ORACLE_HOME=/oradata/rdbms/11.2.0.3
export CRS_HOME=/oradata/crs/11.2.0.3
export ORACLE_SID=MPCD2
export PATH=$ORACLE_HOME/bin:$PATH

Environment variable setup on node3:

export ORACLE_HOME=/oradata/rdbms/11.2.0.3
export CRS_HOME=/oradata/crs/11.2.0.3
export ORACLE_SID=MPCD3
export PATH=$ORACLE_HOME/bin:$PATH
16) Register the database instances with CRS framework using this command:

set the environment variables first

srvctl add database -d MPCD -o /oradata/rdbms/11.2.0.3 -p /oradata/rdbms/11.2.0.3/dbs/spfileMPCD1.ora

srvctl add instance -i MPCD1 -d MPCD -n crmdb-node1


srvctl add instance -i MPCD2 -d MPCD -n crmdb-node2
srvctl add instance -i MPCD3 -d MPCD -n crmdb-node3

17) Now the instances are registered with CRS, shutdown both the instance in standby and start using srvctl
command

$ srvctl start database -d MPCD -o mount


$ srvctl status database -d MPCD -f –v --- it will mounted on all 3 nodes.

18) Modify the /etc/oratab to set the env for TEST1 now

19) . oraenv

MPCD1

sqlplus / as sysdba

20) Start the in instance

SQL> select * from v$active_instances

INST_NUMBER INST_NAME

----------- -----------------
1 MPCD1
2 MPCD2
3 MPCD3

21) Start the mrp process.

Alter database recover managed standby database disconnect from session;

22) It should not wait for archive log.if it waits Provide the missing archive log from OLD DR or Production.

If the RFS is not coming up then


@Production.

set pages 12345 lines 12345

select DEST_ID,DEST_NAME,STATUS,ERROR from v$archive_dest;

for LOG_ARCHIVE_DEST_3 it should be valid.

If you get below error

ORA-01033: ORACLE initialization or shutdown in progress scp the password file form primary to dr
i) first alter system set log_archive_dest_state_3=DEFFER sid='*';
ii) scp the password file to all the nodes
iii) alter system set log_archive_dest_state_3=ENABLE sid='*';
iv) the error is gone.

If due to some other reason the RFS is not coming UP then

 first alter system set log_archive_dest_state_3=DEFFER sid='*';


 Bounce the Db on all nodes.
 alter system set log_archive_dest_state_3=ENABLE sid='*';

23) Create spfile in ASM and point it using the pfile’s in $ORACLE_HOME/dbs location of ALL the nodes in Standby
(https://www.thegeekdiary.com/how-to-move-asm-spfile-to-a-shared-device-in-rac/)

 Stop all nodes.


srvctl stop database -d MPCD

 Start any one node n mount state

 srvctl start instance -d MPCD -i MPCD1 -o mount


 srvctl status database -d MPCD –f -v

 Create spfile using below command.

SQL> create pfile from spile.


SQL> shut immediate;
SQL>create spfile='+CRMOLTP_ASMDG/MPCD/SPFILEMPCD.ora ‘ from pfile;

File created.

 Shut down the instance.

24) In Node1 & Node2 & Node3 of Standby:- add the entry or make a new pfile.

$ cat initMPCD1.ora
spfile='+CRMOLTP_ASMDG/MPCD/SPFILEMPCD.ora ‘ -- node1

$ cat initMPCD2.ora
spfile='+CRMOLTP_ASMDG/MPCD/SPFILEMPCD.ora ‘ -- node2

$ cat initMPCD3.ora
spfile='+CRMOLTP_ASMDG/MPCD/SPFILEMPCD.ora ‘ -- node 3

25) Modify the srvctl using below command.

srvctl modify database -d MPCD -o /oradata/rdbms/11.2.0.3 -p +CRMOLTP_ASMDG/MPCD/SPFILEMPCD.ora -r physical_standby -s


mount

26) Start the DB using srvctl

srvctl start database -d MPCD -o mount

We can verify the sync between Primary (Node1 & Node2 & Node3) and Standby (Node1) by switch logfile in primary and tail alert
log from OS or query the alert log from sqlplus. Here, we go with the query.

WE NEED TO CREATE STANDBY REDO LOG FILE AT PRIMARY IF WE NEED FOR SWITCH OVER AND FAILOVER.

(NEED TO CHECK)

You might also like