Re: recover database from scratch

From: De DBA <dedba_at_tpg.com.au>
Date: Sun, 18 Jun 2017 09:10:07 +1000
Message-ID: <6b7d9c49-2d36-2623-1f5f-9ae60067dc15_at_tpg.com.au>



If you happen to have the RMAN output from when the backup was made, you can match the backup pieces to the data files easily, otherwise it's a lot of trial & error.. Basically you can restore datafiles with

RESTORE DATAFILE '/path/to/datafile'

    FROM '/path/to/rman_backup_piece';

The names of the datafiles are in your controlfile create script. Tedious, but if it's your only option...

Others have mentioned that the control file should be in the backup, which is true if (1) the backup includes file 1 (system tablespace) and (2) autobackup is off. If that is the case, there should be one backup file that is tiny compared to the rest (two if you use an spfile). That file (the larger of those two) contains the control file, which you can restore with

RESTORE CONTROLFILE
    FROM '/path/to/rman_backup_of_control_file_piece';

The you can do the catalog and away you go.

If autobackup is on, and you did not configure the location of the autobackup, it will be in the default location, i.e. the FRA if there is one, or a 'platform-specfic location', in my experience somewhere within the Oracle Home. The default for autobackup is OFF, so if you did not configure it, you should find a controlfile backup in the backup set that you have.

Hth,
Tony

On 18/06/17 02:56, Lyall Barbour wrote:
> i don't know how to do that without having the RMAN catalog in the Controlfiles, with the CATALOG START WITH command.
> *Sent:* Friday, June 16, 2017 at 11:40 PM
> *From:* dedba_at_tpg.com.au
> *To:* w1ti_at_comcast.net, Bob-W1TI <w1ti_at_comcast.net>, lyallbarbour_at_sanfranmail.com, oracle-l <oracle-l_at_freelists.org>
> *Subject:* Re: recover database from scratch
> I don't think that you can do a resetlogs before you have restored the database files. Did you try restoring the files first and running the script as the last step?
>
> Cheers,
> Tony
> On 17 June 2017 4:59:39 AM AEST, Bob-W1TI <w1ti_at_comcast.net> wrote:
>
> Not sure, but do you need to create the directory first (/oradata01/SFINA021)
>
> havent used rman in eons, but if this was generic cloning it would need to be done.
>
> bob
>
> On 06/16/2017 02:45 PM, Lyall Barbour wrote:
>
> Hi,
> I feel like this is not as complicated as i'm making it.
> Oracle 12.1.0.2
> WHat i have: RMAN backup(s) of my database. I have the init.ora file. trace file backup of the controlfiles
> what i don't have: any datafiles, controlfiles, redo logs, etc.
> I can mount the database, but when i try to create the controfiles from the trace file, i get
> CREATE CONTROLFILE SET DATABASE "BLAH" RESETLOGS FORCE LOGGING ARCHIVELOG
> *
> ERROR at line 1:
> ORA-01503: CREATE CONTROLFILE failed
> ORA-01565: error in identifying file '/oradata01/SFINA021/SYSTEM.01.dbf'
> ORA-27037: unable to obtain file status
> Linux-x86_64 Error: 2: No such file or directory
> Additional information: 3
> which is very true. after i created the controlfiles and mounted the database, i was going to RMAN and do a CATALOG START WITH, etc. and restore...
> Help? lol isn't this just a database cloning i'm essentially doing?
> Lyall Barbour
> -- http://www.freelists.org/webpage/oracle-l
>
>
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.

--
http://www.freelists.org/webpage/oracle-l
Received on Sun Jun 18 2017 - 01:10:07 CEST

Original text of this message