RMAN

客户端test到另一个数据库(rhel2)的网络服务名是rhel2。在rhel2数据库上面创建恢复目录/恢复数据库。
test:
1.以用户sys的身份连接rhel2数据库
SQL> conn sys/oracle@rhel2 as sysdba
Connected.

2.创建表空间
SQL> create tablespace tbs_catalog
  2  datafile '/u01/app/oracle/oradata/orcl/catalog.dbf' size 10M;

Tablespace created.


3.创建用户
SQL> create user rman identified by oracle
  2  temporary tablespace temp
  3  default tablespace tbs_catalog
  4  quota unlimited on tbs_catalog;

User created.


4.把recovery_catalog_owner角色授予用户rman
SQL> grant recovery_catalog_owner to rman;

Grant succeeded.


5.以rman的身份登录到恢复目录所在的数据库
[oracle@linux5 ~]$ rman
Recovery Manager: Release 10.2.0.1.0 - Production on Fri Jul 25 08:34:01 2014
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
RMAN> connect catalog rman@rhel2
recovery catalog database Password: 

connected to recovery catalog database


6.创建恢复目录
RMAN> create catalog tablespace tbs_catalog;

recovery catalog created


7.以rman的身份登录到恢复目录
SQL> connect rman/oracle@rhel2
Connected.
SQL> select table_name from user_tables;
TABLE_NAME
------------------------------
ROUT
RCVER
DB
NODE
CONF
DBINC
CKP
TS
TSATT
DF
DFATT


TABLE_NAME
------------------------------
TF
TFATT
OFFR
RR
RT
ORL
RLH
AL
BS
BP
BCF


TABLE_NAME
------------------------------
CCF
XCF
BSF
BDF
CDF
XDF
BRL
BCB
CCB
SCR
SCRL


TABLE_NAME
------------------------------
CONFIG
XAL
RSR
FB


37 rows selected.

有这些表说明恢复目录创建成功。
把数据库注册到恢复目录:
[oracle@linux5 ~]$ rman
Recovery Manager: Release 10.2.0.1.0 - Production on Fri Jul 25 08:48:29 2014
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
连接到目标数据库:
RMAN> connect target system
target database Password: 
connected to target database: ORCL (DBID=1368292794)
连接到恢复目录:
RMAN> connect catalog rman/oracle@rhel2
connected to recovery catalog database
把目标数据库的信息注册到恢复目录:
RMAN> register database;
database registered in recovery catalog
starting full resync of recovery catalog
full resync complete
RMAN> 


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值