Re: basic RMAN restore to new host question

From: Seth Miller <sethmiller.sm_at_gmail.com>
Date: Mon, 23 Oct 2017 15:25:53 -0500
Message-ID: <CAEueRAUoRCbzVgyjqsx+KjPo9aeFS9MUL1ZgErJvXM2gUPqaEA_at_mail.gmail.com>



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
>

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Oct 23 2017 - 22:25:53 CEST

Original text of this message