Showing posts with label Recovery Catalog. Show all posts
Showing posts with label Recovery Catalog. Show all posts

Unregister Target Database and Reovery Catalog with RMAN

You can register multiple databases in a recovery catalog; that means you can keep multiple database repository information in a single recovery catalog. But one restriction is each database DBID must be different as RMAN distinguish one database from another by DBID.

So whenever you just copy one database with user managed copy or by RMAN restore and recover then both database DBID is same. So they can't be register in same recovery catalog.

Unregistering a Target Database from the Recovery Catalog
To unregister a target database from the recovery catalog, just follow the procedure.
1)Connect to Recovery Catalog database.
 
rman target / CATALOG cat_user/cat_passwd@catdb
Recovery Manager: Release 10.2.0.1.0
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: catdb1 (DBID=1489461517)
connected to recovery catalog database

2)Issue UNREGISTER DATABASE command.

RMAN> UNREGISTER DATABASE;

Do you really want to unregister the database (enter YES or NO)? YES
database unregistered from the recovery catalog

But remember when a database is unregistered from the recovery catalog, all RMAN repository records in the recovery catalog are lost. The database can be registered again, but the recovery catalog records for that database are then based on the contents of the control file at the time of re-registration. Records older than the CONTROLFILE_RECORD_KEEP_TIME setting in the target database control file are lost.

Resynchronizing the Recovery Catalog
 
RMAN performs resynchronizations automatically as needed when you execute certain commands, including BACKUP. If you want to manually resynchronize issue RESYNC CATALOG command. In case of resynchronization RMAN compares the recovery catalog to either the current control file of the target database or a backup control file and updates the recovery catalog with information that is missing or changed.

RMAN> RESYNC CATALOG;
starting full resync of recovery catalog
full resync complete

Related Post:-

Register Target Database and Recovery Catalog with RMAN

After creating the recovery catalog the first step in using a recovery catalog with a target database is registering the database in the recovery catalog.To register database you have to follow fews steps and they are:-
1) The recovery catalog database must be open.
2) Connect RMAN to both the target database and recovery catalog database.

rman target/catalog cat_user/cat_passwd@catdb

Recovery Manager: Release 10.2.0.1.0 - Production

Copyright (c) 1995, 2002, Oracle Corporation, All rights reserved.

connected to target database: catdb (DBID=1489461517)
connected to recovery catalog database

3) If this target database has not registered then register the target database, it should be registered in the connected recovery catalog

RMAN>REGISTER DATABASE;
database registered in recovery catalog
starting full resync of recovery catalog
full resync complete.

Related Post:

Create Recovery Catalog

A recovery catalog is a schema stored in a database that tracks backups and stores scripts for use in RMAN backup and recovery situations. Recovery catalog is optional. RMAN can be used either with or without a recovery catalog. An experienced DBA suggest that the Enterprise Manager instance schema and RMAN catalog schema  placed in the same utility database on a server separate from the main servers. There are few steps to create recovery catalog as follow:

  •     Configure Recovery Catalog
  •     Create Recovery Catalog owner
  •     Create Recovery Catalog  

 1)Create a database called cat and connect sqlplus SYS/pass@cat as SYSDBA

 2)Create a tablespace where all information of receovery catalog will be collected.

SQL>create tablespace cat_tbs datafile '/opt/cat/cattbs.dbf' size 100m;  
Tablespace created.

 3)Create a user in the recovery catalog database

SQL>create user cat_user identified by cat_passwd
 temporary tablespace temp default tablespace cat_tbs 
 quota unlimited on cat_tbs;  
User Created.

 4)Grant the recovery catalog owner role to the user.This will provide all privileges to maintain and query recovery catalog.

SQL>grant recovery_catalog_owner to cat_user;

Grant succeeded.

 5)Connect to the database that contains the catalog owner.

 rman catalog cat_user/cat_passwd@catdb

 6)Connect from the RMAN utility prompt

rman
RMAN>connect catalog cat_user/cat_passwd
7)Run the create catalog command to create the catalog.May it take several minutes.

 RMAN>create catalog;

recovery catalog created

Related Post:-

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More