Oracle DR solution using Cold Backup
Summary: As a part of DR activity, we need to stop Production Database running on production server and take cold user managed backup of database (copy of current datafiles, control files and
redo log files) in Local backup location
Later copy/transfer those production database files backup from
production server to DR server (DR-EASYSERVER).
On DR server, stop DR database and rename existing database file folder.
And check available free space on drive and copy those production
database files backup which was taken from production server to datafile location (E:\ORACLE\ORADATA)
and start DR database
And reverse steps during switch back activity
Current Configuration
Details of Server at DC Site |
|
Database Server IP |
10.1.16.186 |
Hostname |
PROD_EASYSERVER |
Oracle Home |
D:\Oracle |
Database Name |
EASYDB |
Details of Server at DR Site |
|
Database Server IP |
10.15.20.15 |
Hostname |
DR-EASYSERVER |
Oracle Home |
D:\Oracle |
Database Name |
EASYDR |
Details Steps
Pre-Check
----------------
1)
Take Detail as part of pre-check
SET ORACLE_SID=EASYDB
SET
ORACLE_HOME=d:\oracle\product\12.1.0\dbhome_2
SET PATH=d:\oracle\product\12.1.0\dbhome_2\bin;d:\oracle\product\12.1.0\dbhome_2\opatch;%PATH%
sqlplus sys@EASYDB as sysdba
check Database Details
SQL> select
name,open_mode,database_role from v$database;
SQL> select host_name from v$instance;
SQL> select sum(bytes)/1024/1024/1024
"Total DB size in GB" from dba_data_files;
SQL> select sum(bytes/1024/1024/1024)
tbspc_gb from dba_temp_files;
SQL> select count(1) from
dba_data_files;
SQL> col value for a50
SQL> sho parameter spfile
select NAME " DATA FILE " from
V$datafile order by 1;
select name " Controlfile " from
V$controlfile order by 1;
select MEMBER " LOGFILE " from
v$logfile order by 1;
select name " TEMPFILE " from
v$tempfile order by 1;
archive log list
ALTER SESSION SET nls_date_format =
'DD-MON-YYYY HH24:MI:SS';
select sysdate from dual;
sqlplus sys@EASYDB as sysdba
SQL*Plus: Release 12.1.0.2.0
Production on Fri Dec 9 19:51:20 2022
Copyright (c) 1982, 2014,
Oracle. All rights reserved.
Connected to:
Oracle Database 12c Standard Edition Release 12.1.0.2.0 - 64bit Production
SQL> archive log list
Database log
mode
Archive Mode
Automatic
archival
Enabled
Archive
destination
D:\app\product\12.1.0\dbhome_2\RDBMS
Oldest online log sequence 9233
Next log sequence to archive 9235
Current log
sequence 9235
Take backup of pfile and control file
SQL>create pfile='d:\initEASYDB.ora'
from spfile;
SQL>alter database backup controlfile to
trace as ' d:\EASYDB_control.sql';
Implementation
-------------------------
1)
Stop database and window services
SQL>Shutdown database
2)
Copy db file to local backup location ( d:\)
3)
Transfer db files from local backup location to
DR server (D drive) as below
4)
Shutdown DR database on DR server (DR-EASYSERVER)
Shut immediate
Rename old exiting DR DB file folder
5)
Copy
backup and started database and
window service on DR server
Copy DC DB files (which was transferred from DC server ) to the location
where DR DB was residing (E:\ORACLE\ORADATA)
6)
Start DR database and inform application Team
No comments:
Post a Comment