Thursday, September 24, 2009

Determining the SCN for Incomplete Recovery After Restore

Because the restored database will not have the online redo logs of the production database, perform incomplete recovery up to the lowest SCN of the most recently archived log in each thread and then open with the RESETLOGS option. Obtain the SCN for recovery termination by finding the lowest SCN among the most recent archived logs for each thread.
Start SQL*Plus and use the following query to determine the necessary SCN:SQL> SELECT MIN(maxnc) FROM
(SELECT MAX(a.NEXT_CHANGE#) maxnc
FROM V$ARCHIVED_LOG a, V$THREAD t
WHERE a.THREAD# = t.THREAD#
AND a.ARCHIVED='YES'
AND t.ENABLED='DISABLED'
GROUP BY a.THREAD#);

No comments:

Post a Comment

About Me

Working as Oracle DBA for Wipro Technologies, Chennai, India