11G

Virtual Private Catalog

User Rating:  / 1
PoorBest 
Parent Category: Articles
Created on Wednesday, 24 March 2010 22:53
Last Updated on Thursday, 22 August 2013 16:53
Published on Wednesday, 24 March 2010 22:53
Written by Guy Lambregts
Hits: 6021

Virtual Private Catalog

 

The virtual private catalog has been introduced in Oracle 11G and is a subset of the base recovery catalog. The idea is to grant an administrator the catalog and register privileges on a part of the registered targets. The catalog itself is owned and created in a similar way as it was done in previous releases.


SQL> create tablespace catalog datafile size 100M autoextend ON;

Tablespace created.

SQL> create user rman identified by rman;

User created.

SQL> alter user rman default tablespace catalog temporary tablespace temp;

User altered.

SQL> alter user rman quota unlimited on catalog;

User altered.

SQL> grant recovery_catalog_owner to rman;

Grant succeeded.

C:\Windows\system32>rman catalog rman/rman

Recovery Manager: Release 11.1.0.7.0 - Production on Mon Jun 22 21:44:07 2009

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

connected to recovery catalog database

RMAN> create catalog tablespace 'CATALOG';

recovery catalog created

 

 

We create a user which will become a (sub) catalog administrator and we grant this user the catalog privilege on a target database.

SQL> create user rman_development identified by rman_development;

User created.

SQL> grant recovery_catalog_owner to rman_development;

Grant succeeded.

SQL> exit

Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

C:\Windows\system32>rman

Recovery Manager: Release 11.1.0.7.0 - Production on Mon Jun 22 21:05:02 2009

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

RMAN> connect catalog rman/rman

connected to recovery catalog database

RMAN> grant catalog for database "PLATINUM" to  rman_development;

Grant succeeded.

RMAN> grant register database to rman_development;

Grant succeeded.

RMAN> exit

Recovery Manager complete.

 

 

The (sub)administrator can then create a virtual private catalog


C:\Windows\system32>rman

Recovery Manager: Release 11.1.0.7.0 - Production on Mon Jun 22 21:06:22 2009

Copyright (c) 1982, 2007, Oracle.  All rights reserved. 

RMAN> connect catalog rman_development/rman_development;

connected to recovery catalog database 

RMAN> create virtual catalog;

found eligible base catalog owned by RMAN

created virtual catalog against base catalog owned by RMAN

 

On the database server hosting the database PLATINUM the administrator can access the database info  for that particular database

 

C:\Windows\system32>SET ORACLE_SID=PLATINUM 

C:\Windows\system32>rman

Recovery Manager: Release 11.1.0.7.0 - Production on Mon Jun 22 21:06:22 2009

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

RMAN> connect target / catalog rman_development/rman_development@rman_catalog;

 

connected to target database: PLATINUM (DBID=2418164457)

RMAN> list backup;

BS Key  Type LV Size       Device Type Elapsed Time Completion Time


548     Full    173.42M    DISK        00:03:45     22-JUN-09
BP Key: 553   Status: AVAILABLE  Compressed: YES  Tag: TAG20090622T212046
Piece Name: C:\ORACLE\PRODUCT\11.1.0\FLASH_RECOVERY_AREA\PLATINUM\BACKUPSET\2009_06_22\O1_MF_NNNDF_TAG20090622T212046_53ZPDJD4_.BKP

List of Datafiles in backup set 548

File LV Type Ckp SCN    Ckp Time  Name
---- — ---- ---------- --------- ----
1       Full 2876019    22-JUN-09 C:\ORACLE\PRODUCT\11.1.0\ORADATA\PLATINUM\DATAFILE\O1_MF_SYSTEM_0LK30K1Q_.DBF
5       Full 2876019    22-JUN-09 C:\ORACLE\PRODUCT\11.1.0\ORADATA\PLATINUM\DATAFILE\O1_MF_USERS_ARCHIVE_01_0OK30K89_.DBF
7       Full 2876019    22-JUN-09 C:\ORACLE\PRODUCT\11.1.0\ORADATA\PLATINUM\DATAFILE\O1_MF_PM_4OPWTT18_.DBF
8       Full 2876019    22-JUN-09 C:\ORACLE\PRODUCT\11.1.0\ORADATA\PLATINUM\DATAFILE\O1_MF_PM1_4ZM8LM6N_.DBF
10      Full 2876019    22-JUN-09 C:\ORACLE\PRODUCT\11.1.0\ORADATA\PLATINUM\DATAFILE\O1_MF_PM3_4ZM8M1BQ_.DBF

 


The virtual private catalog can be dropped without impacting the base catalog.

 

RMAN> drop catalog;

recovery catalog owner is RMAN_DEVELOPMENT

enter DROP CATALOG command again to confirm catalog removal

RMAN> drop catalog;

virtual catalog dropped