Professional Documents
Culture Documents
Copy RMAN backup files including archive log backup files to the target server
Copy the SNAPSHOT CONTROL FILE or backed up control file from source server to
target server.
If you do not remember the snapshot control file location, connect to source rman
and query “snapshot controlfile name” and it will give as below:
Source Server:
Rman>connect target /
connected to target database: HRDMO (DBID=209403493034)
RMAN> show SNAPSHOT CONTROLFILE NAME;
using target database control file instead of recovery catalog
RMAN configuration parameters are:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/opt/oracle/10g/dbs/snapcf_HRDMO.f'; #
default
Copy the snapshot controlfile to your target server or the backup of control file.
NOTE: You need to have same directories created for the restoration of files and
the RMAN backup files, including archive log backup and they should be in the same
structure as it is in source server. If you don’t have exactly same file system
just create soft links to cheat.
Target Server:
Export ORACLE_SID=HRDMO
RMAN
RMAN>startupnomount;
RMAN>setDBID=209403493034;
executingcommand:SETDBID
RMAN> restore controlfile from '/opt/oracle/standby/dbs/snapcf_crmprod.f'; # The
location where you have it in target srvr.
Starting restore at 06-FEB-08 using channel ORA_DISK_1
channel ORA_DISK_1: copied controlfile copy
replicating controlfile
input filename=/db1/oradata/HRDMO/control01.ctl
output filename=/db2/oradata/HRDMO/control02.ctl
output filename=/db3/oradata/HRDMO/control03.ctl
Finished restore at 06-FEB-08
RMAN>alterdatabasemount;
RMAN>run
2>{
3>sql'altersessionset NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"';
4>setuntil time'2008-01-31 01:00:00';
5>restoredatabase;
6>recoverdatabase;
7> }
RMAN>alter database open resetlogs;
You have the copy of instance in the target server.
Try it out and if you have any issues, comment here we can fix it.
$ rman target /
OR
RMAN> run
2> {
3> set until time'04-MAR-09 12:44:29';
rman>recover database;
What will happen, if you don’t have Valid Backup? There is a Workaround via which
you can at least recover your Database to some extent:
SQL> select * from v$log;
SQL> alter system set “_allow_resetlogs_corruption”=true scope=spfile;
SQL> shutdown immediate;
SQL> startup mount;
SQL> recover database using backup controlfile until cancel;
SQL> alter database open resetlogs;
SQL> shutdown immediate;
SQL> startup