Re: basic RMAN restore to new host question

From: Chris Stephens <cstephens16_at_gmail.com>
Date: Wed, 25 Oct 2017 14:56:35 +0000
Message-ID: <CAEFL0szDSHFKDL4hWct+bKiS3os=oPR0JZTMAw8j-LQQf95B1g_at_mail.gmail.com>



it shows the location where i would like the control file to be restored to.

SQL> conn / as sysdba
Connected to an idle instance.

SQL> startup nomount pfile='/tmp/initpd01ecm.ora'; ORACLE instance started.

Total System Global Area 1.2885E+10 bytes

Fixed Size                  2938792 bytes
Variable Size            3918633048 bytes
Database Buffers         8824815616 bytes
Redo Buffers              138514432 bytes
SQL> show parameter control_files
NAME                                 TYPE        VALUE
------------------------------------ -----------
------------------------------
control_files                        string
+DATAC1/pd_restore/CONTROLFILE
                                                 /current.645.950885201
SQL> !cat /tmp/initpd01ecm.ora | grep -i control *.control_files='+DATAC1/pd_restore/CONTROLFILE/current.645.950885201'

SQL> On Tue, Oct 24, 2017 at 3:56 PM Fernando N. de Souza <fnantes_at_gmail.com> wrote:

> Before starting the restore do this on sqlplus:
>
> SQL> startup nomount pfile='<pfile that you just created>'
> SQL> show parameter control_files
>
> Is it showing the location where you want the control file to be created?
>
>
>
> --
> Fernando.
>
> “The single biggest problem in communication is the illusion that it has
> taken place.”
> George Bernard Shaw
>
>
> On Tue, Oct 24, 2017 at 10:44 AM, Ram Raman <veeeraman_at_gmail.com> wrote:
>
>> When we backup, we also backup control file in the format
>> "/orabackup/<dbname>/proddb.ctl". If you use that the restore can become
>> "restore controlfile from <wherever>". The controlfile gets restored to the
>> location in s/pfile.
>>
>>
>>
>> On Oct 23, 2017 5:15 PM, "Chris Stephens" <cstephens16_at_gmail.com> wrote:
>>
>>> Yes.
>>> On Mon, Oct 23, 2017 at 5:05 PM Andrew Kerber <andrew.kerber_at_gmail.com>
>>> wrote:
>>>
>>>> See what happens when you restore the controlfile to that location
>>>> using this command:
>>>>
>>>> RESTORE CONTROLFILE TO '+DATAC1/pd_restore/CONTROLFILE/dbname.ctl' from
>>>> autobackup;
>>>>
>>>> Does the directory +DATAC1/pd_restore/CONTROLFILE/ exist in ASM?
>>>>
>>>> On Mon, Oct 23, 2017 at 5:00 PM, Chris Stephens <cstephens16_at_gmail.com>
>>>> wrote:
>>>>
>>>>> Sorry. That’s just a typo from me while removing actual location.
>>>>>
>>>>> On Mon, Oct 23, 2017 at 3:35 PM Gus Spier <gus.spier_at_gmail.com> wrote:
>>>>>
>>>>>> Please check the path to the location of the control files. One
>>>>>> command appears to put the control file in a subdirectory called
>>>>>> "/zfs/prod_backups/..." and the next tries to access the control file from
>>>>>> "/zfs/prod_backup/..." (note the term "backup" is not the same as
>>>>>> "backups".
>>>>>> Regards,
>>>>>> Gus
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Mon, Oct 23, 2017 at 4:28 PM, Chris Stephens <
>>>>>> cstephens16_at_gmail.com> wrote:
>>>>>>
>>>>>>> it does. however the controlfile isn't actually restored to the
>>>>>>> specified location.
>>>>>>>
>>>>>>> channel c1: control file restore from AUTOBACKUP complete
>>>>>>> Finished restore at 17-10-23 15:27
>>>>>>> released channel: c1
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Oct 23, 2017 at 3:25 PM Seth Miller <sethmiller.sm_at_gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Chris,
>>>>>>>>
>>>>>>>> Does the run block succeed without the ALTER DATABASE MOUNT?
>>>>>>>>
>>>>>>>>
>>>>>>>> Seth Miller
>>>>>>>>
>>>>>>>> On Mon, Oct 23, 2017 at 3:20 PM, Chris Stephens <
>>>>>>>> cstephens16_at_gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Oracle 12.1.0.2 on Linux 6.
>>>>>>>>>
>>>>>>>>> I am automating the restore of a database to a new host following
>>>>>>>>> https://docs.oracle.com/database/121/BRADV/rcmadvre.htm#BRADV89831
>>>>>>>>> .
>>>>>>>>>
>>>>>>>>> I'm trying to change the location of the controlfiles prior to
>>>>>>>>> restore. the documentation indicates all that is necessary is to alter the
>>>>>>>>> parameter file value for control_files prior to restore controlfile command:
>>>>>>>>>
>>>>>>>>> "Change any location-specific parameters, for example, those
>>>>>>>>> ending in _DEST, to reflect the new directory structure. For example, edit
>>>>>>>>> the following parameters:
>>>>>>>>>
>>>>>>>>> - IFILE
>>>>>>>>> - LOG_ARCHIVE_DEST_1
>>>>>>>>> - CONTROL_FILES"
>>>>>>>>>
>>>>>>>>> I did that but when I run:
>>>>>>>>>
>>>>>>>>> "run
>>>>>>>>> { ALLOCATE CHANNEL c1 DEVICE TYPE disk;
>>>>>>>>> SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO
>>>>>>>>> '/zfs/prod_backups/dbname/cf_%F';
>>>>>>>>> RESTORE CONTROLFILE FROM AUTOBACKUP;
>>>>>>>>> ALTER DATABASE MOUNT;
>>>>>>>>> }"
>>>>>>>>>
>>>>>>>>> It restores the controlfiles to the original location.
>>>>>>>>>
>>>>>>>>> Further, when i try the following:
>>>>>>>>>
>>>>>>>>> "run
>>>>>>>>> { ALLOCATE CHANNEL c1 DEVICE TYPE disk;
>>>>>>>>> SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO
>>>>>>>>> '/zfs/prod_backup/dbname/cf_%F';
>>>>>>>>> RESTORE CONTROLFILE TO
>>>>>>>>> '+DATAC1/pd_restore/CONTROLFILE/dbname.ctl' from autobackup;
>>>>>>>>> ALTER DATABASE MOUNT;
>>>>>>>>> }"
>>>>>>>>>
>>>>>>>>> I get:
>>>>>>>>>
>>>>>>>>> "released channel: c1
>>>>>>>>> RMAN-00571:
>>>>>>>>> ===========================================================
>>>>>>>>> RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS
>>>>>>>>> ===============
>>>>>>>>> RMAN-00571:
>>>>>>>>> ===========================================================
>>>>>>>>> RMAN-03002: failure of sql statement command at 10/23/2017 15:08:49
>>>>>>>>> ORA-00205: error in identifying control file, check alert log for
>>>>>>>>> more info
>>>>>>>>> "
>>>>>>>>> and '+DATAC1/pd_restore/CONTROLFILE/dbname.ctl' doesn't exist
>>>>>>>>> after execution as the error message indicates.
>>>>>>>>>
>>>>>>>>> what am i doing wrong? what do i need to do to restore the
>>>>>>>>> controlfile to a new location?
>>>>>>>>>
>>>>>>>>> Sorry in advance for the recovery 101 question.
>>>>>>>>>
>>>>>>>>> chris
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>
>>>>
>>>>
>>>> --
>>>> Andrew W. Kerber
>>>>
>>>> 'If at first you dont succeed, dont take up skydiving.'
>>>>
>>>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Oct 25 2017 - 16:56:35 CEST

Original text of this message