ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 【RMAN】使用恢复目录catalog备份目标数据库的演示

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

原创 Linux操作系统 作者:secooler 时间:2009-07-28 16:27:58 0 删除 编辑
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/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
Oracle ACE 总监,阿里云MVP,北京大学理学硕士,恩墨学院创始人,教育专家,中国区 Cloudera 首位官方授权大数据讲师,金牌培训专家,BDA大数据联盟创始人,OCM联盟创始人,ACCUG创始人、ACOUG核心专家,Blogger。

注册时间:2008-03-16

  • 博文量
    797
  • 访问量
    7975193