Tags: archive, archivelog, backup, control, database, datafile, file, incomplete, mode, mysql, oracle, query, recovery, sql
Incomplete Recovery Query
7,783 words with 8 Comments; publish: Wed, 13 Feb 2008 11:51:00 GMT; (25062.50, « »)
Hi ,
I am doing Incomplete Recovery of my database.
I had taken the backup of Control file, Datafile & Archive File in ArchiveLog Mode using backup command Backup database plus archivelog;
Now I am doing following steps in restore operation.
Recovery Manager: Release 9.2.0.1.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
RMAN> connect target/
connected to target database: DBCHECK (DBID=1335762160)
RMAN> shutdown immediate;
using target database controlfile instead of recovery catalog
database closed
database dismounted
Oracle instance shut down
RMAN> startup nomount;
connected to target database (not started)
Oracle instance started
Total System Global Area 730931140 bytes
Fixed Size 454596 bytes
Variable Size 285212672 bytes
Database Buffers 444596224 bytes
Redo Buffers 667648 bytes
RMAN> restore controlfile from 'E:\TempDest\CTL_C-1335762160-20061010-01';
Starting restore at 10-OCT-06
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=11 devtype=DISK
channel ORA_DISK_1: restoring controlfile
channel ORA_DISK_1: restore complete
replicating controlfile
input filename=D:\ORACLE\ORADATA\DBCHECK\CONTROL01.CTL
output filename=D:\ORACLE\ORADATA\DBCHECK\CONTROL02.CTL
output filename=D:\ORACLE\ORADATA\DBCHECK\CONTROL03.CTL
Finished restore at 10-OCT-06
RMAN> startup mount;
database is already started
database mounted
RMAN> run
{
allocate channel ch1 type disk;
set until time "to_date('Oct 10 2006 18:27:00','Mon DD YYYY HH24:MI:SS')";
restore database;
recover database;
}
released channel: ORA_DISK_1
allocated channel: ch1
channel ch1: sid=11 devtype=DISK
executing command: SET until clause
Starting restore at 10-OCT-06
channel ch1: starting datafile backupset restore
channel ch1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to D:\ORACLE\ORADATA\DBCHECK\SYSTEM01.DBF
restoring datafile 00002 to D:\ORACLE\ORADATA\DBCHECK\UNDOTBS01.DBF
restoring datafile 00003 to D:\ORACLE\ORADATA\DBCHECK\CWMLITE01.DBF
restoring datafile 00004 to D:\ORACLE\ORADATA\DBCHECK\DRSYS01.DBF
restoring datafile 00005 to D:\ORACLE\ORADATA\DBCHECK\EXAMPLE01.DBF
restoring datafile 00006 to D:\ORACLE\ORADATA\DBCHECK\INDX01.DBF
restoring datafile 00007 to D:\ORACLE\ORADATA\DBCHECK\ODM01.DBF
restoring datafile 00008 to D:\ORACLE\ORADATA\DBCHECK\TOOLS01.DBF
restoring datafile 00009 to D:\ORACLE\ORADATA\DBCHECK\USERS01.DBF
restoring datafile 00010 to D:\ORACLE\ORADATA\DBCHECK\XDB01.DBF
channel ch1: restored backup piece 1
piece handle=E:\TEMPDEST\STD_0DHVGRQ6_1_1 tag=TAG20061010T182614 params=NULL
channel ch1: restore complete
Finished restore at 10-OCT-06
Starting recover at 10-OCT-06
starting media recovery
archive log thread 1 sequence 8 is already on disk as file D:\ORACLE\ORA92\RDBMS
\ARC00008.001
archive log filename=D:\ORACLE\ORA92\RDBMS\ARC00008.001 thread=1 sequence=8
media recovery complete
Finished recover at 10-OCT-06
released channel: ch1
RMAN> alter database open resetlogs;
database opened
RMAN>
Its working fine uptil now...
But when i had use this backup set once again to restore. it is not working for me it is giving following error to me...
RMAN> run
{
allocate channel ch1 type disk;
set until time "to_date('Oct 10 2006 18:27:00','Mon DD YYYY HH24:MI:SS')";
restore database;
recover database;
}
allocated channel: ch1
channel ch1: sid=11 devtype=DISK
executing command: SET until clause
released channel: ch1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of set command at 10/10/2006 19:27:59
RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time
I heard somewhere that it will works if u take backup once again.. Why it is so?
Can any help me out this..
http://oracle.itags.org/q_oracle_119016.html
All Comments
Leave a comment...
- 8 Comments

