162209240.png
这一项功能使得rman的恢复目录更加安全。基本原理是:
catalog

owner创建一个传统的恢复目录,并grantrecover_catalog_owner权限给虚拟专用catalog用户,虚拟专用catalog用户还需要被授予注册数据库权限。之后使用该虚拟专用catalog用户去注册特定的数据库。该虚拟专用catalog用户只能访问他自己注册的数据库,而原catalogowner可以看到所有虚拟专用catalog用户注册的数据库。
我打个比方:一分多,的意思。

[oracle@station90~]$.oraenv
ORACLE_SID=[orcl]?rcat
TheOraclebaseforORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1is/u01/app/oracle
[oracle@station90~]$sqlplus/nolog
SQL*Plus:Release11.2.0.1.0ProductiononWedOct2311:24:042013
Copyright(c)1982,2009,Oracle.Allrightsreserved.
SQL>conn/assysdba
Connected.
SQL>createuserv90identifiedbyoracle_4Udefaulttablespacercatquotaunlimitedonrcat;
SQL>grantrecovery_catalog_ownertov90;
Grantsucceeded.



[oracle@station90~]$.oraenv
ORACLE_SID=[rcat]?orcl
TheOraclebaseforORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1is/u01/app/oracle
[oracle@station90~]$rmantarget/catalogu90/oracle_4U@rcat
RecoveryManager:Release11.2.0.1.0-ProductiononWedOct2311:28:232013
Copyright(c)1982,2009,Oracleand/oritsaffiliates.Allrightsreserved.
connectedtotargetdatabase:ORCL(DBID=1343950367)
connectedtorecoverycatalogdatabase
RMAN>grantregisterdatabasetov90;
Grantsucceeded.
RMAN>


[oracle@station90~]$rmantarget/catalogv90/oracle_4U@rcat
RecoveryManager:Release11.2.0.1.0-ProductiononWedOct2314:57:402013
Copyright(c)1982,2009,Oracleand/oritsaffiliates.Allrightsreserved.
connectedtotargetdatabase:ORCL(DBID=1343950367)
connectedtorecoverycatalogdatabase
RMAN>createvirtualcatalog;
foundeligiblebasecatalogownedbyU90
createdvirtualcatalogagainstbasecatalogownedbyU90
注意最后两句很能说明:“一分多”的原理。


rmantarget/catalogv90/oracle_4U@rcat
RecoveryManager:Release11.2.0.1.0-ProductiononWedOct2315:00:332013
Copyright(c)1982,2009,Oracleand/oritsaffiliates.Allrightsreserved.
connectedtotargetdatabase:ORCL(DBID=1343950367)
connectedtorecoverycatalogdatabase
RMAN>registerdatabase;
databaseregisteredinrecoverycatalog
startingfullresyncofrecoverycatalog
fullresynccomplete


以下直接连入catalog查询,就是最好的关于“一分多”的说明:





SQL*Plus:Release11.2.0.1.0ProductiononWedOct2315:36:522013

Copyright(c)1982,2009,Oracle.Allrightsreserved.

SQL>connu90/oracle_4U@rcat
Connected.
SQL>select*fromdb;

DB_KEYDB_IDCURR_DBINC_KEY
----------------------------------
142913515900151430
169113518503221692
338013570656993381
220313460414802204
321013509509033211
239413531462362395
388213439503673883

7rowsselected.

SQL>connv90/oracle_4U@rcat
Connected.
SQL>select*fromdb;

DB_KEYDB_IDCURR_DBINC_KEY
----------------------------------
388213439503673883

SQL>