Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Steps to clone database in other server with restore daily

Me_101Jul 30 2012 — edited Aug 4 2012
Hi,

I think i know what is the steps but need a guru that give me the ok.

I have been asked to perform a clone database (11.2.0.3 with ASM) in another server. The original database (call PROD) has full backup everyday that it automatically (with crontab and a script i guess) restore the second database. The problem i see its that the original database is a RAC (2 nodes) but the second database is standalone (call TEST)

I think the steps are:

1) create a standalone database in second server with same number of diskgroups and same directories
2) copy full backup to TEST server.
3) duplicate with rman:

connect auxiliary sys/password@TEST
connect target /
startup auxiliary nomount;
run {
allocate auxiliary channel ch1 type disk;
duplicate target database to 'TEST' nofilenamecheck;
release channel ch1;
}

4) copy PFILE from PROD and modify (like standalone database) at TEST
5) startup nomount; --test database
6) restore controlfile from '< backup piece name of controlfile auto backup copied in step 2>'; --at test database
7) alter database mount; --test database
8) recover, restore from full backup and open database-->
run {
allocate channel d1 device type disk format ' <path of the copied backup in step 2 >';
set until sequence < sequence> thread < thread# >;
restore database;
recover database;
}

SQL> alter database open resetlogs;

9) like its a backup that has 2 undo tablespaces, should i drop 1?:
SQL> drop tablespace UNDOTBS2 including contents and datafiles;

All this steps at first time, are they right?, to do it automatically in the script i should use 2) 5) 6) 7) 8)?

-- like the databases names are different, should i have any problem when restore de controlfile? if yes, how to avoid it?

Thanks in advance and sorry for the inconveniences

Edited by: Me_101 on 30-jul-2012 5:46
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 1 2012
Added on Jul 30 2012
17 comments
4,414 views