- Hi
The problem is that opening the database with the resetlog option create a new incarnation of the database.
You must reset the database incarnation how before to re-execute the same steps.
Regards,
Aron
#1; Sat, 23 Feb 2008 13:59:00 GMT

- Hi Aron,
Thanks for quick reply ,
I will try with reset database incarnation.
Shatrughan.
#2; Sat, 23 Feb 2008 14:00:00 GMT

- Hi Team,
I had tested that RESET DATABASE INCARNATION (number);
Its working fine for the ORACLE 10G , but for the ORACLE 9i its not working,
For 10G I had used like this...
RMAN> list incarnation of database;
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
-- -- -- -- -- -- --
1 1 TESTDB 2386878461 PARENT 1 30-AUG-05
2 2 TESTDB 2386878461 CURRENT 534907 11-OCT-06
RMAN> reset database to incarnation 2;
database reset to incarnation 2
But for the ORACLE 9i it has given the following error message..
RMAN> list incarnation of database;
List of Database Incarnations
DB Key Inc Key DB Name DB ID CUR Reset SCN Reset Time
-- -- -- -- -- -- --
1 1 ABC 1558624384 NO 1 30-SEP-06
2 2 ABC 1558624384 NO 285338 05-OCT-06
3 3 ABC 1558624384 NO 309263 05-OCT-06
4 4 ABC 1558624384 NO 392760 06-OCT-06
5 5 ABC 1558624384 YES 596071 09-OCT-06
RMAN> reset database to incarnation 5;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of reset command at 10/11/2006 19:26:01
RMAN-06002: command not allowed when not connected to a recovery catalog
I am not using Recovery catalog.
What is the problem with 9i ? Plz comment..
Message was edited by:
Test_Rman
#3; Sat, 23 Feb 2008 14:01:00 GMT

- I trust the error message that it's prompted to you.
RMAN-06002: command not allowed when not connected to a recovery catalog
Are you connect to a recovery catalog? Or are you using the controlfile?
However it seems that you try to set to set the database incarnation to the current database incarnation (little remark).
Bye,
Aron
#4; Sat, 23 Feb 2008 14:03:00 GMT

- Hi,
Thanks for the reply,
I am not using the Recovery Catalog.. Using only Controlfile. in both cases for 10G & for 9i.
Also I am setting the incarnation to Current incarnation so that I can able to restore the backup set once again.
am i going wrong anywhere?
why Its working in 10G but not in the 9i?
plz comment..
Regards,
Shatrughan
#5; Sat, 23 Feb 2008 14:04:00 GMT

- Hi,
Thanks for the reply,
I am not using the Recovery Catalog.. Using only Controlfile. in both cases for 10G & for 9i.
Also I am setting the incarnation to Current incarnation so that I can able to restore the backup set once again.
am i going wrong anywhere?
why Its working in 10G but not in the 9i?
plz comment..
Regards,
Shatrughan
#6; Sat, 23 Feb 2008 14:05:00 GMT

- Hi
So the reason is now clear. In 9i you need to use the RC and non the Controlfile.
Why it work in 10g and not i 9i? I don't know if it's documented but it should be a new feature ... EVOLUTION ;-)
Bye
Aron
#7; Sat, 23 Feb 2008 14:06:00 GMT

- Hi,
Yes, we have to use RC here in 9i. Thanks for reply.
Regards,
Shatrughan
#8; Sat, 23 Feb 2008 14:07:00 GMT