Home > Oracle, Uncategorized > Finding exact SCNs for Oracle Incomplete Restore

Finding exact SCNs for Oracle Incomplete Restore

Using reference from goldparrot below really helped:
https://goldparrot.wordpress.com/2011/05/16/how-to-find-exact-scn-number-for-oracle-restore/

2) Get the greatest of either absolute_fuzzy_change# or checkpoint_change# for your datafile backups.

The quickest way to roll forward just beyond the backup to open resetlogs is
to query v$backup_datafile.
You then just need to choose the greatest of either the absolute_fuzzy_change# or checkpoint_change#
for your backupset.

You can modify the query to your liking, and even add in many details from stamp and recid, but below
gets the job done quickly. Just choose the day in which your level0 or level1 completed and modify appropriately.

=============================================
` col fuzz# format 99999999999999999999999999
` col chkpnt# format 99999999999999999999999999

select max(absolute_fuzzy_change#) fuzz#, max(checkpoint_change#) chkpnt# from
(select file#, completion_time, checkpoint_change#, absolute_fuzzy_change# from v$backup_datafile
where incremental_level = 0
and trunc(completion_time) = to_date(‘JUN-20-2010′,’MON-DD-YYYY’)
and file# <> 0
order by completion_time desc
);
===============================================

This will return 2 SCN numbers. Pick the greatest of the 2.

FUZZ# CHKPNT#
——————– ——————–
23138984359 23138974759

Advertisements
Categories: Oracle, Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: