Saturday, 19 March 2016

All About Virtual Private Catalog

What is Virtual Catalog ?

A virtual private catalog is a set of synonyms and views that enable user access to a subset of a base recovery catalog.

Why it is Used ?

This feature is very useful if you need to separate the duties between administrators of various databases or between DBAs and the administrator of the Recovery Catalog.
For example, imagine there are around 200 application databases registered in Recovery Catalog, out of which 50 are business-critical, and handled by senior DBAs. The remaining 150 will be managed by junior DBAs. In this case you can create a virtual private catalog and limit read/write access on RMAN metadata by creating multiple recovery catalog users (for those 150 DB’s).

How to Create Virtual Catalog :


Note :  The best practice is to create one recovery catalog that serves as the central RMAN repository for many databases. For this reason it is called the base recovery catalog.

Note : Execute this command only at the RMAN prompt. RMAN must be connected to the recovery catalog database either through the CATALOG command-line option or the CONNECT CATALOG command, and the catalog database must be open.

 
Perform the following Procedure to create a Virtual catalog for a user


Create User which will Holds  Base CATALOG

SQL> create user rm1 identified by rm1 default tablespace rmantest;
User created.
SQL> grant connect, resource , recovery_catalog_owner to rm1;
Grant succeeded.

Create User which will Hold  Virtual CATALOG

SQL> create user rm3 identified by rm3 default tablespace rmantest;
User created.
SQL> grant connect, resource , recovery_catalog_owner to rm3;
Grant succeeded.


Connect to RMAN with USER 1 :

SQL> !rman catalog rm1/rm1

Recovery Manager: Release 11.2.0.1.0 - Production on Sat Mar 19 10:27:42 2016
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
connected to recovery catalog database

RMAN> connect target /
connected to target database: RMAN (DBID=1792754794)

RMAN> create catalog;
recovery catalog created

RMAN> register database ;
database registered in recovery catalog
starting full resync of recovery catalog
full resync complete

RMAN> grant catalog for database "rman" to rm3;

Grant succeeded.

RMAN> exit


Recovery Manager complete.

Connect to RMAN with another USER :


SQL> !rman catalog rm3/rm3

Recovery Manager: Release 11.2.0.1.0 - Production on Sat Mar 19 10:33:47 2016
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
connected to recovery catalog database

RMAN> create virtual catalog;
found eligible base catalog owned by RM1
created virtual catalog against base catalog owned by RM1

Above  says , “ that RMAN found a Base catalog whose Owner is RM1,
And we have connected  ‘RM3’  user and created a Virtual catalog under this user.


Hence, We have successfully created Virtual Catalog. J


                                                                                               See Also.. Recovery Scenario in
                                                                                                               case of Complete Loss



No comments:

Post a Comment