Re: controlfile restore

From: Maris Elsins <elmaris_at_gmail.com>
Date: Wed, 12 Mar 2014 10:52:19 +0200
Message-ID: <CABQhObu1nK9DhgWC+w7E6-TrvjWpUUs8ouH7AViz_P4hxHupGg_at_mail.gmail.com>



Hi,

If you run the following :

> run
> {
> SET DBID=3555660907;
> ALLOCATE CHANNEL 't11' type 'sbt_tape'
> parms="ENV=(TDPO_OPTFILE=/opt/oracle/admin/XYZS1/tsm207/tdpo.opt)";
> SET UNTIL TIME "to_date('2014-03-06:17:50:00', 'yyyy-mm-dd:hh24:mi:ss')";
> restore controlfile from AUTOBACKUP;
> }

  1. As Mark said, RMAN uses AUTOBACKUP FORMAT to locate the autobackup, so, make sure your AUTOBACKUP FORMAT is the same as when the autobackup was taken, otherwise RMAN may not find the controlfile autobackup.
  2. I think, RMAN ignores "SET UNTIL" for "restore controlfile from AUTOBACKUP", it will always look for the latest available. Theoretically it should be fine as the latest controlfile should hold information about all available backups, but in practice with table backups retention policies are often shorter then the tape retentions (so there are database backups on tapes that are not registered in the latest controlfile). if your backup retention configuration in the controlfiles is correctly keeping log of all available backups you'll be fine by restoring the latest controlfile. if not - you need an older one, and restore from AUTOBACKUP is not for you, you'll need the controlfile backup name/handle to restore it from tapes by using "RESTORE CONTROLFILE from 'filename';" Do you have backup logs to check the filenames and handles? when you have restored the controlfile from the latest autobackup and you use SET UNTIL, RMAN knows the latest status of backups (info is in the controlfile) and is able to determine if it's possible and how to restore to the point you specified in SET UNTIL.
  3. How does RMAN know which controlfile backup is the last one if there is no catalog database? By probing. If you use the default autobackup format, the controlfile autobackup name will be "c-DBID-YYYYMMDD-nn", so if you run the restore from autobackup today, RMAN will start looking for controlfile autobackups using the following names: c-3555660907-20140312-99, c- 3555660907-20140312-98, c-3555660907-20140312-97, ..., c-3555660907 -20140312-01, c-3555660907-20140312-00, c-3555660907-20140311-99, .... until it finds a backup that is available. Imagine how long it takes if you need to process all these requests on tape! This is probably why you had to wait 1/2 hours and probably you would wait much longer. Your chances are better if you have the exact controlfile autobackup name from logs.
---
Maris Elsins
_at_MarisElsins <https://twitter.com/MarisElsins>
www.facebook.com/maris.elsins




On Tue, Mar 11, 2014 at 7:32 PM, Mark Bobak <Mark.Bobak_at_proquest.com> wrote:


> I think you need to set the auto backup format as described here in the
> documentation:
>
> http://docs.oracle.com/cd/E15586_01/backup.1111/e10642/rcmadvre.htm#BRADV89836
>
> "RMAN uses the autobackup format and DBID to determine where to hunt for
> the control file autobackup. If one is found, RMAN restores the control
> file to all control file locations listed in the CONTROL_FILES initialization
> parameter."
>
> -Mark
>
> From: Root <mufc01666_at_gmail.com>
> Reply-To: Root <mufc01666_at_gmail.com>
> Date: Tuesday, March 11, 2014 at 1:07 PM
> To: "Ronan.Merrick_at_cso.ie" <Ronan.Merrick_at_cso.ie>
> Cc: Oracle L <oracle-l_at_freelists.org>, "oracle-l-bounce_at_freelists.org" <
> oracle-l-bounce_at_freelists.org>
> Subject: Re: controlfile restore
>
> Thanks for reply Ronan, in this case we don't use catalog. I
> have different behavior when I run restore from disk and from tape.
> From disk it is just error database not mounted.
> From tape nothing I waited for half hour and just kill the RMAN process.
>
> Maybe RMAN just cannot find the file. Or just need few hours to
> finish it......
>
> run
> {
> SET DBID=3555660907;
> ALLOCATE CHANNEL 't11' type 'sbt_tape'
> parms="ENV=(TDPO_OPTFILE=/opt/oracle/admin/XYZS1/tsm207/tdpo.opt)";
> SET UNTIL TIME "to_date('2014-03-06:17:50:00', 'yyyy-mm-dd:hh24:mi:ss')";
> restore controlfile from AUTOBACKUP;
> }
> Any ideas ?
>
>
> *-----------------*
> *Tiran*
>
> *Best Regards Stay in touch...*
>
>
> On 11 March 2014 17:42, <Ronan.Merrick_at_cso.ie> wrote:
>
>> Hi Tiran,
>>
>> You need to be connected to a recovery catalog to run this. Otherwise,
>> how can RMAN know about the available backup since these are stored in
>> controlfile/catalog?
>>
>> Ronan Merrick
>> Oracle DBA
>> Census IT
>> Ph: (+3531) 8951309
>>
>> [image: Inactive hide details for Outsider <mufc01666_at_gmail.com>]Outsider
>> <mufc01666_at_gmail.com>
>>
>>
>>
>> *Outsider <mufc01666_at_gmail.com <mufc01666_at_gmail.com>>*
>> Sent by: oracle-l-bounce_at_freelists.org
>>
>> 11/03/2014 16:39
>> Please respond to
>> mufc01666_at_gmail.com
>>
>>
>>
>> To
>>
>>
>> Oracle L <oracle-l_at_freelists.org>
>>
>>
>> cc
>>
>>
>> Subject
>>
>>
>> controlfile restore
>>
>>
>> Hi,
>>
>> Sorry for simple question but I looking for some way to do restore
>> controlfile with RMAN SET UNTIL TIME.
>> For example you have 100 controlfiles in tape device and don't want to
>> look and find manually the exact one which you need just put RMAN SET UNTIL
>> TIME and restore it.
>>
>> Why I always get ORA-01507: database not mounted (restore controlfile
>> from AUTOBACKUP;) ? Controlfile must be restored in nomount state.
>>
>> thanks
>>
>> *-----------------*
>> *Tiran*
>>
>> *Best Regards Stay in touch...*
>>
>> Subject to the disclaimer at http://www.cso.ie/en/emaildisclaimer/
>>
>> Faoi réir ag an séanadh ag http://www.cso.ie/en/seanadhriomhphoist/
>>
>>
>


-- http://www.freelists.org/webpage/oracle-l
0F152918.gif graycol.gif ecblank.gif 0F330262.gif
Received on Wed Mar 12 2014 - 09:52:19 CET

Original text of this message