Re: recover database from scratch

From: Lyall Barbour <lyallbarbour_at_sanfranmail.com>
Date: Mon, 19 Jun 2017 17:53:15 +0200
Message-ID: <trinity-d82690db-6fc1-478d-85b6-bbf045e10428-1497887595098_at_3capp-mailcom-lxa07>


Just tried to get the datafiles, like Tony suggested.  RMAN complains that the database is not mounted.
 
I *feel* like i need controlfiles and a mounted database to do anything here...
 
Working with Oracle Support today.  Will update the list when there's a resolution.
 
Sent: Saturday, June 17, 2017 at 7:10 PM
From: "De DBA" <dedba_at_tpg.com.au>
To: "Lyall Barbour" <lyallbarbour_at_sanfranmail.com>
Cc: w1ti_at_comcast.net, oracle-l <oracle-l_at_freelists.org>
Subject: Re: recover database from scratch

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.
 
 
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 Mon Jun 19 2017 - 17:53:15 CEST

Original text of this message