Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ Oracle 11g RMAN virtual private directory     - Android in the event delivery and handling mechanism (Programming)

- Ubuntu 15.04 installed JDK and configured as the default JDK (Linux)

- Installation Atom text editor on Mint Ubuntu / Linux (Linux)

- Source Analysis: Java object memory allocation (Programming)

- Production environment Linux bonding method standby mode slave card switch (Server)

- Nginx introduced Dynamic Module Architecture (Server)

- EXP-00091: Exporting questionable statistics Processing Method (Database)

- How Linux Log Analysis (Linux)

- Android annotation support (Support Annotations) (Programming)

- Linux environment variable configuration and save places (Linux)

- Ubuntu / openSUSE users to install Veusz 1.21.1 (Linux)

- About redis in Replication (Database)

- Getting the Linux shell variable test (Programming)

- Oracle creates split and splitstr functions (Database)

- Oracle11g build physical standby database (Database)

- Ubuntu install video playback software SMPlayer 14.9.0.7042 (Linux)

- Java rewrite the hashcode method (Programming)

- MySQL dual master configuration (Database)

- Linux regex awk Comments (Linux)

- Linux / Unix system-level IO (Linux)

 
         
  Oracle 11g RMAN virtual private directory
     
  Add Date : 2017-08-31      
         
         
         
  Virtual private directory
By default, all users of the RMAN recovery directory have full rights to insert, update, and delete metadata into the recovery catalog. For example, if two unrelated databases managed by an administrator share the same recovery catalog, each administrator can intentionally or unintentionally corrupt the metadata of another. In many enterprises, this situation is allowed because the same person manages many different databases with the recovery catalog. You may want to limit each database administrator's ability to modify only the database metadata that he manages. You can do this by creating a virtual private directory.

Each Oracle 11G recovery directory supports virtual recovery catalogs, but they need to be explicitly created. There is no limit to the number of virtual private directories, and each virtual private directory is owned by a database schema user that is different from the owner of the recovery catalog.

After creating one or more virtual private directories, the next step is to grant each virtual private directory permission to the recovery directory to register the one or more databases currently in use with the recovery directory. Recovery Directory Management can also be granted the right to use a virtual private directory to register a new database.

1. Create a basic recovery directory:
1. Start SQL * Plus and use administrative privileges to connect to the database that contains the recovery catalog
[Oracle11 @ jingyong1 ~] $ sqlplus / as sysdba

SQL * Plus: Release 11.2.0.4.0 Production on Sun May 10 17:24:02

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


2. Create a user and scenario for the recovery catalog
SQL> create user rman identified by "rman" default tablespace users quota unlimited on users temporary tablespace temp;

User created.


3. Give the recovery directory user the recovery_catalog_owner role. Users with this role have all the privileges needed to recover and query the recovery catalog
SQL> grant recovery_catalog_owner to rman;

Grant succeeded.

 

4. Start RMAN and connect to the database that contains the recovery catalog, and use the recovery catalog user to connect to the database
[Oracle11 @ jingyong1 ~] $ rman catalog rman / rman @ cs

Recovery Manager: Release 11.2.0.4.0 - Production on Fri May 8 14:28:09 2015

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

Connected to recovery catalog database

RMAN>


5. Execute the create catalog command to create the directory. The create operation may take a few minutes. If the recovery catalog table space is the user's default tablespace, you can execute the following command
RMAN> create catalog;

Recovery catalog created


You can specify the table space name when you execute the create catalog command: RMAN> CREATE CATALOG TABLESPACE cat_tbs; If the table space name to be used for the restore directory is a reserved keyword for RMAN, it must be written in uppercase and enclosed in quotation marks, for example: CREATE CATALOG TABLESPACE 'CATALOG'.

6. Use SQL * Plus to query the recovery directory to see if the related basics were created
SQL> conn rman / rman
Connected.

SQL> SELECT TABLE_NAME FROM USER_TABLES;

TABLE_NAME
------------------------------
DB
NODE
CONF
DBINC
CKP
TS
TSATT
DF
SITE_DFATT
TF
SITE_TFATT
OFFR
RR
RT
ORL
RLH
AL
BS
BP
BCF
CCF
XCF
BSF
BDF
CDF
XDF
BRL
BCB
CCB
SCR
SCRL
CONFIG
XAL
RSR
FB
GRSP
NRSP
VPC_USERS
VPC_DATABASES
CFS
BCR
ROUT
RCVER
TEMPRES

