Monday, November 21, 2011

11g Clone - Caution! Do NOT run manual restore commands after failed 11g duplicate

In previous versions (10g or 9i)  we used to run manual commands if something goes wrong during  RMAN duplicate restore. For example:

SQL > Alter database open resetlogs
or
SQL > recover database until cancel;

In 11g this process runs differently and you should never run manual commands if you trying to clone production DB on same server.The reason is that during 11g duplication RMAN rename the auxiliary instance name same as target instance and it may overwrite you logfiles if you try to open database with resetlog option.

Here are the steps 11g RMAN follows during 11g duplication. Please look into my blog http://vkoracle.blogspot.com/2010/11/duplicate-10gr2-rac-database-instances.html
 on database duplication.

1.Set the clone instance name same as target instance name.

2. Restore database.

3. recover database.

4. Set the instance name to new clone Instance name.

5. Open database with resetlogs.



Solution: Run 11g duplicate command again and it will resume from point of failure.

If you run into some problems then fix the problem and run the clone commands again and 11g will resume from point of failure.