ITPub博客

首页 > 数据库 > Oracle > rman虚拟专用目录

rman虚拟专用目录

原创 Oracle 作者:lovestanford 时间:2014-02-26 11:41:34 0 删除 编辑
http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta013.htm#RCMRF117
以下是使用rman虚拟专用目录步骤:
1. 创建RMAN 基本目录:
RMAN> CONNECCATALOG catowner/oracle@catdb
RMAN> CREATE CATALOG;
2. 将RECOVERY_CATALOG_OWNER授予给VPC 所有者:
SQL> CONNECT SYS/oracle@catdb AS SYSDBA
SQL> GRANT RECOVERY_CATALOG_OWNER to vpcowner;
3a.将REGISTER授予给VPC 所有者:
RMAN> CONNECCATALOG catowner/oracle@catdb
RMAN> GRANT REGISTER DATABASE TO vpcowner;
3b.或将CATALOG FOR DATABASE授予给VPC 所有者:
RMAN>GRANT CATALOG FOR DATABASE db10g TO vpcowner;


4a.为11g客户机创建虚拟目录:
RMAN> CONNECCATALOGvpcowner/oracle@catdb
RMAN> CREATE VIRTUAL CATALOG;
4b.或者为11g之前的客户机创建虚拟目录:
SQL> CONNECvpcowner/oracle@catdb
SQL> exec catowner.dbms_rcvcat.create_virtual_catalog;
5. 在目录中注册新数据库:
RMAN> CONNECT TARGET / CATALOG vpcowner/oracle@catdb
RMAN> REGISTER DATABASE;
6. 使用虚拟目录:
RMAN> CONNECT TARGET / CATALOG vpcowner/oracle@catdb;
RMAN> BACKUP DATABASE;

可以为数据库组和用户组创建虚拟专用RMAN 目录。
1. 目录所有者将创建基本目录。
2. 目录数据库的DBA 可以创建拥有虚拟专用目录(VPC) 的用户,并授予其RECOVERY_CATALOG_OWNER权限。
3. 基本目录的所有者可为VPC 所有者授予访问先前注册的数据库的权限或授予REGISTER权限。GRANT CATALOG命令如下:
GRANT CATALOG FOR DATABASE prod1, prod2 TO vpcowner;
GRANT REGISTER命令如下:
GRANT REGISTER DATABASE TO vpcowner;
然后,虚拟目录所有者可连接到特定目标的目录,或者注册一个目标数据库。配置完VPC 之后,VPC 所有者可像使用标准基本目录一样使用该目录。

4. 创建虚拟专用目录。
a. 如果目标数据库是Oracle Database 11g数据库并且RMAN 客户机是11g客户机,则可使用RMAN 命令:
CREATE VIRTUAL CATALOG;
b. 如果目标数据库是Oracle Database 10g发行版2 或更早版本(使用兼容客户机),则必须从SQL*Plus 执行提供的过程:
BASE_CATALOG_OWNER.DBMS_RCVCAT.CREATE_VIRTUAL_CATALOG;
5. 使用VPC 所有者登录名连接到该目录,将其作为常规目录使用。
6. 虚拟目录所有者只能查看其有访问权限的那些数据库。对于大多数RMAN 操作,你还需要针对目标数据库的SYSDBA或SYSOPER权限。



官方参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta013.htm#RCMRF117

Because this operator eventually intends to use the virtual catalog with Oracle Database 10g target databases, the operator must execute theCREATE_VIRTUAL_CATALOG PL/SQL procedure before using the virtual catalog (as explained in "Usage Notes"). In the following example, the backup operator connects to the recovery catalog database as vpc1 and executes the PL/SQL procedure as follows:

SQL> CONNECT vpc1@catdb
Enter password:
password
Connected.
SQL> BEGIN
  2  catowner.DBMS_RCVCAT.CREATE_VIRTUAL_CATALOG;
  3  END;
  4  /

Usage Notes

Typically, you create the recovery catalog in a database created especially for this purpose. It is not recommended to create the recovery catalog in the SYSschema.

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.

The owner of the base recovery catalog can GRANT or REVOKE restricted access to the catalog to other database users. Each restricted user has full read/write access to his own metadata, which is called a virtual private catalog. The RMAN metadata is stored in the schema of the virtual private catalog owner. The owner of the base recovery catalog controls what each virtual catalog user can access.

You must take an extra step when intending to use a 10.2 or earlier release of RMAN with a virtual catalog. Before using the virtual private catalog, this user must connect to the recovery catalog database as the virtual catalog owner and execute the following PL/SQL procedure (where base_catalog_owner is the database user who owns the base recovery catalog):

base_catalog_owner.DBMS_RCVCAT.CREATE_VIRTUAL_CATALOG


官方参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta013.htm#RCMRF117


Because this operator eventually intends to use the virtual catalog with Oracle Database 10g target databases, the operator must execute theCREATE_VIRTUAL_CATALOG PL/SQL procedure before using the virtual catalog (as explained in "Usage Notes"). In the following example, the backup operator connects to the recovery catalog database as vpc1 and executes the PL/SQL procedure as follows:

SQL> CONNECT vpc1@catdb
Enter password:
password
Connected.
SQL> BEGIN
  2  catowner.DBMS_RCVCAT.CREATE_VIRTUAL_CATALOG;
  3  END;
  4  /

Usage Notes

Typically, you create the recovery catalog in a database created especially for this purpose. It is not recommended to create the recovery catalog in the SYSschema.

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.

The owner of the base recovery catalog can GRANT or REVOKE restricted access to the catalog to other database users. Each restricted user has full read/write access to his own metadata, which is called a virtual private catalog. The RMAN metadata is stored in the schema of the virtual private catalog owner. The owner of the base recovery catalog controls what each virtual catalog user can access.

You must take an extra step when intending to use a 10.2 or earlier release of RMAN with a virtual catalog. Before using the virtual private catalog, this user must connect to the recovery catalog database as the virtual catalog owner and execute the following PL/SQL procedure (where base_catalog_owner is the database user who owns the base recovery catalog):

base_catalog_owner.DBMS_RCVCAT.CREATE_VIRTUAL_CATALOG


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/21754115/viewspace-1090853/,如需转载,请注明出处,否则将追究法律责任。

上一篇: Oracle 11gR2 SCAN
下一篇: Invisible Index
请登录后发表评论 登录
全部评论

注册时间:2012-09-27

  • 博文量
    213
  • 访问量
    980140