以下是使用rman虚拟专用目录步骤:
1、配置恢复目录数据库
在恢复目录数据库上创建恢复目录所有者的表空间
SQL> CREATE TABLESPACE rcat_ts DATAFILE SIZE 15M;
2、创建恢复目录所有者
CREATE USER catowner/ IDENTIFIED BY oracle
TEMPORARY TABLESPACE temp
DEFAULT TABLESPACE rcat_ts
QUOTA UNLIMITED ON rcat_ts;
-
创建RMAN 基本目录:
RMAN> CONNECT CATALOG catowner/oracle@catdb
RMAN> CREATE CATALOG; -
将RECOVERY_CATALOG_OWNER授予给VPC 所有者:
SQL> CONNECT SYS/oracle@catdb AS SYSDBA
SQL> GRANT RECOVERY_CATALOG_OWNER to vpcowner;
5.1.将REGISTER授予给VPC 所有者:
RMAN> CONNECT CATALOG catowner/oracle@catdb
RMAN> GRANT REGISTER DATABASE TO vpcowner;
5.2.或将CATALOG FOR DATABASE授予给VPC 所有者:
RMAN>GRANT CATALOG FOR DATABASE db10g TO vpcowner;
6.1.为11g客户机创建虚拟目录:
RMAN> CONNECT CATALOGvpcowner/oracle@catdb
RMAN> CREATE VIRTUAL CATALOG;
6.2或者为11g之前的客户机创建虚拟目录:
SQL> CONNECT vpcowner/oracle@catdb
SQL> exec catowner.dbms_rcvcat.create_virtual_catalog;
-
在目录中注册新数据库:
RMAN> CONNECT TARGET / CATALOG vpcowner/oracle@catdb
RMAN> REGISTER DATABASE; -
使用虚拟目录:
RMAN> CONNECT TARGET / CATALOG vpcowner/oracle@catdb;
RMAN> BACKUP DATABASE;