1. Check the Database open or not.
2.
For cold backup Archive Log mode is no need, we can do with No Archive Log mode itself.
3.
First we need to take the backup of control
file.
SQL>alter database backup controlfile to trace as ‘/opt/backup/control_file_backup.sql’
4.
Shutdown the Database.
5.
We need to create the directory structure for
TARGET like as same as SOURCE.
(In my case SOURCE db name is orcl, TARGET name is test)
6.
Copy the SOURCE pfile (/opt/oracle/admin/orcl/pfile) to TARGET (/opt/oracle/admin/test/pfile).
7.
Edit the pfile according to TARGET
8.
Copy the all .dbf, .log from SOURCE (/opt/oracle/oradata/orcl)
to TARGET (/opt/oracle/oradata/test ).
9.
Find the oracle SID,
$echo $ORACLE_SID
10.
Export the current sid to TARGET sid,
$export ORACLE_SID=test
11.
Next with the help of control file backup, we
need to create the control files for TARGET, for that we need to edit the
control file backup according to test.
$vi /opt/backup/control_file_backup.sql
(escape:%s/orcl/test/g)
(escape:%s/ORCL/TEST/g)
12.
Connect the sqlplus & startup with TARGET
database pfile & with nomount state.
$startup pfile=’/opt/oracle/admin/test/pfile/initTEST.ora’ nomount;
13.
Execute the control file,
SQL>@/opt/backup/ control_file_backup.sql
14.
Then we need to recover the Database with the
help of the control file.
recover database using backup controlfile;
15.
Apply the redo log files.
16. After
reached the current log file, it will show Media
Recovery Completed.
17.
Then open the db with resetlogs,
SQL>alter database open resetlogs;
No comments :
Post a Comment