3.23 UNREGISTER
Purpose
Use the UNREGISTER
command to remove the RMAN metadata for one or more registered databases from the recovery catalog.
See Also:
DROP DATABASE
to learn how to delete a database and unregister it with one command
Prerequisites
Execute this command only at the RMAN prompt. RMAN must be connected to a recovery catalog. The database to unregister must be currently registered in this catalog.
Usage Notes
The UNREGISTER
command cannot be used when the target database is configured to create backups to Zero Data Loss Recovery Appliance, commonly known as Recovery Appliance. In this case, use the DBMS_RA.DELETE_DB
procedure to unregister a database from Recovery Appliance.
See Also:
Zero Data Loss Recovery Appliance Administrator's Guide for information about the DBMS_RA.DELETE_DB
procedure
Semantics
Syntax Element | Description |
---|---|
|
Specifies a primary database to be unregistered. RMAN unregisters the primary database and any of its associated standby databases (see Example 3-80). If
|
|
Specifies the name of the primary database that you are unregistering. This database name must be unique in the recovery catalog. Because the database name is unique, RMAN does not need to be connected to a target database or use the |
DB_UNIQUE_NAME db_unique_name |
Removes all metadata except backup metadata for the Data Guard database specified by The specified database can be either a primary or standby database, although typically you use this clause to unregister a standby database (see Example 3-82). You can use this clause only when RMAN is connected to a mounted or open target database or the The backups of a database have the |
|
Removes backup metadata for the database specified by Note: This clause cannot be used when unregistering standby databases. Note: Physical backups are not deleted by the |
|
Does not prompt for confirmation before unregistering the database. |
Example
Example 3-80 Unregistering a Primary Database and Its Standby Databases
Assume that primary database prod
has associated standby databases dgprod3
and dgprod4
. In this example, you connect RMAN to target database prod
, whose database name is unique in the recovery catalog, and unregister it. RMAN removes all metadata about prod
, dgprod3
, and dgprod4
from the catalog. Sample output is included.
RMAN> CONNECT TARGET /
connected to target database: PROD (DBID=1627709917)
RMAN> CONNECT CATALOG rco@catdb
recovery catalog database Password: password
connected to recovery catalog database
RMAN> UNREGISTER DATABASE NOPROMPT;
database name is "PROD" and DBID is 1627709917
database unregistered from the recovery catalog
RMAN> LIST DB_UNIQUE_NAME ALL;
RMAN>
Example 3-81 Unregistering a Database That is Not Unique in Catalog
Assume that two databases registered in a recovery catalog have the name prod
. Your goal is to unregister the prod
database that has the DBID 28014364
. Because multiple databases called prod
are registered in the recovery catalog, and because RMAN is not connected as TARGET
to the 28014364
database (which has been deleted from the file system), you run SET
DBID
before UNREGISTER DATABASE
. This example includes sample output.
RMAN> CONNECT CATALOG rco@catdb recovery catalog database Password: password connected to recovery catalog database RMAN> SET DBID 28014364; executing command: SET DBID database name is "PROD" and DBID is 28014364 RMAN> UNREGISTER DATABASE; Do you really want to unregister the database (enter YES or NO)? YES database unregistered from the recovery catalog
Example 3-82 Unregistering a Standby Database
Assume that primary database prod
has associated standby databases dgprod3
and dgprod4
. You want to unregister dgprod4
, but not remove the metadata for backups taken on this database because these backups are still usable by other databases in the environment. This example uses SET
DBID
to specify the DBID of the standby database and then unregisters it (sample output included):
RMAN> CONNECT CATALOG rco@catdb recovery catalog database Password: password connected to recovery catalog database RMAN> SET DBID 1627367554; executing command: SET DBID database name is "PROD" and DBID is 1627367554 RMAN> UNREGISTER DB_UNIQUE_NAME dgprod4; database db_unique_name is "dgprod4", db_name is "PROD" and DBID is 1627367554 Want to unregister the database with target db_unique_name (enter YES or NO)? YES database with db_unique_name dgprod4 unregistered from the recovery catalog