Skip to Main Content
  • Questions
  • Active clone recover needed arc files

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Paul.

Asked: June 12, 2018 - 7:46 pm UTC

Last updated: June 14, 2018 - 1:32 am UTC

Version: 12.2

Viewed 1000+ times

You Asked

Oracle 12.2

I am running the following command:

*.db_file_name_convert='/db1/ifddb1/dbf/','/db1/ifdtest1/dbf/'
*.log_file_name_convert='/redo/ifddb1/redologs/','/redo/ifdtest1/redologs/'

sqlplus ' / as sysdba ' <<EOT
shutdown abort
startup nomount
exit
EOT


rman catalog=rman/******@ifddb1 target=sys/*******ifddb1 << EOT
connect auxiliary sys/*******@ifdtest1
duplicate target database to ifdtest1 from active database nofilenamecheck
pfile=/u01/app/oracle/product/11g/dbs/initifdtest1.ora ;
exit
EOT

During the clone some of my .arc files are deleted and I get the following
error:


$ sqlplus '/as sysdba'
SQL> recover database using backup controlfile until cancel;
ORA-00279: change 11665258641680 generated at 11/28/2010 01:05:38 needed for
thread 1
ORA-00289: suggestion : /archive/ifdtest4/ifdtest4_128788_1_629710136.arc
ORA-00280: change 11665258641680 for thread 1 is in sequence #128788
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
CANCEL



I know I have to start recovery with log 128788. So I recover the next "N" number of logs and apply them until "media recovery" is completed.

On occasion sometimes archive logs are backed up and removed during the cloning, which causes a failure in the process. This than forces me to recover groups of archive files.

recover database using backup controlfile until cancel;" multiple times

Is there a way I can get a list of archive files I need to recover so I can complete my clone.

A step by step example would be greatly appreciated.


and Connor said...

That sounds like you have a process problem to me, ie, you should be looking at altering your archivelog backup script so that it either does not run, or does not delete archive logs during a clone operation. That would the simplest solution in my opinion.

But other than that, you can reasonably assume that you might need none, some or all of your archives from the time you commenced your clone to the time it completes the initial file copy phase (which is most of the duration of the clone time anyway).

So if you change to your clone process to be

- issue a "switch logile" or "archive log current" before your start
- ensure that you hold on (or recover) every archive including the one you just archived from that point in time

you should be fine.

Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Paul H, June 13, 2018 - 6:28 pm UTC

Thanks for your response and tips but my question was not answered.

Is there a way to get a list or start or and end arc files needed for recovery if the active clone fails.

Oracle seems to know when media recovery is completed when the last arc file is applied so why can't those values before instead of recover groups at a time
Connor McDonald
June 14, 2018 - 1:32 am UTC

Oracle seems to know when media recovery is completed when the last arc file is applied

That's not exactly true. We'll keep applying archives as long as you can provide them. The more you apply, the more up to date we are. The *minimum* we have to apply (duplicate or otherwise) is until all of the datafiles are consistent again.

If you run a "restore database preview" command, then in the output you'll see something like:

Media recovery start SCN is XXXX
Recovery must be done beyond SCN YYYYto clear datafile fuzziness


You'll need to get the archives between those two SCN's

But all this can be much simpler - just don't delete the archives.

More to Explore

Backup/Recovery

Check out the complete guide to all of the Backup & Recovery techniques in the Oracle Database.