Sunday, June 14, 2015

RMAN - Restoring in Preparation for Incomplete Recovery

Restoring in Preparation for Incomplete Recovery

Use the set until command to specify the termination point for recovery. This command affects any subsequent restoreswitch, and recover commands that are in the same run command.
To restore the database in preparation for incomplete recovery:

  1. Start RMAN and connect to the target database and, optionally, the recovery catalog database. For example, enter:
    % rman target / catalog rman/rman@rcat
        
    
    
    
    Optionally, specify a message log file at connect time:
    % rman target / catalog rman/rman@rcat log = rman_log
        
    
    
    
  2. If the database is open, shut it down and then mount it:
    shutdown immediate;
    startup mount;
        
    
    
    
  3. Perform the following operations within your run command:
    1. Determine whether you want to recover to a specified time, SCN, or log sequence number and issue the appropriate set until command.
    2. Allocate channels.
    3. Restore the database.
    For example, this job restores the database in anticipation of an incomplete recovery until December 15, 1998 at 9 a.m.
    run { 
         set until time 'Dec 15 1998 09:00:00';
         allocate channel ch1 type 'sbt_tape';
         restore database;
    }

No comments: