Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Autobackup and its affect on restore/recover

479144Jul 21 2006 — edited Jul 23 2006
have a simple 9i database. One machine, everything is on the same machine.


Use RMAN to backup it up. So it looks something like this

configure controlfile autobackup on;
run
{
set maxcorrupt for datafile 1 to 0;
allocate channel BK1 type='SBT_TAPE' format='db_%U' ;
backup database include current controlfile plus archivelog;
}

So it backs up correctly. I insert some data and repeat the process 3 times. One of the arguments that I have sent the BK1 channel is a remote machine to put the backup files \\myremote\bkupdir. Suffice it to say that I know my backup syntax to my tape third party provider is correct.

By doing this backup I am expecting that I am backing up the controlfile, the spfile (virtue of the autobackup), data files, archivelogs and then again the controlfile via the backup call.

First question: In 9i where does the spfile and controlfile get backed up to with autobackup? It appears that it is putting the autobackup in the tape libraries backup. Is that right? I have not specified any type of redirection to the tape library, just the default statement of configure controlfile autobackup on.

Now I want to emulate a catastrophic hardware failure. My emulation consists of removing all files associated to the backed up instance. So data files, password files, init/spfiles, archive logs, redo logs. I delete the instance and then recreate the instance using oradim (this is all on windows).

In real life I would expect that you would have to do the following:

1) Set up the oracle software (install it and lay it down exactly as originally laid down)
2) Create the instance; oradim -new -sid etc... giving you a new password file.
3) Start the service.
4) In rman restore the spfile from autobackup
restore the controlfiles from autobackup
restore the database
recover the database

Now I cant do step one because of some other limitations I have at present, in my final run, I will test on

multiple machines but for now, I need the original registry to remain intact.

So I do 1) by deleting any mention of the instance - including the service and then 2) giving me a new password

file.

Now here is where I fall apart and want to beat my head on the wall.


So the service is running. I start rman; rman nocatalog sys/mypass

set DBID=1531578936;
shutdown IMMEDIATE;
startup force nomount;
run
{
allocate channel BK1 type='SBT_TAPE' parms='SBT_LIBRARY='XXXX';

restore spfile from autobackup;

}


I get the following output.


16> set DBID=338847279;
executing command: SET DBID
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00579: the following error occurred at 07/21/2006 13:47:50
RMAN-03002: failure during compilation of command
RMAN-03013: command type: CSET
RMAN-06188: cannot use command when connected to target database

RMAN> shutdown IMMEDIATE;
target database instance not started

RMAN> startup force nomount;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00579: the following error occurred at 07/21/2006 13:47:50
RMAN-04014: startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file 'C:\ORACLE\ORA90\DATABASE\INITW09IAAS.O
RA'

RMAN> run
2> {
3> allocate channel XXXX type='SBT_TAPE' parms='SBT_LIBRARY=XXXXXXXX' trace
=1;
4> set command id to 'XXX';
5> restore spfile
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00579: the following error occurred at 07/21/2006 13:47:50
RMAN-00558: error encountered while parsing input commands
RMAN-01005: syntax error: found "identifier": expecting one of: "archivelog, cha
nnel, check, controlfile, clone, database, datafile, device, from, force, high,
(, parms, standby, tablespace, until, validate"
RMAN-01008: the bad identifier was: spfile
RMAN-01007: at line 23 column 9 file: \t\restore-spfile.rman

RMAN>

ok, so the LRM-00109 error I can fix by giving it an init file but the RMAN-01008 in the third set does not goes away.


Second Question: What do I do to restore an spfile? What am I missing from my process?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 20 2006
Added on Jul 21 2006
1 comment
878 views