Home » RDBMS Server » Backup & Recovery » RMAN trying to read from wrong backup? (RDBMS10.2.0.4, Win2003 x86, RMAN)
RMAN trying to read from wrong backup? [message #518511] Thu, 04 August 2011 04:17 Go to next message
hristo
Messages: 258
Registered: May 2007
Senior Member
Hi!

Im trying to restore a spfile to pfile.

The RMAN backup is written to disk:


connect catalog rman11cv/password@metarep
connect target sys/password@DATABASE 
run {
ALLOCATE CHANNEL disk1 DEVICE TYPE DISK FORMAT 'G:\BackupDB\%U';

backup AS COMPRESSED BACKUPSET
 incremental level = 0 
 filesperset = 10 
 database  
 include current controlfile spfile  ;
}

run {
ALLOCATE CHANNEL disk1 DEVICE TYPE DISK FORMAT 'G:\BackupDB\%U';

sql "alter system archive log current";
 backup AS COMPRESSED BACKUPSET
 filesperset = 5 
 (archivelog all delete input );
 backup current controlfile spfile  ;
}

exit;



The logfile looks a little strange. RMAN writes to a strange location: D:\ORACLE\ORA10.2\DATABASE\C-2179021406-20110804-00??


connected to recovery catalog database

connected to target database: db (databaseID=2179021406)

allocated channel: disk1
channel disk1: sid=98 devtype=DISK

Starting backup at 04-AUG-11
channel disk1: starting compressed incremental level 0 datafile backupset
channel disk1: specifying datafile(s) in backupset
input datafile fno=00002 name=G:\ORADATA\db\DATA\UNDOTBS01.databaseF
input datafile fno=00015 name=G:\ORADATA\db\DATA\LADIESINDX_01.databaseF
input datafile fno=00019 name=G:\ORADATA\db\DATA\CMTINDX_01.databaseF
input datafile fno=00022 name=G:\ORADATA\db\DATA\LADIESDATA_02.databaseF
input datafile fno=00010 name=G:\ORADATA\db\DATA\Xdatabase01.databaseF
input datafile fno=00003 name=G:\ORADATA\db\DATA\CWMLITE01.databaseF
input datafile fno=00008 name=G:\ORADATA\db\DATA\TOOLS01.databaseF
input datafile fno=00006 name=G:\ORADATA\db\DATA\INDX01.databaseF
channel disk1: starting piece 1 at 04-AUG-11
channel disk1: finished piece 1 at 04-AUG-11
piece handle=G:\BACKUPdb\GCMJ4N4G_1_1 tag=TAG20110804T080016 comment=NONE
channel disk1: backup set complete, elapsed time: 00:14:55
channel disk1: starting compressed incremental level 0 datafile backupset
channel disk1: specifying datafile(s) in backupset
input datafile fno=00012 name=G:\ORADATA\db\DATA\CHILDRENDATA_01.databaseF
input datafile fno=00016 name=G:\ORADATA\db\DATA\LINGERIEDATA_01.databaseF
input datafile fno=00018 name=G:\ORADATA\db\DATA\OTHERINDX_01.databaseF
input datafile fno=00017 name=G:\ORADATA\db\DATA\LINGERIEINDX_01.databaseF
input datafile fno=00013 name=G:\ORADATA\db\DATA\CMTDATA_01.databaseF
input datafile fno=00009 name=G:\ORADATA\db\DATA\USERS01.databaseF
input datafile fno=00007 name=G:\ORADATA\db\DATA\ODM01.databaseF
channel disk1: starting piece 1 at 04-AUG-11
channel disk1: finished piece 1 at 04-AUG-11
piece handle=G:\BACKUPdb\GDMJ4O0G_1_1 tag=TAG20110804T080016 comment=NONE
channel disk1: backup set complete, elapsed time: 00:07:15
channel disk1: starting compressed incremental level 0 datafile backupset
channel disk1: specifying datafile(s) in backupset
including current control file in backupset
input datafile fno=00011 name=G:\ORADATA\db\DATA\ARCHIVEDATA_01.databaseF
input datafile fno=00014 name=G:\ORADATA\db\DATA\LADIESDATA_01.databaseF
input datafile fno=00020 name=G:\ORADATA\db\DATA\CHILDRENINDX_01.databaseF
input datafile fno=00021 name=G:\ORADATA\db\DATA\SYSAUX01.databaseF
input datafile fno=00001 name=G:\ORADATA\db\DATA\SYSTEM01.databaseF
input datafile fno=00005 name=G:\ORADATA\db\DATA\EXAMPLE01.databaseF
input datafile fno=00004 name=G:\ORADATA\db\DATA\DRSYS01.databaseF
channel disk1: starting piece 1 at 04-AUG-11
channel disk1: finished piece 1 at 04-AUG-11
piece handle=G:\BACKUPdb\GEMJ4OE3_1_1 tag=TAG20110804T080016 comment=NONE
channel disk1: backup set complete, elapsed time: 00:05:56
channel disk1: starting compressed incremental level 0 datafile backupset
channel disk1: specifying datafile(s) in backupset
including current SPFILE in backupset
channel disk1: starting piece 1 at 04-AUG-11
channel disk1: finished piece 1 at 04-AUG-11
piece handle=G:\BACKUPdb\GFMJ4OP7_1_1 tag=TAG20110804T080016 comment=NONE
channel disk1: backup set complete, elapsed time: 00:00:02
Finished backup at 04-AUG-11

Starting Control File and SPFILE Autobackup at 04-AUG-11
piece handle=D:\ORACLE\ORA10.2\DATABASE\C-2179021406-20110804-00 comment=NONE
Finished Control File and SPFILE Autobackup at 04-AUG-11
released channel: disk1

allocated channel: disk1
channel disk1: sid=98 devtype=DISK

sql statement: alter system archive log current

Starting backup at 04-AUG-11
current log archived
channel disk1: starting compressed archive log backupset
channel disk1: specifying archive log(s) in backup set
input archive log thread=1 sequence=10939 recid=22074 stamp=758155358
input archive log thread=1 sequence=10940 recid=22077 stamp=758155441
input archive log thread=1 sequence=10941 recid=22079 stamp=758167488
input archive log thread=1 sequence=10942 recid=22081 stamp=758168057
channel disk1: starting piece 1 at 04-AUG-11
channel disk1: finished piece 1 at 04-AUG-11
piece handle=G:\BACKUPdb\GHMJ4OPK_1_1 tag=TAG20110804T082836 comment=NONE
channel disk1: backup set complete, elapsed time: 00:00:36
channel disk1: deleting archive log(s)
archive log filename=L:\ORADATA\db\ARCH\db_10939_1_613330592.ARC recid=22074 stamp=758155358
archive log filename=J:\ORADATA\db\ARCH\db_10940_1_613330592.ARC recid=22077 stamp=758155441
archive log filename=J:\ORADATA\db\ARCH\db_10941_1_613330592.ARC recid=22079 stamp=758167488
archive log filename=J:\ORADATA\db\ARCH\db_10942_1_613330592.ARC recid=22081 stamp=758168057
channel disk1: starting compressed archive log backupset
channel disk1: specifying archive log(s) in backup set
input archive log thread=1 sequence=10948 recid=22092 stamp=758253769
input archive log thread=1 sequence=10949 recid=22094 stamp=758254369
input archive log thread=1 sequence=10950 recid=22096 stamp=758254702
input archive log thread=1 sequence=10951 recid=22099 stamp=758276912
input archive log thread=1 sequence=10952 recid=22100 stamp=758276914
channel disk1: starting piece 1 at 04-AUG-11
channel disk1: finished piece 1 at 04-AUG-11
piece handle=G:\BACKUPdb\GIMJ4OQP_1_1 tag=TAG20110804T082836 comment=NONE
channel disk1: backup set complete, elapsed time: 00:00:36
channel disk1: deleting archive log(s)
archive log filename=L:\ORADATA\db\ARCH\db_10948_1_613330592.ARC recid=22092 stamp=758253769
archive log filename=L:\ORADATA\db\ARCH\db_10949_1_613330592.ARC recid=22094 stamp=758254369
archive log filename=L:\ORADATA\db\ARCH\db_10950_1_613330592.ARC recid=22096 stamp=758254702
archive log filename=J:\ORADATA\db\ARCH\db_10951_1_613330592.ARC recid=22099 stamp=758276912
archive log filename=L:\ORADATA\db\ARCH\db_10952_1_613330592.ARC recid=22100 stamp=758276914
channel disk1: starting compressed archive log backupset
channel disk1: specifying archive log(s) in backup set
input archive log thread=1 sequence=10943 recid=22083 stamp=758168441
input archive log thread=1 sequence=10944 recid=22085 stamp=758190487
input archive log thread=1 sequence=10945 recid=22087 stamp=758190488
input archive log thread=1 sequence=10946 recid=22088 stamp=758239241
input archive log thread=1 sequence=10947 recid=22090 stamp=758241870
channel disk1: starting piece 1 at 04-AUG-11
channel disk1: finished piece 1 at 04-AUG-11
piece handle=G:\BACKUPdb\GJMJ4ORT_1_1 tag=TAG20110804T082836 comment=NONE
channel disk1: backup set complete, elapsed time: 00:00:36
channel disk1: deleting archive log(s)
archive log filename=J:\ORADATA\db\ARCH\db_10943_1_613330592.ARC recid=22083 stamp=758168441
archive log filename=J:\ORADATA\db\ARCH\db_10944_1_613330592.ARC recid=22085 stamp=758190487
archive log filename=J:\ORADATA\db\ARCH\db_10945_1_613330592.ARC recid=22087 stamp=758190488
archive log filename=L:\ORADATA\db\ARCH\db_10946_1_613330592.ARC recid=22088 stamp=758239241
archive log filename=L:\ORADATA\db\ARCH\db_10947_1_613330592.ARC recid=22090 stamp=758241870
Finished backup at 04-AUG-11

Starting backup at 04-AUG-11
channel disk1: starting full datafile backupset
channel disk1: specifying datafile(s) in backupset
including current control file in backupset
channel disk1: starting piece 1 at 04-AUG-11
channel disk1: finished piece 1 at 04-AUG-11
piece handle=G:\BACKUPdb\GKMJ4OT3_1_1 tag=TAG20110804T083027 comment=NONE
channel disk1: backup set complete, elapsed time: 00:00:02
channel disk1: starting full datafile backupset
channel disk1: specifying datafile(s) in backupset
including current SPFILE in backupset
channel disk1: starting piece 1 at 04-AUG-11
channel disk1: finished piece 1 at 04-AUG-11
piece handle=G:\BACKUPdb\GLMJ4OT5_1_1 tag=TAG20110804T083027 comment=NONE
channel disk1: backup set complete, elapsed time: 00:00:02
Finished backup at 04-AUG-11

Starting Control File and SPFILE Autobackup at 04-AUG-11
piece handle=D:\ORACLE\ORA10.2\DATABASE\C-2179021406-20110804-01 comment=NONE
Finished Control File and SPFILE Autobackup at 04-AUG-11
released channel: disk1

Recovery Manager complete.



But when I try to restore the spfile to a pfile:


RMAN> run
2> {
3> ALLOCATE CHANNEL disk1 DEVICE TYPE DISK FORMAT 'G:\Backupdatabase';
4> Restore spfile to pfile 'Y:\restore\pfile.ora';
5> }

allocated channel: disk1
channel disk1: sid=95 devtype=DISK

Starting restore at 04-AUG-11

channel disk1: starting datafile backupset restore
channel disk1: restoring SPFILE to PFILE
output filename=Y:\restore\pfile.ora
channel disk1: reading from backup piece D:\ORACLE\ORA10.2\DATABASE\C-2179021406
-20110804-01
released channel: disk1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 08/04/2011 11:03:27
ORA-19870: error reading backup piece D:\ORACLE\ORA10.2\DATABASE\C-2179021406-20
110804-01
ORA-09210: sftopn: error opening file
OSD-04002: unable to open file
O/S-Error: (OS 3) The system cannot find the path specified.



I look at: D:\oracle\ora10.2\database\C-2179021406-20110804-01 and it exists.

But why have RMAN written to that location and how do I do to be able to restore my spfile?


Regards
H

[Updated on: Thu, 04 August 2011 04:27]

Report message to a moderator

Re: RMAN trying to read from wrong backup? [message #518561 is a reply to message #518511] Thu, 04 August 2011 11:16 Go to previous messageGo to next message
babuknb
Messages: 1734
Registered: December 2005
Location: NJ
Senior Member

>>why have RMAN written to that location

RMAN trying to take backup in default location. Instead of specifying the location in channel you need to configure your location by using the below command.
CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT '/disk1/backup/%U';
CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT '/disk2/backup/%U'; 
CONFIGURE CHANNEL 3 DEVICE TYPE DISK FORMAT '/disk3/backup/%U'


Refer Here

>>how do I do to be able to restore my spfile?

Try this

RESTORE SPFILE TO 'new_location' FROM AUTOBACKUP;


Babu

[Updated on: Thu, 04 August 2011 11:17]

Report message to a moderator

Re: RMAN trying to read from wrong backup? [message #518578 is a reply to message #518511] Thu, 04 August 2011 19:23 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10694
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
>>why have RMAN written to that location
Because you have your RMAN Configs with control file autobackup on
and
RMAN will backup the controlfile backup in default location that is
$ORACLE_HOME\database for windows
and
$ORACLE_HOME/dbs for unix.
You need to manually issue
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '\here\wherever\yourwant\%F';
Re: RMAN trying to read from wrong backup? [message #518630 is a reply to message #518578] Fri, 05 August 2011 02:52 Go to previous message
hristo
Messages: 258
Registered: May 2007
Senior Member
Ok, thanks for your help!

Regards
Hristo
Previous Topic: Question on Backup archive log files
Next Topic: ORA-01504: database name 'MYDB' does not match parameter db_name 'ORCL'
Goto Forum:
  


Current Time: Tue Nov 30 14:49:34 CST 2021