Convert RAC Physical Standby To Snapshot Standby in RAC enviroment
Current : Standby Database with 4 node RAC enviroment
Step1 :-
Pre-requiste
- FRA
needs to be configured.
- Ensure
the ORL path exist (Online redo logs are created)
Show parameter db_recovery_files_dest
Show parameter db_recovery_file_dest_size
To Check if ORL (Online redo log path exist)
SELECT thread#, group#, sequence#, bytes, archived ,l.status,
blocksize, member FROM v$log l join v$logfile f using (GROUP#) ORDER BY
thread#, group#;
Step 2 :- Once FRA is configured
and redo log created on Standby
Stop the db using srvctl command on standby
srvctl stop database -d ORCLDR -o immediate
Startup db in mount stage
srvctl start database -d ORCLDR -o mount
srvctl status database -d ORCLDR
Confirm its mounted.
Step 3 : Connect to sqlplus and
enable flashback
Creation of guarantee restore point instead of normal
restore point
alter system set db_flashback_retention_target=1440;
create restore point before_snapshot_19c guarantee
flashback database;
select scn, storage_size, time, name from
v$restore_point;
or
Connect /as sysdba
Select status from v$instance;
Ensure it shows Mounted
alter database flashback on;
Alter system set
db_flashback_retention_target=<value> scope=both sid='*' ;
Select flashback_on from v$database ;
Select * from v$flash_recovery_area_size ;
Select * from v$restore_point ;
Step 4 :- Shutdown the db and
startup in mount stage
srvctl stop database -d ORCLDR -o immediate
srvctl status database -d ORCLDR
srvctl start database -d ORCLDR -o mount
srvctl status database -d ORCLDR
Ensure the instance is mounted
Step 5 :- Connect to sqlplus and
convert to Snapshot standby
Connect /as sysdba
Select status from v$instance ; ===>
Should show Mounted
Alter database convert to Snapshot standby ;
Alter database open ;
Once done
Select database_role,controlfile_type from v$database ;
Step 6 :- Restart the entire db if
required
srvctl stop database -d ORCLDR -o immediate
srvctl status database -d ORCLDR
Start the db (Both instance using srvctl)
srvctl start database -d ORCLDR -o open
------------------Revert Back---------------------------
##once app testing is completed and confirmed by apps team
##shutdown DR , restart it in mount stage and convert to
physical standby
srvctl stop database -d ORCLDR -o immediate
srvctl start database -d ORCLDR -o mount
alter database convert to physical
standby;
srvctl stop database -d ORCLDR -o immediate
srvctl start database -d ORCLDR
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT
FROM SESSION.
alter database flashback off;
or
drop RESTORE POINT before_snapshot_19c;
Monitor
DC -DR sync progress.
No comments:
Post a Comment