设为首页收藏本站

Botang唐波's Oracle Station

【博客文章2013】Oracle11gR2创建虚拟专用恢复目录

2016-5-13 11:10| 发布者: admin| 查看: 2013| 评论: 0

摘要: Oracle11gR2创建虚拟专用恢复目录

原始连接


Oracle11gR2创建虚拟专用恢复目录





这一项功能使得rman的恢复目录更加安全。基本原理是:
catalog  owner创建一个传统的恢复目录,并grant recover_catalog_owner权限给虚拟专用catalog用户,虚拟专用catalog用户还需要被授予注册数据库权限。之后使用该虚拟 专用catalog用户去注册特定的数据库。该虚拟专用catalog用户只能访问他自己注册的数据库,而原catalog owner可以看到所有虚拟专用catalog用户注册的数据库。
我打个比方:一分多,的意思。

[oracle@station90 ~]$ . oraenv
ORACLE_SID = [orcl] ? rcat
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
[oracle@station90 ~]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.1.0 Production on Wed Oct 23 11:24:04 2013
Copyright (c) 1982, 2009, Oracle.  All rights reserved.
SQL> conn / as sysdba
Connected.
SQL> create user v90 identified by oracle_4U default tablespace rcat quota unlimited on rcat;
SQL> grant recovery_catalog_owner to v90;
Grant succeeded.



[oracle@station90 ~]$ . oraenv
ORACLE_SID = [rcat] ? orcl
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
[oracle@station90 ~]$ rman target / catalog u90/oracle_4U@rcat
Recovery Manager: Release 11.2.0.1.0 - Production on Wed Oct 23 11:28:23 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
connected to target database: ORCL (DBID=1343950367)
connected to recovery catalog database
RMAN> grant register database to v90;
Grant succeeded.
RMAN>


[oracle@station90 ~]$ rman target / catalog v90/oracle_4U@rcat
Recovery Manager: Release 11.2.0.1.0 - Production on Wed Oct 23 14:57:40 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
connected to target database: ORCL (DBID=1343950367)
connected to recovery catalog database
RMAN> create virtual catalog;
found eligible base catalog owned by U90
created virtual catalog against base catalog owned by U90
注意最后两句很能说明:“一分多”的原理。


rman target / catalog v90/oracle_4U@rcat
Recovery Manager: Release 11.2.0.1.0 - Production on Wed Oct 23 15:00:33 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
connected to target database: ORCL (DBID=1343950367)
connected to recovery catalog database
RMAN> register database;
database registered in recovery catalog
starting full resync of recovery catalog
full resync complete


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



SQL*Plus: Release 11.2.0.1.0 Production on Wed Oct 23 15:36:52 2013

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

SQL> conn u90/oracle_4U@rcat
Connected.
SQL> select * from db;

    DB_KEY    DB_ID CURR_DBINC_KEY
---------- ---------- --------------
      1429 1351590015        1430
      1691 1351850322        1692
      3380 1357065699        3381
      2203 1346041480        2204
      3210 1350950903        3211
      2394 1353146236        2395
      3882 1343950367        3883

7 rows selected.

SQL> conn v90/oracle_4U@rcat
Connected.
SQL> select * from db;

    DB_KEY    DB_ID CURR_DBINC_KEY
---------- ---------- --------------
      3882 1343950367        3883

SQL>
1

鲜花

握手

雷人

路过

鸡蛋

刚表态过的朋友 (1 人)

QQ|手机版|Botang唐波's Oracle Station    

GMT+8, 2017-6-16 16:26 , Processed in 0.125120 second(s), 21 queries .

返回顶部