Unprotecting Databases and Cleaning up

This task shows you how to complete the process of un-registering a database and deleting its backup files from the Recovery Appliance when the database no longer needs recovery protection. The Recovery Appliance uses the delta backup pieces to perform most of its recovery work, but achieves zero data loss by registering as a target for the real-time Redo logs.

When a database no longer needs recovery protection, the database and the Recovery Appliance need appropriate configuration changes. These changes:

  • Stop the database from sending its Redo logs to the Recovery Appliance.
  • Stop the database from generating backups.
  • Remove old backup files for the database from the Recovery Appliance, a multiple-day process.
  • Informs the Recovery Appliance to not save future backups from the database.

RMAN supports sending the archive logs to multiple destinations. log_archive_dest_1 is backup to the local disk drive, while log_archive_dest_2 through log_archive_dest_30 can be configured for other destinations, such as a physical standby server or the Recovery Appliance. RMAN views the Recovery Appliance as another Tape Backup device.

Disabling the Real-Time Redo Transport

This task configures the database to stop transporting the redo logs to the Recovery Appliance.

The Recovery Appliance uses the delta backup pieces to perform most of its recovery work, but achieves zero data loss by registering as a target for the real-time Redo logs. Therefore, when the database no longer needs recovery protection, the Redo transport should turned off.
  1. Log into the Enterprise Manager as sysman or equivalent target level access.
  2. Navigate to the database that no longer needs protection. In our example, its name begins with "cont001_".
  3. In the Backup Settings area and the Device tab, select the Recovery Appliance associated with the database.
  4. Uncheck the checkbox that says Enable Real-Time Redo Transport.

Figure 5-4 Enterprise Manager and turning off recovery protection

Description of Figure 5-4 follows
Description of "Figure 5-4 Enterprise Manager and turning off recovery protection"

Disabling the Backups

This task configures the database to stop sending the delta backup pieces to the Recovery Appliance, when the database no longer needs recovery protection.

This step jumps between RMAN and Enterprise Manager in order to highlight what happens to the configuration.

  1. (Optional) Log into RMAN and issue the following command.
    RMAN> show all;

    The output lists several configured options including something similar to the following entry:

    CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' FORMAT '%d_%u' PARMS
    "SBT_LIBRARY=/u01/app/oracle/product/18.0.0.0/dbhome_1/lib/librs.so,
    SBT_PARMS=[RA_WALLET='location-file:/u01/app/oracle/product/18.0.0.0/dbhome_1/dbs/zdlra
    credential_alias=<yourRA_01>:1521/zdlrax5:dedicate;)";
  2. From the Enterprise Manager session looking at the same database, click on the Clear Configuration button. In our example, the database name begins with "cont001_".

    Figure 5-5 Enterprise Manager and turning off recovery protection

    Description of Figure 5-5 follows
    Description of "Figure 5-5 Enterprise Manager and turning off recovery protection"

    This removes the SBT_TAPE (tape library) channel configuration.

If you return to RMAN and issue the same command.

RMAN> show all;

The output lists no longer contains the entry for the SBT_TAPE channel device that was used for theRecovery Appliance.

Un-registering the Database from the Recovery Appliance

When a database no longer needs recovery protection, you issue a command to unregister it from the Recovery Appliance that also deletes its old backup files. The deletion of backup files takes a significant period of time to complete, which is why it should be run in the background (wait = false).

  1. Log into sqlplus as rasys.
    [yourRA_01 ~]$ sqlplus rasys
  2. Issue the following API call with the name of yourDBname database.
    SQL> exec dbms_ra.delete_db( 
    db_unique_name =>'yourDBname', 
    wait=> FALSE); 
    
    PL/SQL procedure successfully completed. 

The removal of backup data from the Recovery Appliance in the background can take multiple days.

Meanwhile, yourDBname database is no longer allowed to backup to the Recovery Appliance.