Re: basic RMAN restore to new host question
Date: Wed, 25 Oct 2017 16:35:45 +0100
Message-ID: <6000057c-2f3c-8920-b5fd-0f7616203fc0_at_dunbar-it.co.uk>
On 25/10/17 15:56, Chris Stephens wrote:
> 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';
Possibly stupid questions Chris, but:
Q1. Does the pfile ypu mounted the database on, specify the correct location, ie where you want them to be restored to, for the control files? Or does it show the original location? I'm sure that it must specify where you want them to be restored to, which makes sense.
Q2. You are running a restore from autobackup true? If so, I *think* that a restore from autobackup can only go back to where they came from. I've had similar problems on 10g and 11g restoring controlfiles in the past.
What I used to do when running test restored of backups, of database azdba01, onto a different server, was to restore the spfile as a pfile, edit all the locations, then restore the controlfiles, as follows:
startup force nomount pfile='?\database\initazdba01.ora';
set dbid 692009496;
restore controlfile from 'e:\backups\azdba01\<file_name>';
The <file_name> is something like 'C-dbid-yyyymmdd-nn'.
However, you should note that I do not use the 'autobackup' clause of the 'restore controlfile' command. What I have done is to copy the autobackup from the autobackup location on the source server to a temporary location (e:\backups) on the server I am restoring on.
All the gory details are documented (for colleagues) at https://github.com/NormanDunbar/OracleScripts/blob/master/Docs/sources/RMANRestore.rst if it's of any help. It applies to 11gR2 though and you are on 12.1. Might be helpful though.
You are probably aware, but you should be disconnected from the catalogue when you test that backups will restore to a new location, otherwise the catalogue will be updated with the test locations and files, not good for production!.
-- Norman Dunbar Dunbar IT Consultants Ltd Registered address: 27a Lidget Hill Pudsey West Yorkshire United Kingdom LS28 7LG Company Number: 05132767 -- http://www.freelists.org/webpage/oracle-lReceived on Wed Oct 25 2017 - 17:35:45 CEST