Restore RMAN cold backup to different node

No GoodNeed ImprovementOKGoodExcellent (No Ratings Yet)
Loading ... Loading ...

The following steps are required:

1. Backup production database using the following RMAN script

run
{
# Shutdown database for backups and put into MOUNT mode
resync catalog;
DELETE noprompt backup completed before ’sysdate-7′;
delete noprompt obsolete;
sql ‘alter system switch logfile’;
sql ‘alter system archive log current’;
delete FORCE NOPROMPT BACKUPSET TAG =’full_cold’;
shutdown immediate;
startup nomount ;
sql ‘alter database mount’;
# Allocate channel. Important: This must be done after
# database has been mounted!!!
# Perform full database backup

allocate channel ch1 device type disk format ‘G:\Costpoint_cold_backup\%d_%U.FULL’;
allocate channel ch2 device type disk format ‘G:\Costpoint_cold_backup\%d_%U.FULL’;

backup full tag full_cold filesperset 1 (database include current controlfile NOEXCLUDE);

# Open database after backup complete
backup current controlfile FORMAT ‘G:\Costpoint_cold_backup\control.ctl’;
sql ‘alter database open’;
#backup current controlfile FORMAT ‘G:\Costpoint_cold_backup\control.ctl’;
#BACKUP SPFILE;
#BACKUP VALIDATE DATABASE ARCHIVELOG ALL
release channel ch1;
release channel ch2;
}
exit;

2. Create RMAN catalog

windows batch file recreate_rma_catalog.bat

c:
cd C:\Oracle\job\siitstandby
sqlplus /nolog @recreate_rman_catalog.sql
imp userid=catsiit/catsiit@rman file=P:\Rman\exp\rmansiit_exp_Sat.dmp fromuser=rmansiit touser=catsiit LOG=C:\Oracle\job\siitstadby_log\%date:~10,4%_%date:~4,2%_%date:~7,2%_catsiit_imp_log.txt

recreate_rman_catalog.sql

connect sys/sii@rman as sysdba
rem create tablespace rmancatalog datafile ‘P:\Rman\oradata\rmancatalog.dbf’ size 50m;
drop user catsiit cascade;
create user catsiit identified by catsiit
temporary tablespace temp
default tablespace rmancatalog
quota unlimited on rmancatalog;
grant recovery_catalog_owner, connect, resource to catsiit;
exit;

3. Startup nomount the database using SQLPLUS

SQL> startup nomount pfile=C:\Oracle\job\siitstandby\initSIIT_primary_19.ora
Total System Global Area 1611738096 bytes
Fixed Size 457712 bytes
Variable Size 536870912 bytes
Database Buffers 1073741824 bytes
Redo Buffers 667648 bytes

4. Connect to RMAN catalog

rman catalog catsiit/catsiit@rman target sys/change_prosiit@siitsb log=C:\Oracle\job\siitstadby_log\%date:~10,4%_%date:~4,2%_%date:~7,2%_log.txt

RMAN LIST BACKUP tag=full_cold;

Check the log file to see if all necessary files are present.

5. Mount network drive G (pointing to P:\Backups\Costpoint\Production).

Popularity: 2%

Pages: 1 2

Leave a Comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word