44 rows selected.

SQL> select count (*) from user_objects;

   COUNT (*)
----------
       252


Create a virtual private directory
1. Start SQL * Plus and use administrative privileges to connect to the recovery catalog database
[Oracle11 @ jingyong1 ~] $ sqlplus / as sysdba

SQL * Plus: Release 11.2.0.4.0 Production on Sun May 10 17:24:02

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


2. If the virtual private directory of the user does not exist, then create the user. For example, if you want to create a database user vpc1 to manage virtual private directories, you can execute the following command
SQL> create user vpc1 identified by "vpc1" default tablespace users quota unlimited on users temporary tablespace temp;

User created.


3. Grant the recovery_catalog_owner role to the user managing the virtual private directory
SQL> grant recovery_catalog_owner to vpc1;

Grant succeeded.

SQL> exit


4. Start RMAN and connect to the recovery catalog database with the basic recovery catalog user
[Oracle11 @ oracle11g ~] $ rman

Recovery Manager: Release 11.2.0.4.0 - Production on Sun May 10 16:09:22 2015

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

RMAN> connect catalog rman / rman @ cs

Connected to recovery catalog database

RMAN>

 

5. Give the virtual private directory user the required permissions to specify that the user vpc1 can access the metadata for the database db
RMAN> grant catalog for database db to vpc1;

Grant succeeded.


You can use a database name without having to use a DBID when granting permissions. Virtual private directory users can not access metadata from any other database in the recovery catalog.

6. You can grant users the ability to register a new target database with the recovery catalog
RMAN> grant register database to vpc1;

Grant succeeded.


7. Start RMAN and use the virtual private directory user (not the primary recovery directory user) to connect to the recovery catalog database
Recovery Manager complete.
[Oracle11 @ oracle11g ~] $ rman

Recovery Manager: Release 11.2.0.4.0 - Production on Sun May 10 16:19:26 2015

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

RMAN> connect catalog vpc1 / vpc1 @ cs

Connected to recovery catalog database

RMAN>


8. Create a virtual private directory
[Oracle11 @ jingyong1 cs] $ rman catalog vpc1 / vpc1 @ cs

Recovery Manager: Release 11.2.0.4.0 - Production on Sun May 10 17:25:40 2015

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

Connected to recovery catalog database

RMAN> create virtual catalog

Found ineligible base catalog owned by RMAN
Found eligible base catalog owned by VPC1
Created virtual catalog against base catalog owned by VPC1

9. If you are using RMAN 10.2 or earlier and want to use a virtual private directory, you can perform the following PL / SQL procedure to create a virtual private directory (where base_catalog_owner is the base recovery catalog user)
SQL> EXECUTE base_catalog_owner.DBMS_RCVCAT.CREATE_VIRTUAL_CATALOG;

10. Register the target database
[Oracle11 @ jingyong1 cs] $ rman target sys / system @ db catalog vpc1 / vpc1 @ cs

Recovery Manager: Release 11.2.0.4.0 - Production on Sun May 10 17:46:51 2015

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

Connected to target database: DB (DBID = 1640573015)
Connected to recovery catalog database

RMAN> register database;

Database registered in recovery catalog
Starting full resync of recovery catalog
Full resync complete
     
         
         
         
  More:      
 
- MySQL combination Git achieve differential backups can be used in the production environment (Database)
- MySQL to manage multiple instances of method (Database)
- Java foundation comb: Array (Programming)
- To install Xen in Ubuntu 12.04 (Linux)
- Java static code analysis tool Infer (Programming)
- Flow control message transmission between RAC (Database)
- CentOS How to mount the hard drive (Linux)
- Ubuntu under VirtualBox virtual machine serial port settings (Linux)
- Setting Squid successful anti-hotlinking (Linux)
- Linux configuration startup mount: fstab file (Linux)
- Oracle 11g em start newspaper site's security certificate has a solution to the problem (Database)
- Let 32 Linux / CentOS system to support more than 4G memory (Linux)
- Seven Steps to Help Google Chrome Speed - (Linux)
- Create your own YUM repository (Linux)
- Linux Study of --CentOS create local yum repository (Linux)
- Linux common commands: nslookup, ls md5sum, uname, history, etc. (Linux)
- X security settings in Ubuntu (Linux)
- How to disable IPv6 on Ubuntu, Linux Mint, Debian (Linux)
- 24 Docker recommendations (Linux)
- Sublime Text 3 using summary (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.