Saturday , November 25 2017
Home / Oracle DBA / VIRTUAL PRIVATE CATALOG(11G)

VIRTUAL PRIVATE CATALOG(11G)

VIRTUAL PRIVATE CATALOG:

In   11G  oracle as introduced virtual private catalog. Prior to 11g ,A single recovery catalog can be used by multiple users to give and modified the records in the Recovery catalog.

Using A single Recovery catalog by multiple users may lead to security consult .To overcome this we can implement virtual private catalog .

Recovery Manager (RMAN) is the preferred tool to backup and recover the Oracle Database. You can use recovery catalog or the control file of the target database for RMAN Repository, but Recovery Catalog is the preferred method as it offers several advantages over the others, like reporting operations, simple recovery in case of control file damage, and more.

* It is using of we can restrict Jr.DBA.

* We create Base tables(101)

*  In order to perform virtual private catalog first we Need to perform RMAN CATALOG.

* Then we can configure RMAN CATALOG mode and the top of RMAN CATALOG mode you have configure to VIRTUAL PRIVATE CATALOG.

* In this create a separate Tablespace user,to Assign to all  virtual private catalog to Jr DBA.

* In the scenarieo the leader is RMAN user .Separate view RMAN related metadata table for virtual private catalog ,so  that’s  the reason we need to separate tablespace user.

* As a Owner of catalog printer repository his granting the catalog to VPUSER=cheysar1.

* With out Granting catalog to VPUSER we can not create virtual catalog.

* How  did execute to create virtual private catalog?

Ans: as  vpuser we also connect RMAN user.

*Why to execute create Virtual catalog?

Ans: To generates the RMAN base tables for vpuser.

STEP 1 :CREATE A ONE DATABASE :

[oracle@dbcentre4 ~]$ export ORACLE_SID=catdb
You have new mail in /var/spool/mail/oracle
[oracle@dbcentre4 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Wed Jul 5 18:09:42 2017

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

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 – Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options.
STEP 2: LET ME CREATE A TABLESPACE:

SQL>select name from v$tablespace;

NAME
------------------------------
SYSTEM
SYSAUX
UNDOTBS1
USERS
TEMP
RMAN_TS
RMAN_TS2

7 rows selected.

SQL>create tablespace vpc_ts
2 datafile '/u01/app/oracle/catdb/vpc_ts01.dbf' size 10m autoextend on;

Tablespace created.

STEP 3: LET ME ASSIGN A USER TO VPS_TS  TABLESPACE:

SQL>create user cheysar1 identified by cheysar1 default tablespace vpc_ts;

User created.

SQL>grant connect,resource,recovery_catalog_owner to cheysar1;

Grant succeeded.

SQL>conn cheysar1/cheysar1
Connected.
SQL>show user
USER is "CHEYSAR1"
SQL>select * from tab;

no rows selected

SQL>

SQL>
SQL>conn cheysar/cheysar
Connected.
SQL>show user
USER is "CHEYSAR"

SQL>select count(*) from tab;

COUNT(*)
----------
142

SQL>select * from rc_database;

DB_KEY DBINC_KEY DBID NAME RESETLOGS_CHANGE# RESETLOGS
---------- ---------- ---------- -------- ----------------- ---------
1 251 1307993075 DBC 810124 05-JUL-17

SQL>

STEP 4: ASSIGN TARGET DATABASE =dbs TO CONNECTING IN VPUSER=cheysar1 :

SQL>show user
USER is “CHEYSAR”
SQL>host rman catalog cheysar/cheysar

Recovery Manager: Release 11.2.0.2.0 – Production on Wed Jul 5 18:26:41 2017

Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.

connected to recovery catalog database

RMAN>grant catalog for database dbc to cheysar1;

Grant succeeded.

RMAN>exit

Recovery Manager complete.

SQL>conn cheysar1/cheysar1
Connected.
SQL>select count(*) from tab;

COUNT(*)
----------
0

SQL>host rman catalog cheysar1/cheysar1

Recovery Manager: Release 11.2.0.2.0 - Production on Wed Jul 5 18:50:28 2017

Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.

connected to recovery catalog database

step 5:  CREATE  A VIRTUAL CATALOG  :

RMAN>create virtual catalog

found ineligible base catalog owned by RMANUSER
found eligible base catalog owned by CHEYSAR
created virtual catalog against base catalog owned by CHEYSAR

RMAN>exit
Recovery Manager complete.

SQL>select count(*) from tab;

COUNT(*)
----------
101

SQL>exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
You have new mail in /var/spool/mail/oracle
[oracle@dbcentre4 ~]$ rman catalog cheysar1/cheysar1 target sys/rac@to_dbc

Recovery Manager: Release 11.2.0.2.0 - Production on Wed Jul 5 18:52:11 2017

Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.

connected to target database: DBC (DBID=1307993075)
connected to recovery catalog database

RMAN>

RMAN>backup datafile 4;

Starting backup at 05-JUL-17
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=44 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=42 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00004 name=/u01/app/oracle/dbc/users01.dbf
channel ORA_DISK_1: starting piece 1 at 05-JUL-17
channel ORA_DISK_1: finished piece 1 at 05-JUL-17
piece handle=/u01/app/oracle/fast_recovery_area/DBC/backupset/2017_07_05/o1_mf_nnndf_TAG20170705T190028_dosthx79_.bkp tag=TAG20170705T190028 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:04
Finished backup at 05-JUL-17

Starting Control File and SPFILE Autobackup at 05-JUL-17
piece handle=/u01/app/oracle/product/11.2.0/db_home/dbs/c-1307993075-20170705-09 comment=NONE
Finished Control File and SPFILE Autobackup at 05-JUL-17

RMAN>

Comments

comments

Check Also

How to perform RMAN cloning (Easy process to clone a database on different server)

Cloning is a process of making a separate copy from one database to another. Cloning …

Leave a Reply

Your email address will not be published. Required fields are marked *