UNREGISTER DATABASE

Syntax

unregister::=

Description of unregister.gif follows
Description of the illustration unregister.gif

Purpose

To unregister a database from the recovery catalog.

See Also:

"DROP DATABASE" to learn how to delete a database and unregister it with one command.

Restrictions and Usage Notes

  • Execute only at the RMAN prompt.

  • RMAN must be connected to the recovery catalog in which the target database is registered.

  • You can identify the database to unregister in one of three ways:

    • Connect RMAN to the target database

    • Provide the database_name argument to identify the database to unregister, if the database name is unique;

    • Use SET DBID to identify the database if RMAN is not connected to the target database and the database_name is not unique in the recovery catalog.

Keywords and Parameters

Syntax Element Description
database_name Specifies the name of the target database that you are unregistering. You do not have to specify db_name if RMAN is connected to the target database.
NOPROMPT Specifies that RMAN should not prompt for confirmation before unregistering the database.

Example

Unregistering a Database: Example In this example, you connect to the target database test1 and then unregister it:

rman TARGET SYS/oracle@test1 CATALOG rman/rman@catdb

RMAN> UNREGISTER DATABASE NOPROMPT;

Unregistering a Database That is Not Unique in Catalog: Example The following UNIX shell script unregisters database testdb from the recovery catalog. Because multiple databases called testdb are registered in the recovery catalog, and because RMAN is not connected to the target database (which has already been deleted from the file system), you must run SET DBID:

rman CATALOG rman/rman@catdb
RMAN> RUN
{  
  SET DBID 1334531173;   # specifies test database by DBID
  UNREGISTER DATABASE testdb NOPROMPT;
}