【RMAN】使用恢復目錄catalog備份目標資料庫的演示

secooler發表於2009-07-28
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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章