Restore and recover database to particular SCN

  • From: Mindaugas Navickas <mnavickas@xxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Wed, 19 Jul 2006 15:19:07 -0400 (EDT)

Hi,

Last few days I was dialing with task of restoring and recovering database into
test environment. Database size ~1TB. Production backups are kept on TSM server
and we are using RMAN. Oracle 9.2.0.5 2 node RAC.

Since production server operates in UTC and test box uses EST time
(UTC-4hours), we decided not to use UNTIL TIME option of recovering. Instead we
decided to use UNTIL SCN.   

We run following query to find current SCN in production environment. Is this
right place to look for the last SCN?

Select TO_CHAR(ARCHIVE_CHANGE#,'9999999999999') as last_SCN,
to_char(sysdate,'YYYY-MM-DD HH24:MI:SS') as tstamp
from V$DATABASE;

LAST_SCN
--------------------------------------------
TSTAMP
---------------------------------------------------------------------------
   14402145866
2006-07-16 04:32:59

When we recovered our database to that particular SCN, and opened it, we found
that our database is in much earlier time than we were targeting - we know that
because some application generated records were not there.

We did not had any other option than spending another night to restore and
recover that 1TB database to some later time. This time we used untill time
'2006-07-16 06:00:00' and it was ok.

So, my question is - is V$DATABASE is the right place for getting las SCN for
the point that we would like to restore database? If it is, what could be wrong
that we got to an earlier time that we were anticipating?

Thank you
Mindaugas Navickas
Oracle DBA



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
--
//www.freelists.org/webpage/oracle-l


Other related posts: