CONFIGURE CONTROLFILE AUTOBACKUP ON/OFF;

原文地址:CONFIGURE CONTROLFILE AUTOBACKUP ON/OFF; 作者:一笑而过
关于rman的,
环境
oracle 10.2.0
rman nocatalog方式
1、首先设置
CONFIGURE CONTROLFILE AUTOBACKUP ON;
然后进行 数据库全备份
RMAN> backup database;

Starting backup at 21-APR-10
using channel ORA_SBT_TAPE_1
channel ORA_SBT_TAPE_1: starting full datafilebackupset
channel ORA_SBT_TAPE_1: specifying datafile(s) inbackupset
input datafile fno=00001name=/opt/oracle/oradata/test/system01.dbf
input datafile fno=00003name=/opt/oracle/oradata/test/sysaux01.dbf
input datafile fno=00002name=/opt/oracle/oradata/test/undotbs01.dbf
input datafile fno=00004name=/opt/oracle/oradata/test/users01.dbf
input datafile fno=00005 name=/opt/oracle/oradata/test/a1.dbf
channel ORA_SBT_TAPE_1: starting piece 1 at21-APR-10
channel ORA_SBT_TAPE_1: finished piece 1 at21-APR-10
piece handle=2ilbml4g_1_1 tag=TAG20100421T162551 comment=APIVersion 2.0,MMS Version 5.0.0.0
channel ORA_SBT_TAPE_1: backup set complete,elap sed time:00:00:45
Finished backup at 21-APR-10

Starting Control File and SPFILE Autobackup at21-APR-10
piece handle=c-2011851712-20100421-06 comment=API Version 2.0,MMSVersion 5.0.0.0
Finished Control File and SPFILE Autobackup at21-APR-10

可以看见对controlfile和spfile进行了备份,并且可以验证:
RMAN> list backup of controlfile;


List of Backup Sets
===================

BS Key    Type LV Size        DeviceType Elapsed Time Completion Time
------- ---- -- ---------- ----------- ---------------------------
73        Full    7.00M        SBT_TAPE    00:00:31        21-APR-10       
            BP Key:73    Status:AVAILABLE    Compressed:NO    Tag: TAG20100421T162007
            Handle:2hlbmkr5_1_1    Media: @aaaab
    Control File Included: CkpSCN: 597114        Ckptime: 21-APR-10

BS Key    Type LV Size        DeviceType Elapsed Time Completion Time

2、再设置
CONFIGURE CONTROLFILE AUTOBACKUP OFF;

同样的备份

RMAN> backup database;

Starting backup at 21-APR-10
released channel: ORA_DISK_1
using channel ORA_SBT_TAPE_1
channel ORA_SBT_TAPE_1: starting full datafilebackupset
channel ORA_SBT_TAPE_1: specifying datafile(s) inbackupset
input datafile fno=00001name=/opt/oracle/oradata/test/system01.dbf
input datafile fno=00003name=/opt/oracle/oradata/test/sysaux01.dbf
input datafile fno=00002name=/opt/oracle/oradata/test/undotbs01.dbf
input datafile fno=00004name=/opt/oracle/oradata/test/users01.dbf
input datafile fno=00005 name=/opt/oracle/oradata/test/a1.dbf
channel ORA_SBT_TAPE_1: starting piece 1 at21-APR-10
channel ORA_SBT_TAPE_1: finished piece 1 at21-APR-10
piece handle=2glbmkpn_1_1 tag=TAG20100421T162007 comment=APIVersion 2.0,MMS Version 5.0.0.0
channel ORA_SBT_TAPE_1: backup set complete,elapsed time:00:00:46
channel ORA_SBT_TAPE_1: starting full datafilebackupset
channel ORA_SBT_TAPE_1: specifying datafile(s) inbackupset
including current control file in backupset
including current SPFILE in backupset

channel ORA_SBT_TAPE_1: starting piece 1 at21-APR-10
channel ORA_SBT_TAPE_1: finished piece 1 at21-APR-10
piece handle=2hlbmkr5_1_1 tag=TAG20100421T162007 comment=APIVersion 2.0,MMS Version 5.0.0.0
channel ORA_SBT_TAPE_1: backup set complete,elapsed time:00:00:36
Finished backup at 21-APR-10
好像也对controlfile和spfile进行了备份
验证
RMAN> list backup of controlfile;


List of Backup Sets
===================

BS Key    Type LV Size        DeviceType Elapsed Time Completion Time
------- ---- -- ---------- ----------- ---------------------------
73        Full    7.00M        SBT_TAPE    00:00:31        21-APR-10       
            BP Key:73    Status:AVAILABLE    Compressed:NO    Tag: TAG20100421T162007
            Handle:2hlbmkr5_1_1    Media: @aaaab
    Control File Included: CkpSCN: 597114        Ckptime: 21-APR-10

BS Key    Type LV Size        DeviceType Elapsed Time Completion Time
------- ---- -- ---------- ----------- ---------------------------
75        Full    7.00M        SBT_TAPE    00:00:33        21-APR-10       
            BP Key:75    Status:AVAILABLE    Compressed:NO    Tag: TAG20100421T162637
            Handle:c-2011851712-20100421-06    Media:@aaaab
    Control File Included: CkpSCN: 597334        Ckptime: 21-APR-10

两种方式都进行了controlfile和spfile的备份,但不知道其中有何不同?
 
 
自动备份打开时,会在把数据文件,日志文件,控制文件,SPfile等等都备份完了后,再自动备份一遍当前的控制文件。因为你在上面的备份完成后,控制文件里面记载的信息就发生了变化的,自动备份就会把它备一遍。
自动备份关闭时,就不会最后再备一遍了。

你可能感兴趣的:(CONFIGURE CONTROLFILE AUTOBACKUP ON/OFF;)