Home » RDBMS Server » Backup & Recovery » Recovering the database until SCN (oracle9i)
Recovering the database until SCN [message #319723] Mon, 12 May 2008 16:06 Go to next message
shrinika
Messages: 306
Registered: April 2008
Senior Member
All, I am trying to simulate the below scenario.

I have test database in my machine and database is backed up through RMAN.

Here are the steps i ran.

1. shutdown the database
2. Delete all online redo log files
3. restart the database
4. restore the database from RMAN
5. recover the database until the scn.

Here is the query i am using to get the scn number.

select first_change#-1 from v$log where status='CURRENT'

I am getting error when i recover the database. I would appreciate if any one can tell me what i am missing...

RMAN> startup force;

Oracle instance started
database mounted
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of startup command at 05/12/2008 16:40:28
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: 'H:\ORAPROD\REDO\REDO01.LOG'

RMAN> exit


Recovery Manager complete.

C:\>sqlpus /nolog
'sqlpus' is not recognized as an internal or external command,
operable program or batch file.

C:\>sqlplus /nolog

SQL*Plus: Release 9.2.0.1.0 - Production on Mon May 12 16:41:13 2008

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

SQL> connect sys/sys as sysdba
Connected.
SQL> select first_change# from v$Log where status='CURRENT';

FIRST_CHANGE#
-------------
428067

SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production

C:\>rman catalog="rman/rman@catdb" target="system/system@oraprod"

Recovery Manager: Release 9.2.0.1.0 - Production

Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.

connected to target database: ORAPROD (DBID=4133054079)
connected to recovery catalog database

RMAN> restore database until scn 428067;

Starting restore at 12-MAY-08

allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=13 devtype=DISK
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to H:\ORAPROD\DATA\SYSTEM01.DBF
restoring datafile 00002 to H:\ORAPROD\DATA\UNDOTBS01.DBF
restoring datafile 00003 to H:\ORAPROD\DATA\CWMLITE01.DBF
restoring datafile 00004 to H:\ORAPROD\DATA\DRSYS01.DBF
restoring datafile 00005 to H:\ORAPROD\DATA\EXAMPLE01.DBF
restoring datafile 00006 to H:\ORAPROD\DATA\INDX01.DBF
restoring datafile 00007 to H:\ORAPROD\DATA\ODM01.DBF
restoring datafile 00008 to H:\ORAPROD\DATA\TOOLS01.DBF
restoring datafile 00009 to H:\ORAPROD\DATA\USERS01.DBF
restoring datafile 00010 to H:\ORAPROD\DATA\XDB01.DBF
channel ORA_DISK_1: restored backup piece 1
piece handle=D:\RMANBACKUP\ORA_DF654539275_S37_S1 tag=TAG20080512T162755 params=
NULL
channel ORA_DISK_1: restore complete
Finished restore at 12-MAY-08

RMAN> recover database until scn 428066;

Starting recover at 12-MAY-08
using channel ORA_DISK_1

starting media recovery
media recovery failed
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 05/12/2008 16:44:12
ORA-00283: recovery session canceled due to errors
RMAN-11003: failure during parse/execution of SQL statement: alter database reco
ver if needed
start until change 428066
ORA-00283: recovery session canceled due to errors
ORA-00313: open failed for members of log group 2 of thread 1
ORA-00312: online log 2 thread 1: 'H:\ORAPROD\REDO\REDO02.LOG'
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 2) The system cannot find the file specified.

RMAN>
Re: Recovering the database until SCN [message #319756 is a reply to message #319723] Mon, 12 May 2008 23:32 Go to previous messageGo to next message
Michel Cadot
Messages: 68650
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
If you want to recover until the current redo log you also needs all active redo logs.
If you also removed these ones, you can only recover up to the last inactive redo logs.

Regards
Michel
Re: Recovering the database until SCN [message #320027 is a reply to message #319756] Tue, 13 May 2008 14:57 Go to previous messageGo to next message
shrinika
Messages: 306
Registered: April 2008
Senior Member
Michel, Your reply makes sense.
Re: Recovering the database until SCN [message #321207 is a reply to message #320027] Mon, 19 May 2008 07:30 Go to previous messageGo to next message
malvika
Messages: 55
Registered: May 2008
Location: india
Member

RMAN> run
2> {
3> recover tablespace test until time "TO_DATE('2008-05-19/17:35:22','YYYY-MM-DD
/HH24:MI:SS')";

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01005: syntax error: found "test": expecting one of: "double-quoted-string,
identifier, single-quoted-string"
RMAN-01007: at line 3 column 20 file: standard input

RMAN> recover tablespace test until time '2008-05-19/17:35:22';

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01005: syntax error: found "test": expecting one of: "double-quoted-string,
identifier, single-quoted-string"
RMAN-01007: at line 1 column 20 file: standard input

RMAN> recover tablespace test;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01005: syntax error: found "test": expecting one of: "double-quoted-string,
identifier, single-quoted-string"
RMAN-01007: at line 1 column 20 file: standard input

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01005: syntax error: found ";": expecting one of: "allocate, alter, backup,
beginline, blockrecover, catalog, change, connect, copy, create, crosscheck, co
nfigure, duplicate, debug, delete, drop, exit, endinline, host, {, library, list
, mount, open, print, quit, recover, register, release, replace, report, renorma
lize, reset, restore, resync, rman, run, rpctest, set, setlimit, sql, spool, sta
rtup, shutdown, send, show, test, upgrade, validate"
RMAN-01007: at line 1 column 24 file: standard input

RMAN> recover tablespace test;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01005: syntax error: found "test": expecting one of: "double-quoted-string,
identifier, single-quoted-string"
RMAN-01007: at line 1 column 20 file: standard input

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01005: syntax error: found ";": expecting one of: "allocate, alter, backup,
beginline, blockrecover, catalog, change, connect, copy, create, crosscheck, co
nfigure, duplicate, debug, delete, drop, exit, endinline, host, {, library, list
, mount, open, print, quit, recover, register, release, replace, report, renorma
lize, reset, restore, resync, rman, run, rpctest, set, setlimit, sql, spool, sta
rtup, shutdown, send, show, test, upgrade, validate"
RMAN-01007: at line 1 column 24 file: standard input
Re: Recovering the database until SCN [message #321244 is a reply to message #321207] Mon, 19 May 2008 09:16 Go to previous message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
TEST is a reserved word.

Breaking just about every rule specified in OraFAQ Forum Guide.

Next time, start your own thread and read thru the Forum Guide prior to posting.

[Updated on: Mon, 19 May 2008 09:19]

Report message to a moderator

Previous Topic: Cloning database using RMAN
Next Topic: ORA-01092: ORACLE instance terminated. Disconnection forced
Goto Forum:
  


Current Time: Sat May 11 04:13:08 CDT 2024