配置RMAN恢复目录

1、创建表空间、用户、授权

 

SQL> create tablespace ts_rman datafile '/oradata/rman.dbf' size 100M;

 

SQL> create user rman identified by rman default tablespace ts_rman;

 

SQL> grant connect ,resource , recovery_catalog_owner to rman;

 

 

 

2、连接到rman,启动rman工具

 

oracle@linux:~> rman catalog rman/rman@catdb

 

恢复管理器: Release 10.2.0.4.0 - Production on 星期二 5 14 20:13:05 2013

 

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

 

连接到恢复目录数据库

 

 

 

3、创建恢复目录

 

RMAN> create catalog

 

恢复目录已创建

 

 

 

4、退出后连接

 

oracle@linux:~> rman target / catalog rman/rman@catdb

 

恢复管理器: Release 10.2.0.4.0 - Production on 星期二 5 14 20:18:50 2013

 

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

 

连接到目标数据库: ZXIN (DBID=1413439187)

 

连接到恢复目录数据库

 

 

 

5、注册目标数据库

 

RMAN> register database;

 

注册在恢复目录中的数据库

 

正在启动全部恢复目录的 resync

 

完成全部 resync

 

 

 

6、解除登记数据库(在恢复目录数据库上执行)

 

sqlplus rman/rman@catdb

 

SQL> select db_key,dbid from rman.rc_database;  --查出dbid
SQL> execute dbms_rcvcat.unregisterdatabase(db_key, db_id);

 

注:Oracle 10g中,Oracle终于简化了这个操作,现在通过一条简单的命令unregister database就可以注销数据库。

 

 

 

7、删除CATALOG用户的表
oracle@linux:~> rman catalog rman/rman@catdb

 

恢复管理器: Release 10.2.0.4.0 - Production on 星期二 5 14 20:29:53 2013

 

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

 

连接到恢复目录数据库

 

RMAN> drop catalog

 

恢复目录所有者是RMAN

 

再输入一次 DROP CATALOG 命令来确认目录删除

 

RMAN> drop catalog

恢复目录已删除

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值