Database Duplication using RMAN

Questions relating to Oracle Real Application Clusters (RAC) and Clusterware.

Moderator: Tim...

Re: Database Duplication using RMAN

Postby Tim... » Mon Apr 29, 2013 8:02 am

:)
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog
Tim...
Site Admin
 
Posts: 17940
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK

Re: Database Duplication using RMAN

Postby Rijo Roy » Mon Apr 29, 2013 11:43 am

Hi Tim

As i told you , I was performing the duplication activity in one of my m/c today, everything went fine but I got an error at the end of the process.


contents of Memory Script:
{
set until scn 5984073079691;
recover
clone database
delete archivelog
;
}
executing Memory Script

executing command: SET until clause

Starting recover at 29-APR-13

starting media recovery

Oracle Error:
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/oradata/uatdb/rmantest/datafile/system.xxx.xxxxxx'

---------------------------------------------------------------------------------------------------
Also
RMAN-06025: no backup of log thread 2 seq 9454 lowscn 5984068243569 found to restore
RMAN-06025: no backup of log thread 1 seq 13810 lowscn 5984072488346 found to restore
RMAN-06025: no backup of log thread 1 seq 13809 lowscn 5984071357764 found to restore
RMAN-06025: no backup of log thread 1 seq 13808 lowscn 5984068243566 found to restore

I tried to recover the database with some new archive log files and I recovered the seq upto 9454 which is of log thread 2.

But I failed for 13810 as it is asking for a particular seq 13700.

What should I do in this case. the particular scn 13700 should be present in the backup files with which I did the duplication.

Pls guide me.


Thanks & Regards

Rijo Roy
Rijo Roy
Member
 
Posts: 35
Joined: Wed Apr 17, 2013 5:39 am

Re: Database Duplication using RMAN

Postby Tim... » Mon Apr 29, 2013 3:35 pm

Hi.

Well, the errors speak for themselves. You don't have the correct backups available to complete the requested operation. make those backups available and it will work. Is it possible you have the backups you want, but have specified the wrong SCN?

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog
Tim...
Site Admin
 
Posts: 17940
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK

Re: Database Duplication using RMAN

Postby Rijo Roy » Mon May 06, 2013 10:03 am

Hi Tim

I got an error at the end of execution of the duplication script:


contents of Memory Script:
{
set until scn 5984123130543;
recover
clone database
delete archivelog
;
}
executing Memory Script

executing command: SET until clause

Starting recover at 04-MAY-13

starting media recovery

Oracle Error:
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/path~/system.261.689099575'

released channel: c1
released channel: c2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 05/04/2013 15:04:18
RMAN-03015: error occurred in stored script Memory Script
RMAN-06053: unable to perform media recovery because of missing log
RMAN-06025: no backup of log thread 2 seq 9480 lowscn 5984118435297 found to restore
RMAN-06025: no backup of log thread 1 seq 13849 lowscn 5984123129944 found to restore
RMAN-06025: no backup of log thread 1 seq 13848 lowscn 5984122783561 found to restore
RMAN-06025: no backup of log thread 1 seq 13847 lowscn 5984121276156 found to restore
RMAN-06025: no backup of log thread 1 seq 13846 lowscn 5984118435295 found to restore


I tried to recover database after cataloging the latest archive logs which contain the missing seq mentioned above. But it gave me the error:
ORA-06552: PL/SQL: Compilation unit analysis terminated
ORA-06553: PLS-553: character set name is not recognize.

I checked the character set in my prod server and set the same in auxiliary and rerun the recover database in RMAN but failed with the same error. While googling I found that manual recover(suggested by OTN Discussion Forum) as

recover database using backup controlfile until cancel in sql prompt.

I executed the same and it asked me to apply a particular archive log which was not present with me as it was an old backup.

My question is: Why did I face this error?

I executed run
{
allocate auxiliary channel c1 device type disk;
allocate channel c2 device type disk;
duplicate target database to 'DUPDB';
}
for duplication. is this wrong or what exactly throw this error?


Thanks & Regards

Rijo Roy
Rijo Roy
Member
 
Posts: 35
Joined: Wed Apr 17, 2013 5:39 am

Re: Database Duplication using RMAN

Postby Tim... » Mon May 06, 2013 10:31 am

Hi.

If your backup files and archived redo logs are not in "exactly" the same location on the duplicate server, you are going to get error identifying files. This is why you can use the NOFILENAMECHECK option. You will see in my examples I always use this...

http://www.oracle-base.com/articles/11g ... -11gr2.php

It is possible some of the errors are caused by this.

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog
Tim...
Site Admin
 
Posts: 17940
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK

Re: Database Duplication using RMAN

Postby Rijo Roy » Mon May 06, 2013 10:46 am

Thanks Tim :D
Rijo Roy
Member
 
Posts: 35
Joined: Wed Apr 17, 2013 5:39 am

Re: Database Duplication using RMAN

Postby Tim... » Mon May 06, 2013 11:18 am

:)
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog
Tim...
Site Admin
 
Posts: 17940
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK

Re: Database Duplication using RMAN

Postby Rijo Roy » Wed Jul 31, 2013 6:40 am

Hi Tim

I had one doubt in duplication/cloning of oracle db in 10g R2.

Whenever I perform this activity, I end up with one or other issues with tablespaces. Either it will be offline or my temp tablespaces will not be shown (when i query this dba_temp_files). This time I had to create a default temp file and drop the existing(un shown one) from the duplicated db.

WHAT COULD BE THE POSSIBLE REASON FOR THIS ?

Kindly guide me..

Thanks & Regards

Rijo
Rijo Roy
Member
 
Posts: 35
Joined: Wed Apr 17, 2013 5:39 am

Re: Database Duplication using RMAN

Postby Tim... » Wed Jul 31, 2013 1:23 pm

Hi.

Tempfiles are not backed up by RMAN, so as a result any sort of recovery (or clone) will be missing the temp file and you will need to create it. This is normal.

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog
Tim...
Site Admin
 
Posts: 17940
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK

Previous

Return to Oracle RAC and Clusterware

Who is online

Users browsing this forum: No registered users and 3 guests

cron