Using Recovery Catalog

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

USING RECOVERY CATALOG

The recovery catalog contains the information of the RMAN backup pieces and
the target database. More specially, the recovery contains the following
information

 RMAN configuration settings


 RMAN-stored scripts that you create
 Target database tablespace and datafile information
 Information pertaining to datafile and archive logfile backup pieces and
backup sets, as well as datafile and archive logfile copies

1:- CREATING THE RECOVERY CATALOG:-

Creating the recovery catalog consists of two major steps one is to create the
recovery catalog owner or schema in the database where you want to create the
recovery catalog and the second, once the recovery catalog schema is created you
to create the recovery catalog itself.

CREATING THE RECOVERY CATALOG OWNER:-

1. Using SQL*PLUS connect as user SYS to the database where you want to create
the recovery catalog schema.

2. Create the tablespace required for the catalog owner.

3. Create the recovery catalog owner.


USING RECOVERY CATALOG

4. Once you create the recovery catalog owner we recovery_catalog_owner


privilege to the recovery catalog owner in order to work with the recovery
catalog.

Now you created the recovery catalog owner and the next section is to create the
recovery catalog itself

CREATING THE RECOVERY CATALOG:-

Once you have created the recovery catalog owner you must create recovery
catalog hence in order to create you must connect to recovery catalog but not to
target database .

1. Connect to RMAN catalog database by connecting to RMAN client and issuing


connect catalog command

2. Using the create catalog command create the recovery catalog.

You are now ready to use RMAN with the recovery catalog, which will store the
RMAN backup information and the target database information.
USING RECOVERY CATALOG

2:- GRANTING RESTRICTED ACCESS:-

If you want to grant restricted recovery catalog access to some users then you
have to create virtual private catalog

1. Create the tablespace the user.

2. Create the user who will own the virtual private catalog.

If user already exists in the database then the above two steps are unnecessary.

3. Grant the user recovery_catalog_owner privilege.

4. Connect to the recovery catalog database as the recovery catalog owner and
grant the restricted access to the new user virtual1.
USING RECOVERY CATALOG

5. Now connect as a new user as created above and create virtual private catalog.

You can confirm the user virtual1 can access only imcl database by using the
below command

RMAN> revoke all privileges from virtual1;


USING RECOVERY CATALOG

3:-CONNECTING TO CATALOG FROM COMMAND LINE:-

4:- CONNECTING TO THE CATALOG FROM RMAN PROMPT:-

5:- REGISTERING TARGET DATABASES IN THE CATALOG:-


USING RECOVERY CATALOG

6:- UNREGISTERING A TARGET DATABASE:-

If the database you want to unregister from the recovery catalog is not at all
available or deleted from the server then you can easily unregister it by simply
connect to the catalog and issuing unregister database <db_name>.

if you have two databases of same name on two different servers and both
registered in recovery catalog and if you want to unregister one database then
use the below command as shown

RMAN>run
{
set dbid 123456;
unregister database testdb;
}
7:- UPDATING THE RECOVERY CATALOG:-
The recovery catalog is sometimes unavailable when issuing certain RMAN
commands or sometimes RMAN updates to recovery catalog is made infrequent
due to certain conditions at that time you can sync recovery catalog by issuing
below command shown by bring the target database in mount state
USING RECOVERY CATALOG

8:- DROPPING THE RECOVERY CATALOG:-


In order to drop recovery catalog you have to connect to recovery catalog and
issue drop catalog command
RMAN> connect catalog rman/rman@imcl;
RMAN> drop catalog;
9:- MERGING RECOVERY CATALOG:-
You have multiple recovery catalogs for each one and you decided to merge them
in one recovery catalog then follow the steps shown below.
$rman
RMAN> connect catalog rman/rman@oracle11;
RMAN> import catalog rman_10/rman_10@oracle10;
After completion of importing there are no databases registered in the source
catalog, since RMAN automatically unregisters all the databases after importing
from the source catalog. If you don't want RMAN to unregister the databases
from source catalog then issue below command
RMAN> import catalog rman_10/rman_10@oracle10 no unregister;
If you want to import only a few databases metadata from source catalog then
issue the below command
RMAN> import catalog rman_10/rman_10@oracle10 db_name = testdb,proddb;
RMAN> import catalog rman_10/rman_10@oracle10 db_id = 123456, 123457;
USING RECOVERY CATALOG

10:- MOVING THE RECOVERY CATALOG TO ANOTHER DATABASE:-


1. Create a new recovery catalog and do not register any database to the catalog.
2. Use import catalog command after connecting to RMAN of the source catalog
$rmna
RMAN> connect catalog rman/rman@dest_db;
RMAN> import catalog rmna_10/rma_10@source_db;
11:- CREATING A HIGH AVAILABILITY RECOVERY CATALOG:-
Here’s a simple outline of the strategy for using a standby recovery catalog:
1. Create a secondary recovery catalog in a separate Oracle database.
2. Register all databases—all that you have registered in your primary catalog—in
the secondary recovery catalog.
3. The primary recovery catalog is synchronized automatically during the normal
backups of the target databases.
4. Synchronize the secondary recovery catalog manually with the resync catalog
command after connecting to each of the target databases registered in the
catalog.
5. Switch to the secondary catalog as the primary recovery catalog when
necessary after resynchronizing it first. Switching to the secondary catalog is as
easy as can be. Simplyconnect to that catalog instead of to the primary one. The
secondary catalog will be now your primary catalog.

You might also like