You are on page 1of 8

21C Standby Creation RAC to Non RAC single instance

Current database configuration with pdbs list

First, we need to set our database to archive log mode.

If archive log not enabled , then follow the steps to enable.

1.) Shutdown database


2.) Startup mount
3.) Alter database archivelog;
4.) Alter database open;
5.) Archive log list → to check the status

If DB is RAC , then follow the steps

1.) Srvctl stop db -dbname


2.) Srvctl start db -dbname -o mount
3.) Alter database archvielog;
4.) Srvctl stop db -d dbname
5.) Srvctl start db -d dbname
Verify Archive log status enabled and then enable force logging and switch logfile.

We need to add standby redo logs for future switchover.

Current redo log configuration.

Select b.thread#,a.group#,a.member, b.bytes/1024/1024 “mb” from v$logfile a , v$log b where


a.group#=b.group#;

We need to follow the following formula to make sure we have sufficient standby redo logs.

(Max no of redo log per thread +1 ) if RAC *2

Enable flashback
The complete list of log file after standby creation is as follows

DB name and DB unique name

Set stanby file management to AUTO


TNSNames.ora configuration

PRIMARY

Listener on primary

TNS on Standby
Listner on Standby

Create password file on primary and copy it to dbs location of standby node

orapwd file= /u01/app/oracle/product/21.3.0.0/dbhome_1/dbs/orapwORAPRD password=oracle123


entries=10

scp = /u01/app/oracle/product/21.3.0.0/dbhome_1/dbs/orapwORAPRD 192.168.0.101:


/opt/oracle/product/21c/dbhome_1/dbs/

Create init file in standby node and startup instance

Startup in nomount stage using the initfile created

Create the requisite folder structure on standby


mkdir -p /u01/app/oracle/oradata/ORAPRD_stby/
mkdir -p /u01/app/oracle/oradata/ORAPRD/pdbseed/
mkdir -p /u01/app/oracle/oradata/ORAPRD/pdb/
mkdir -p /u01/app/oracle/fast_recovery_area
mkdir -p /u01/app/oracle/admin/ORAPRD_stby/adump/
Connect to RMAN on primary

rman TARGET sys/oracle123@ORAPRD AUXILIARY sys/oracle123@ORAPRD_stby

run

duplicate target database for standby from active database

spfile

parameter_value_convert 'ORAPRD','ORAPRD_stby'

set db_name='ORAPRD'

set db_unique_name='ORAPRD_stby'

set diagnostic_dest='/u01/app/oracle/admin/ORAPRD_stby/adump/'

set db_file_name_convert='+DATA/ORAPRD/','/u01/app/oracle/oradata/ORAPRD'

set log_file_name_convert='+DATA/ORAPRD/','/u01/app/oracle/oradata/ORAPRD'

set control_files='/u01/app/oracle/oradata/ORAPRD_stby/standby1.ctl'

set log_archive_max_processes='5'

set fal_client='ORAPRD_stby'

set fal_server='ORAPRD'

set sga_target='1152m'

set pga_aggregate_target='384m'

set standby_file_management='AUTO'

set log_archive_config='dg_config=(ORAPRD,ORAPRD_stby)'

nofilenamecheck;

}
Verify the logs and check if there are any errors.

If everything looks clean then start the apply process on standby


Connect to Primary and check the current log and switch a few logfiles to verify the shipping of logs

Primary

Standby

The primary and standby are in complete sync.

You might also like