Oracle Consulting Oracle Training Oracle Support Development
Home
Catalog
Oracle Books
SQL Server Books
IT Books
Job Interview Books
eBooks
Rampant Horse Books
911 Series
Pedagogue Books

Oracle Software
image
Write for Rampant
Publish with Rampant
Rampant News
Rampant Authors
Rampant Staff
 Phone
 800-766-1884
Oracle News
Oracle Forum
Oracle Tips
Articles by our Authors
Press Releases
SQL Server Books
image
image

Oracle 11g Books

Oracle tuning

Oracle training

Oracle support

Remote Oracle

STATSPACK Viewer

Privacy Policy

 

   
 
RMAN Simplified Recovery Through Resetlogs

Oracle Tips by Burleson

Oracle 10g RMAN Simplified Recovery Through Resetlogs

After you perform an incomplete (Point-in-time) recovery, you need to open the database with the RESETLOGS option:

SQL> alter database open resetlogs;

The RESETLOGS operation creates a new incarnation of the database and resets the logs.  Prior to Oracle 10g, the newly generated redo log files could not be used with the backups taken in the past.  Therefore, it was important to take an immediate backup, since all previous backups became invalid.  In addition, if you used the RMAN catalog for future backups, you needed to issue the following command to make the RMAN catalog aware of the new incarnation of the database.

RMAN> reset database;

In Oracle 10g, you no longer have to back up your database following an incomplete recovery and OPEN RESETLOGS operations. 

This new feature is also applicable for the following two scenarios:

  • Performing a recovery using a backup control file and opening the database with the RESETLOGS operation.
     

  • Reinstantiation of  the old primary database following a failover (see the Flashback Reinstantiation section for details).

  • RMAN Benefits of Simplified Recovery Through Resetlogs

    The Simplified Recovery Through Resetlogs feature provides the following benefits:

    • There is no need to perform a full backup after an incomplete recovery.
       

    • There is no need to recreate a new standby database after a failover operation.
       

    • There is no need to change any backup scripts, as there are no changes in the recovery commands to take advantage of this functionality.
       

    • You can take incremental backups based on full backups of a previous incarnation when you use RMAN.
       

    • Block media recovery can restore backups from parent incarnation backups and recover the corrupted blocks through a RESETLOGS operation.

    How does it work?

    You may wonder how can you use the newly generated logs with an earlier incarnation of the database.  Oracle 10g introduces a new format specification for archived log files.  This new format avoids overwriting archived redo log files with the same sequence number across incarnations.

    SQL> show parameter log_archive_format
    NAME                    TYPE        VALUE
    ----------------------- ----------- ----------------
    log_archive_format      string      %t_%s_%r.dbf

    The format specification is %r and represents the resetlogs id.  It is included in the default format for the log_archive_format initialization parameter. It will ensure that a unique name is constructed for the archived redo log file during RMAN restore and SQL*plus auto recovery mode.

    During the RESETLOGS operation, the information in v$log_history and v$offline_range records are no longer cleared.  In addition, two new columns have been added to indicate the incarnation the records belong to: resetlogs_change# and resetlogs_time.

    Example:

    SQL> select recid, thread#, sequence#, resetlogs_change#,resetlogs_time
      2  from v$log_history
      3  where rownum < 20;

    RMAN Benefits of Simplified Recovery Through Resetlogs

    RECID THREAD# SEQUENCE# RESETLOGS_CHANGE# RESETLOGS_TIME
    ----- ------- --------- ----------------  ------------------
        1       1       1               1   Aug 12 2003 18:48:54
        2       1       2               1   Aug 12 2003 18:48:54
        3       1       3               1   Aug 12 2003 18:48:54
        4       1       4               1   Aug 12 2003 18:48:54
        5       1       5               1   Aug 12 2003 18:48:54
        6       1       6               1   Aug 12 2003 18:48:54
        7       1       7               1   Aug 12 2003 18:48:54
        8       1       8               1   Aug 12 2003 18:48:54
        9       1       9               1   Aug 12 2003 18:48:54
       10       1       10              1   Aug 12 2003 18:48:54
       11       1       11              1   Aug 12 2003 18:48:54
       12       1       12              1   Aug 12 2003 18:48:54
       13       1       13              1   Aug 12 2003 18:48:54
       14       1       14              1   Aug 12 2003 18:48:54
       15       1       15              1   Aug 12 2003 18:48:54
       16       1       16              1   Aug 12 2003 18:48:54
       17       1       17              1   Aug 12 2003 18:48:54
       18       1       18              1   Aug 12 2003 18:48:54
       19       1       19              1   Aug 12 2003 18:48:54

    19 rows selected.

     

Linux Oracle commands syntax poster

ION Oracle tuning software

Oracle data dictionary reference poster



Oracle Forum

BC Oracle consulting support training

BC remote Oracle DBA   

 

   

 Copyright © 1996 -2017 by Burleson. All rights reserved.


Oracle® is the registered trademark of Oracle Corporation. SQL Server® is the registered trademark of Microsoft Corporation. 
Many of the designations used by computer vendors to distinguish their products are claimed as Trademarks