DELETE_DB

This procedure deletes all local backups associated with this database from the Recovery Appliance. Backups on tape, in the cloud, or replicated are not affected.

If the Recovery Appliance cannot delete the local backups owned by this database due to errors, then the DELETE_DB operation fails. If errors occur, then the specified database is not completely removed from the Recovery Appliance. The Recovery Appliance logs errors that occur during the DELETE_DB procedure in the RA_INCIDENT_LOG view. If the wait parameter is specified as TRUE, then the Recovery Appliance also raises these errors in the session in which the DELETE_DB is called. If you diagnose the errors and fix the problem, then you can run DELETE_DB again.

Syntax

PROCEDURE delete_db (
   db_unique_name IN VARCHAR2,
   wait IN BOOLEAN DEFAULT TRUE,
   comments IN VARCHAR2 DEFAULT NULL,
   delete_sbt IN BOOLEAN DEFAULT FALSE);

Parameters

Table 21-17 DELETE_DB Parameters

Parameter Description

db_unique_name

The DB_UNIQUE_NAME of the database to be removed.

wait

The wait behavior of the procedure. If TRUE, then the procedure will not return until the backups and metadata for the specified database are completely removed from the Recovery Appliance. If FALSE, then the procedure returns immediately, and the database deletion operation continues in the background.

comments

Optional user supplied comment describing reason for executing this command.

delete_sbt

If TRUE, the backups on tape and cloud will be deleted when the database is removed. If FALSE, the backups on tape and cloud will not be deleted when the database is removed. It is the responsibility of the DBA to clean up backups on tape and cloud at a later time.