【RMAN】使用恢复目录catalog备份目标数据库的演示

1.连接到目标数据库
ora10g@testdb /home/oracle$ rman target /

Recovery Manager: Release 10.2.0.1.0 - Production on Tue Jul 28 16:16:29 2009

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

connected to target database: ORA10G (DBID=4010369505)

2.连接到恢复目录
RMAN> connect catalog rman_catalog/hsw@secooler

connected to recovery catalog database

3.以备份控制文件演示一下备份的过程
RMAN> backup current controlfile;

Starting backup at 2009-07-28 16:17:46
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=134 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
channel ORA_DISK_1: starting piece 1 at 2009-07-28 16:17:47
channel ORA_DISK_1: finished piece 1 at 2009-07-28 16:17:48
piece handle=/oracle/app/oracle/flash_recovery_area/ORA10G/backupset/2009_07_28/o1_mf_ncnnf_TAG20090728T161747_56xf1cz4_.bkp tag=TAG20090728T161747 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 2009-07-28 16:17:48

RMAN>

4.发现了吧,没有出现“using target database control file instead of recovery catalog”的提示信息,因为我们使用的是恢复目录进行备份的嘛。


--------------------------------------------------------------------------
5.最后演示一下取消注册到恢复目录的效果
ora10g@testdb /home/oracle$ rman target /

Recovery Manager: Release 10.2.0.1.0 - Production on Tue Jul 28 16:23:28 2009

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

connected to target database: ORA10G (DBID=4010369505)

RMAN> connect catalog rman_catalog/hsw@secooler

connected to recovery catalog database

RMAN> unregister database;

database name is "ORA10G" and DBID is 4010369505

Do you really want to unregister the database (enter YES or NO)? y
database unregistered from the recovery catalog


RMAN> exit


Recovery Manager complete.

ora10g@testdb /home/oracle$
ora10g@testdb /home/oracle$ rman target /

Recovery Manager: Release 10.2.0.1.0 - Production on Tue Jul 28 16:24:06 2009

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

connected to target database: ORA10G (DBID=4010369505)

RMAN> backup current controlfile;

Starting backup at 2009-07-28 16:24:15
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=137 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
channel ORA_DISK_1: starting piece 1 at 2009-07-28 16:24:17
channel ORA_DISK_1: finished piece 1 at 2009-07-28 16:24:18
piece handle=/oracle/app/oracle/flash_recovery_area/ORA10G/backupset/2009_07_28/o1_mf_ncnnf_TAG20090728T162416_56xffk2q_.bkp tag=TAG20090728T162416 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 2009-07-28 16:24:18

RMAN>


-- The End --

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/519536/viewspace-610650/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/519536/viewspace-610650/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值