Oracle数据库数据恢复、性能优化

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖

41

积分

0

好友

8

主题
1#
发表于 2012-5-4 14:52:17 | 查看: 4693| 回复: 5
backup incremental level 0 format 'C:\oracle\orabak\level0_%U' database plus archivelog delete input  

backup incremental level 0 format 'C:\oracle\orabak\level0_%U' database archivelog all delete input;
这两句之间的差别是一个是plus archivelog 一个是archivelog all,请教他们有什么区别?
2#
发表于 2012-5-4 21:28:15
ODM TEST:


Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /s01/arch
Oldest online log sequence     160
Next log sequence to archive   162
Current log sequence           162


RMAN> backup incremental level 0  database archivelog all delete input;

Starting backup at 04-MAY-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=20 device type=DISK
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=140 RECID=1 STAMP=781976410
input archived log thread=1 sequence=141 RECID=2 STAMP=781976647
input archived log thread=1 sequence=142 RECID=3 STAMP=781977224
input archived log thread=1 sequence=143 RECID=4 STAMP=781977289
input archived log thread=1 sequence=144 RECID=5 STAMP=781977749
input archived log thread=1 sequence=145 RECID=6 STAMP=781977749
input archived log thread=1 sequence=146 RECID=7 STAMP=781977751
input archived log thread=1 sequence=147 RECID=8 STAMP=781977857
input archived log thread=1 sequence=148 RECID=9 STAMP=781977967
input archived log thread=1 sequence=149 RECID=10 STAMP=781978334
input archived log thread=1 sequence=150 RECID=11 STAMP=781978354
input archived log thread=1 sequence=151 RECID=12 STAMP=781978386
input archived log thread=1 sequence=152 RECID=13 STAMP=781978443
input archived log thread=1 sequence=153 RECID=14 STAMP=781978485
input archived log thread=1 sequence=154 RECID=15 STAMP=781978610
input archived log thread=1 sequence=155 RECID=16 STAMP=781978689
input archived log thread=1 sequence=156 RECID=17 STAMP=781978697
input archived log thread=1 sequence=157 RECID=18 STAMP=781995622
input archived log thread=1 sequence=158 RECID=19 STAMP=782002106
input archived log thread=1 sequence=159 RECID=20 STAMP=782401003
input archived log thread=1 sequence=160 RECID=21 STAMP=782402811
input archived log thread=1 sequence=161 RECID=22 STAMP=782402818
channel ORA_DISK_1: starting piece 1 at 04-MAY-12
channel ORA_DISK_1: finished piece 1 at 04-MAY-12
piece handle=/s01/orabase/fast_recovery_area/G11R23/backupset/2012_05_04/o1_mf_annnn_TAG20120504T141434_7t874c42_.bkp tag=TAG20120504T141434 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
channel ORA_DISK_1: deleting archived log(s)
archived log file name=/s01/orabase/fast_recovery_area/G11R23/archivelog/2012_04_30/o1_mf_1_140_7sxtntt0_.arc RECID=1 STAMP=781976410
archived log file name=/s01/arch/1_141_773077545.dbf RECID=2 STAMP=781976647
archived log file name=/s01/arch/1_142_773077545.dbf RECID=3 STAMP=781977224
archived log file name=/s01/arch/1_143_773077545.dbf RECID=4 STAMP=781977289
archived log file name=/s01/orabase/fast_recovery_area/G11R23/archivelog/2012_04_30/o1_mf_1_144_7sxvyo62_.arc RECID=5 STAMP=781977749
archived log file name=/s01/orabase/fast_recovery_area/G11R23/archivelog/2012_04_30/o1_mf_1_145_7sxvyo6l_.arc RECID=6 STAMP=781977749
archived log file name=/s01/orabase/fast_recovery_area/G11R23/archivelog/2012_04_30/o1_mf_1_146_7sxvyqt0_.arc RECID=7 STAMP=781977751
archived log file name=/s01/orabase/fast_recovery_area/G11R23/archivelog/2012_04_30/o1_mf_1_147_7sxw21gc_.arc RECID=8 STAMP=781977857
archived log file name=/s01/orabase/fast_recovery_area/G11R23/archivelog/2012_04_30/o1_mf_1_148_7sxw5hmo_.arc RECID=9 STAMP=781977967
archived log file name=/s01/orabase/fast_recovery_area/G11R23/archivelog/2012_04_30/o1_mf_1_149_7sxwjy8v_.arc RECID=10 STAMP=781978334
archived log file name=/s01/orabase/fast_recovery_area/G11R23/archivelog/2012_04_30/o1_mf_1_150_7sxwkldc_.arc RECID=11 STAMP=781978354
archived log file name=/s01/arch/o1_mf_1_151_0_773077545.arc RECID=12 STAMP=781978386
archived log file name=/s01/orabase/fast_recovery_area/G11R23/archivelog/2012_04_30/o1_mf_1_152_7sxwnc4k_.arc RECID=13 STAMP=781978443
archived log file name=/s01/arch/o1_mf_1_153_0_773077545.arc RECID=14 STAMP=781978485
archived log file name=/s01/orabase/fast_recovery_area/G11R23/archivelog/2012_04_30/o1_mf_1_154_7sxwsl21_.arc RECID=15 STAMP=781978610
archived log file name=/s01/arch/o1_mf_1_155_0_773077545.arc RECID=16 STAMP=781978689
archived log file name=/s01/arch/o1_mf_1_156_0_773077545.arc RECID=17 STAMP=781978697
archived log file name=/s01/arch/o1_mf_1_157_0_773077545.arc RECID=18 STAMP=781995622
archived log file name=/s01/arch/o1_mf_1_158_0_773077545.arc RECID=19 STAMP=782002106
archived log file name=/s01/arch/o1_mf_1_159_0_773077545.arc RECID=20 STAMP=782401003
archived log file name=/s01/arch/o1_mf_1_160_0_773077545.arc RECID=21 STAMP=782402811
archived log file name=/s01/arch/o1_mf_1_161_0_773077545.arc RECID=22 STAMP=782402818
channel ORA_DISK_1: starting incremental level 0 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00004 name=/s01/orabase/oradata/G11R23/users01.dbf
input datafile file number=00001 name=/s01/orabase/oradata/G11R23/system01.dbf
input datafile file number=00002 name=/s01/orabase/oradata/G11R23/sysaux01.dbf
input datafile file number=00005 name=/s01/orabase/oradata/G11R23/example01.dbf
input datafile file number=00003 name=/s01/orabase/oradata/G11R23/undotbs01.dbf
input datafile file number=00006 name=/s01/orabase/oradata/G11R23/datafile/o1_mf_maclean_7r2lqfmd_.dbf
channel ORA_DISK_1: starting piece 1 at 04-MAY-12
channel ORA_DISK_1: finished piece 1 at 04-MAY-12
piece handle=/s01/orabase/fast_recovery_area/G11R23/backupset/2012_05_04/o1_mf_nnnd0_TAG20120504T141434_7t874m0l_.bkp tag=TAG20120504T141434 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:02:36
channel ORA_DISK_1: starting incremental level 0 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 04-MAY-12
channel ORA_DISK_1: finished piece 1 at 04-MAY-12
piece handle=/s01/orabase/fast_recovery_area/G11R23/backupset/2012_05_04/o1_mf_ncnn0_TAG20120504T141434_7t879h6z_.bkp tag=TAG20120504T141434 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 04-MAY-12




SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /s01/arch
Oldest online log sequence     160
Next log sequence to archive   162
Current log sequence           162

回复 只看该作者 道具 举报

3#
发表于 2012-5-4 21:37:12
ODM TEST2 :

SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /s01/arch
Oldest online log sequence     161
Next log sequence to archive   163
Current log sequence           163

RMAN> backup incremental level 0   database plus archivelog delete input;


Starting backup at 04-MAY-12
current log archived
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=20 device type=DISK
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=163 RECID=24 STAMP=782404406
channel ORA_DISK_1: starting piece 1 at 04-MAY-12
channel ORA_DISK_1: finished piece 1 at 04-MAY-12
piece handle=/s01/orabase/fast_recovery_area/G11R23/backupset/2012_05_04/o1_mf_annnn_TAG20120504T143326_7t887pwh_.bkp tag=TAG20120504T143326 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_1: deleting archived log(s)
archived log file name=/s01/arch/o1_mf_1_163_0_773077545.arc RECID=24 STAMP=782404406
Finished backup at 04-MAY-12

Starting backup at 04-MAY-12
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental level 0 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00004 name=/s01/orabase/oradata/G11R23/users01.dbf
input datafile file number=00001 name=/s01/orabase/oradata/G11R23/system01.dbf
input datafile file number=00002 name=/s01/orabase/oradata/G11R23/sysaux01.dbf
input datafile file number=00005 name=/s01/orabase/oradata/G11R23/example01.dbf
input datafile file number=00003 name=/s01/orabase/oradata/G11R23/undotbs01.dbf
input datafile file number=00006 name=/s01/orabase/oradata/G11R23/datafile/o1_mf_maclean_7r2lqfmd_.dbf
channel ORA_DISK_1: starting piece 1 at 04-MAY-12
channel ORA_DISK_1: finished piece 1 at 04-MAY-12
piece handle=/s01/orabase/fast_recovery_area/G11R23/backupset/2012_05_04/o1_mf_nnnd0_TAG20120504T143328_7t887r7f_.bkp tag=TAG20120504T143328 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:55
channel ORA_DISK_1: starting incremental level 0 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 04-MAY-12
channel ORA_DISK_1: finished piece 1 at 04-MAY-12
piece handle=/s01/orabase/fast_recovery_area/G11R23/backupset/2012_05_04/o1_mf_ncnn0_TAG20120504T143328_7t88cddj_.bkp tag=TAG20120504T143328 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 04-MAY-12

Starting backup at 04-MAY-12
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=164 RECID=25 STAMP=782404525
channel ORA_DISK_1: starting piece 1 at 04-MAY-12
channel ORA_DISK_1: finished piece 1 at 04-MAY-12
piece handle=/s01/orabase/fast_recovery_area/G11R23/backupset/2012_05_04/o1_mf_annnn_TAG20120504T143525_7t88cfrn_.bkp tag=TAG20120504T143525 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_1: deleting archived log(s)
archived log file name=/s01/arch/o1_mf_1_164_0_773077545.arc RECID=25 STAMP=782404525
Finished backup at 04-MAY-12



SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /s01/arch
Oldest online log sequence     163
Next log sequence to archive   165
Current log sequence           165

回复 只看该作者 道具 举报

4#
发表于 2012-5-4 21:45:15
结论:

backup incremental level 0 database archivelog all delete input;

1.先执行 对所有候选归档日志的备份和删除原归档文件
2.之后执行数据库的0级增量备份



backup incremental level 0 database plus archivelog delete input  

1.  先执行 ALTER SYSTEM ARCHIVE LOG CURRENT 归档当前在线日志
2.  执行 BACKUP ARCHIVELOG ALL. 备份所有归档日志 并删除原归档文件
3.  执行数据库的0级增量备份
4.  再次 ALTER SYSTEM ARCHIVE LOG CURRENT 归档当前在线日志
5.  备份所有backup备份期间生成的 归档日志

plus archivelog 可以保证热备在恢复recovery 是 恢复到consistent 的状态 , plus archivelog 是10g 以后RMAN的新特性


current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=164 RECID=25 STAMP=782404525
channel ORA_DISK_1: starting piece 1 at 04-MAY-12
channel ORA_DISK_1: finished piece 1 at 04-MAY-12
piece handle=/s01/orabase/fast_recovery_area/G11R23/backupset/2012_05_04/o1_mf_annnn_TAG20120504T143525_7t88cfrn_.bkp tag=TAG20120504T143525 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_1: deleting archived log(s)
archived log file name=/s01/arch/o1_mf_1_164_0_773077545.arc RECID=25 STAMP=782404525

回复 只看该作者 道具 举报

5#
发表于 2012-5-5 11:30:11

疑问: maclean

结论:

backup incremental level 0 database archivelog all delete input;

1.先执行 对所有候选归档日志的备份和删除原归档文件
2.之后执行数据库的0级增量备份

上面是maclean的总结,我在本机试了一下:
[email=SYS@orcl]SYS@orcl> select[/email] * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE    11.2.0.1.0      Production
TNS for 64-bit Windows: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production




RMAN> backup incremental level 0 database archivelog all delete input;

启动 backup 于 05-5月 -12
使用通道 ORA_DISK_1
通道 ORA_DISK_1: 正在启动增量级别 0 数据文件备份集
通道 ORA_DISK_1: 正在指定备份集内的数据文件
输入数据文件: 文件号=00011 名称=F:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\DM.DBF
输入数据文件: 文件号=00004 名称=F:\APP\ADMINISTRATOR\ORADATA\ORCL\USERS01.DBF
输入数据文件: 文件号=00001 名称=F:\APP\ADMINISTRATOR\ORADATA\ORCL\SYSTEM01.DBF
输入数据文件: 文件号=00002 名称=F:\APP\ADMINISTRATOR\ORADATA\ORCL\SYSAUX01.DBF
输入数据文件: 文件号=00006 名称=F:\APP\ADMINISTRATOR\ORADATA\ORCL\BLOCK.DBF
输入数据文件: 文件号=00003 名称=F:\APP\ADMINISTRATOR\ORADATA\ORCL\UNDOTBS01.DBF
输入数据文件: 文件号=00008 名称=F:\APP\ADMINISTRATOR\ORADATA\ORCL\PERFSTAT.DBF
输入数据文件: 文件号=00005 名称=F:\APP\ADMINISTRATOR\ORADATA\ORCL\EXAMPLE01.DBF
输入数据文件: 文件号=00007 名称=F:\APP\ADMINISTRATOR\ORADATA\ORCL\DNAF.DBF
输入数据文件: 文件号=00009 名称=F:\APP\ADMINISTRATOR\ORADATA\ORCL\CHANGSHA.DBF
输入数据文件: 文件号=00012 名称=F:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\DM_ARCHIVE.DBF
输入数据文件: 文件号=00010 名称=F:\APP\ADMINISTRATOR\ORADATA\ORCL\SHANHAI.DBF
通道 ORA_DISK_1: 正在启动段 1 于 05-5月 -12
通道 ORA_DISK_1: 已完成段 1 于 05-5月 -12
段句柄=F:\APP\ADMINISTRATOR\ADMIN\ORCL\BACKUP\ORCL_DB_31NA7C11_1_1_1 标记=TAG20120505T112313 注释=NONE
通道 ORA_DISK_1: 备份集已完成, 经过时间:00:02:25
通道 ORA_DISK_1: 正在启动归档日志备份集
通道 ORA_DISK_1: 正在指定备份集内的归档日志
输入归档日志线程=1 序列=19 RECID=229 STAMP=782478283
输入归档日志线程=1 序列=20 RECID=231 STAMP=782478287
输入归档日志线程=1 序列=21 RECID=233 STAMP=782478306
输入归档日志线程=1 序列=22 RECID=236 STAMP=782478420
输入归档日志线程=1 序列=23 RECID=237 STAMP=782478903
输入归档日志线程=1 序列=24 RECID=240 STAMP=782479073
通道 ORA_DISK_1: 正在启动段 1 于 05-5月 -12
通道 ORA_DISK_1: 已完成段 1 于 05-5月 -12
段句柄=F:\APP\ADMINISTRATOR\ADMIN\ORCL\BACKUP\ORCL_DB_32NA7C5J_1_1_1 标记=TAG20120505T112313 注释=NONE
通道 ORA_DISK_1: 备份集已完成, 经过时间:00:00:01
通道 ORA_DISK_1: 正在删除归档日志
归档日志文件名=F:\APP\ADMINISTRATOR\ADMIN\ORCL\ARCHIVE\O1_MF_1_19_782227222.ARC RECID=229 STAMP=782478283
归档日志文件名=F:\APP\ADMINISTRATOR\ADMIN\ORCL\ARCHIVE\O1_MF_1_20_782227222.ARC RECID=231 STAMP=782478287
归档日志文件名=F:\APP\ADMINISTRATOR\ADMIN\ORCL\ARCHIVE\O1_MF_1_21_782227222.ARC RECID=233 STAMP=782478306
归档日志文件名=F:\APP\ADMINISTRATOR\ORADATA\ORCL\ARCHIVE_2\O1_MF_1_22_782227222.ARC RECID=236 STAMP=782478420
归档日志文件名=F:\APP\ADMINISTRATOR\ADMIN\ORCL\ARCHIVE\O1_MF_1_23_782227222.ARC RECID=237 STAMP=782478903
归档日志文件名=F:\APP\ADMINISTRATOR\ORADATA\ORCL\ARCHIVE_2\O1_MF_1_24_782227222.ARC RECID=240 STAMP=782479073
完成 backup 于 05-5月 -12

启动 Control File and SPFILE Autobackup 于 05-5月 -12
段 handle=F:\APP\ADMINISTRATOR\FLASH_RECOVERY_AREA\ORCL\AUTOBACKUP\2012_05_05\O1_MF_S_782479542_7T97FQFZ_.BKP comment=NO
NE
完成 Control File and SPFILE Autobackup 于 05-5月 -12

怎么是先执行DB incremental level 0 backup;   then backup archivelog all and delete input;???????????

[ 本帖最后由 liuxbgiant 于 2012-5-5 11:33 编辑 ]

回复 只看该作者 道具 举报

6#
发表于 2012-5-5 19:42:42
[oracle@vrh1 ~]$ rman target /

Recovery Manager: Release 11.2.0.3.0 - Production on Sat May 5 07:22:33 2012

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: VPROD (DBID=896680541)

RMAN> backup incremental level 0 database archivelog all delete input;

Starting backup at 05-MAY-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=33 instance=VPROD1 device type=DISK
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=6 RECID=2 STAMP=781836215
input archived log thread=2 sequence=1 RECID=1 STAMP=781835802
input archived log thread=2 sequence=2 RECID=5 STAMP=781837663
input archived log thread=1 sequence=7 RECID=3 STAMP=781837662
input archived log thread=1 sequence=8 RECID=4 STAMP=781837663
input archived log thread=2 sequence=3 RECID=6 STAMP=781839271
input archived log thread=1 sequence=9 RECID=8 STAMP=781847588
input archived log thread=2 sequence=4 RECID=7 STAMP=781839272
input archived log thread=2 sequence=5 RECID=9 STAMP=781856278
input archived log thread=1 sequence=10 RECID=10 STAMP=781856278
input archived log thread=2 sequence=6 RECID=13 STAMP=781862341
input archived log thread=1 sequence=11 RECID=11 STAMP=781862339
input archived log thread=1 sequence=12 RECID=12 STAMP=781862339
input archived log thread=2 sequence=7 RECID=14 STAMP=781862356
input archived log thread=1 sequence=13 RECID=18 STAMP=781862360
input archived log thread=2 sequence=8 RECID=15 STAMP=781862356
input archived log thread=2 sequence=9 RECID=16 STAMP=781862357
input archived log thread=2 sequence=10 RECID=17 STAMP=781862357
input archived log thread=1 sequence=14 RECID=19 STAMP=781869113
input archived log thread=2 sequence=11 RECID=21 STAMP=781869134
input archived log thread=1 sequence=15 RECID=20 STAMP=781869114
input archived log thread=2 sequence=12 RECID=22 STAMP=781869137
input archived log thread=1 sequence=16 RECID=24 STAMP=781885360
input archived log thread=2 sequence=13 RECID=23 STAMP=781869143
input archived log thread=2 sequence=14 RECID=27 STAMP=781930843
input archived log thread=1 sequence=17 RECID=25 STAMP=781914193
input archived log thread=1 sequence=18 RECID=26 STAMP=781930841
input archived log thread=1 sequence=19 RECID=28 STAMP=781952296
input archived log thread=2 sequence=15 RECID=31 STAMP=781952728
input archived log thread=1 sequence=20 RECID=29 STAMP=781952353
input archived log thread=1 sequence=21 RECID=30 STAMP=781952727
input archived log thread=1 sequence=22 RECID=32 STAMP=781999253
input archived log thread=2 sequence=16 RECID=34 STAMP=782136028
input archived log thread=1 sequence=23 RECID=33 STAMP=782125207
input archived log thread=1 sequence=24 RECID=35 STAMP=782172037
input archived log thread=2 sequence=17 RECID=38 STAMP=782195051
input archived log thread=1 sequence=25 RECID=36 STAMP=782195049
input archived log thread=1 sequence=26 RECID=37 STAMP=782195049
input archived log thread=2 sequence=18 RECID=39 STAMP=782195109
input archived log thread=1 sequence=27 RECID=43 STAMP=782195248
input archived log thread=2 sequence=19 RECID=40 STAMP=782195109
input archived log thread=2 sequence=20 RECID=41 STAMP=782195246
input archived log thread=2 sequence=21 RECID=42 STAMP=782195247
input archived log thread=1 sequence=28 RECID=44 STAMP=782195637
input archived log thread=2 sequence=22 RECID=47 STAMP=782195970
input archived log thread=1 sequence=29 RECID=45 STAMP=782195969
input archived log thread=1 sequence=30 RECID=46 STAMP=782195970
input archived log thread=2 sequence=23 RECID=48 STAMP=782195999
input archived log thread=2 sequence=24 RECID=49 STAMP=782203584
input archived log thread=1 sequence=31 RECID=51 STAMP=782278420
input archived log thread=2 sequence=25 RECID=50 STAMP=782203585
input archived log thread=1 sequence=32 RECID=52 STAMP=782360889
input archived log thread=1 sequence=33 RECID=53 STAMP=782431232
input archived log thread=1 sequence=34 RECID=54 STAMP=782460010
channel ORA_DISK_1: starting piece 1 at 05-MAY-12
^C
user interrupt received
Finished backup at 05-MAY-12
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03099: job cancelled at user request



RMAN> backup archivelog all delete input;

Starting backup at 05-MAY-12
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=6 RECID=2 STAMP=781836215
input archived log thread=2 sequence=1 RECID=1 STAMP=781835802
input archived log thread=2 sequence=2 RECID=5 STAMP=781837663
input archived log thread=1 sequence=7 RECID=3 STAMP=781837662
input archived log thread=1 sequence=8 RECID=4 STAMP=781837663
input archived log thread=2 sequence=3 RECID=6 STAMP=781839271
input archived log thread=1 sequence=9 RECID=8 STAMP=781847588
input archived log thread=2 sequence=4 RECID=7 STAMP=781839272
input archived log thread=2 sequence=5 RECID=9 STAMP=781856278
input archived log thread=1 sequence=10 RECID=10 STAMP=781856278
input archived log thread=2 sequence=6 RECID=13 STAMP=781862341
input archived log thread=1 sequence=11 RECID=11 STAMP=781862339
input archived log thread=1 sequence=12 RECID=12 STAMP=781862339
input archived log thread=2 sequence=7 RECID=14 STAMP=781862356
input archived log thread=1 sequence=13 RECID=18 STAMP=781862360
input archived log thread=2 sequence=8 RECID=15 STAMP=781862356
input archived log thread=2 sequence=9 RECID=16 STAMP=781862357
input archived log thread=2 sequence=10 RECID=17 STAMP=781862357
input archived log thread=1 sequence=14 RECID=19 STAMP=781869113
input archived log thread=2 sequence=11 RECID=21 STAMP=781869134
input archived log thread=1 sequence=15 RECID=20 STAMP=781869114
input archived log thread=2 sequence=12 RECID=22 STAMP=781869137
input archived log thread=1 sequence=16 RECID=24 STAMP=781885360
input archived log thread=2 sequence=13 RECID=23 STAMP=781869143
input archived log thread=2 sequence=14 RECID=27 STAMP=781930843
input archived log thread=1 sequence=17 RECID=25 STAMP=781914193
input archived log thread=1 sequence=18 RECID=26 STAMP=781930841
input archived log thread=1 sequence=19 RECID=28 STAMP=781952296
input archived log thread=2 sequence=15 RECID=31 STAMP=781952728
input archived log thread=1 sequence=20 RECID=29 STAMP=781952353
input archived log thread=1 sequence=21 RECID=30 STAMP=781952727
input archived log thread=1 sequence=22 RECID=32 STAMP=781999253
input archived log thread=2 sequence=16 RECID=34 STAMP=782136028
input archived log thread=1 sequence=23 RECID=33 STAMP=782125207
input archived log thread=1 sequence=24 RECID=35 STAMP=782172037
input archived log thread=2 sequence=17 RECID=38 STAMP=782195051
input archived log thread=1 sequence=25 RECID=36 STAMP=782195049
input archived log thread=1 sequence=26 RECID=37 STAMP=782195049
input archived log thread=2 sequence=18 RECID=39 STAMP=782195109
input archived log thread=1 sequence=27 RECID=43 STAMP=782195248
input archived log thread=2 sequence=19 RECID=40 STAMP=782195109
input archived log thread=2 sequence=20 RECID=41 STAMP=782195246
input archived log thread=2 sequence=21 RECID=42 STAMP=782195247
input archived log thread=1 sequence=28 RECID=44 STAMP=782195637
input archived log thread=2 sequence=22 RECID=47 STAMP=782195970
input archived log thread=1 sequence=29 RECID=45 STAMP=782195969
input archived log thread=1 sequence=30 RECID=46 STAMP=782195970
input archived log thread=2 sequence=23 RECID=48 STAMP=782195999
input archived log thread=2 sequence=24 RECID=49 STAMP=782203584
input archived log thread=1 sequence=31 RECID=51 STAMP=782278420
input archived log thread=2 sequence=25 RECID=50 STAMP=782203585
input archived log thread=1 sequence=32 RECID=52 STAMP=782360889
input archived log thread=1 sequence=33 RECID=53 STAMP=782431232
input archived log thread=1 sequence=34 RECID=54 STAMP=782460010
input archived log thread=1 sequence=35 RECID=55 STAMP=782464979
channel ORA_DISK_1: starting piece 1 at 05-MAY-12
channel ORA_DISK_1: finished piece 1 at 05-MAY-12
piece handle=+BACKUPDG/vprod/backupset/2012_05_05/annnf0_tag20120505t072259_0.332.782464981 tag=TAG20120505T072259 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
channel ORA_DISK_1: deleting archived log(s)
archived log file name=+BACKUPDG/vprod/archivelog/2012_04_29/thread_1_seq_6.276.781836215 RECID=2 STAMP=781836215
Finished backup at 05-MAY-12






RMAN> sql 'alter system archive log current';

sql statement: alter system archive log current


RMAN> backup incremental level 0 database archivelog all delete input;

Starting backup at 05-MAY-12
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental level 0 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=+DATA/vprod/datafile/system.730.781835417
input datafile file number=00002 name=+DATA/vprod/datafile/sysaux.731.781835417
input datafile file number=00005 name=+DATA/vprod/datafile/example.738.781835515
input datafile file number=00003 name=+DATA/vprod/datafile/undotbs1.732.781835419
input datafile file number=00006 name=+DATA/vprod/datafile/undotbs2.739.781835687
input datafile file number=00004 name=+DATA/vprod/datafile/users.733.781835419
channel ORA_DISK_1: starting piece 1 at 05-MAY-12
^C
user interrupt received
Finished backup at 05-MAY-12
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03099: job cancelled at user request


RMAN> sql 'alter system archive log current';

sql statement: alter system archive log current

RMAN>  sql 'alter system archive log current';

sql statement: alter system archive log current

RMAN>  sql 'alter system archive log current';

sql statement: alter system archive log current

RMAN>  sql 'alter system archive log current';

sql statement: alter system archive log current

RMAN>  sql 'alter system archive log current';

sql statement: alter system archive log current

RMAN>  sql 'alter system archive log current';

sql statement: alter system archive log current



RMAN> backup incremental level 0 database archivelog all delete input;

Starting backup at 05-MAY-12
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental level 0 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=+DATA/vprod/datafile/system.730.781835417
input datafile file number=00002 name=+DATA/vprod/datafile/sysaux.731.781835417
input datafile file number=00005 name=+DATA/vprod/datafile/example.738.781835515
input datafile file number=00003 name=+DATA/vprod/datafile/undotbs1.732.781835419
input datafile file number=00006 name=+DATA/vprod/datafile/undotbs2.739.781835687
input datafile file number=00004 name=+DATA/vprod/datafile/users.733.781835419
channel ORA_DISK_1: starting piece 1 at 05-MAY-12
^C
user interrupt received
Finished backup at 05-MAY-12
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03099: job cancelled at user request




SQL> create table large_redo tablespace users as select * from dba_objects;

Table created.

SQL> insert into large_redo select * from large_redo;

72820 rows created.

SQL> /

145640 rows created.

SQL> /

291280 rows created.

SQL> commit;

Commit complete.

SQL> insert into large_redo select * from large_redo;

582560 rows created.

SQL> /

1165120 rows created.

SQL> commit;

Commit complete.

SQL> insert into large_redo select * from large_redo;

2330240 rows created.

SQL> commit;

Commit complete.

SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
[oracle@vrh1 ~]$ sqlplus  / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Sat May 5 07:30:24 2012

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            +BACKUPDG
Oldest online log sequence     53
Next log sequence to archive   54
Current log sequence           54


RMAN> backup incremental level 0 database archivelog all delete input;

Starting backup at 05-MAY-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=163 instance=VPROD1 device type=DISK
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=36 RECID=56 STAMP=782465045
input archived log thread=1 sequence=37 RECID=57 STAMP=782465221
input archived log thread=1 sequence=38 RECID=58 STAMP=782465224
input archived log thread=1 sequence=39 RECID=59 STAMP=782465228
input archived log thread=1 sequence=40 RECID=60 STAMP=782465231
input archived log thread=1 sequence=41 RECID=61 STAMP=782465234
input archived log thread=1 sequence=42 RECID=62 STAMP=782465238
input archived log thread=1 sequence=43 RECID=63 STAMP=782465302
input archived log thread=1 sequence=44 RECID=64 STAMP=782465318
input archived log thread=1 sequence=45 RECID=65 STAMP=782465322
input archived log thread=1 sequence=46 RECID=66 STAMP=782465325
input archived log thread=1 sequence=47 RECID=67 STAMP=782465328
input archived log thread=1 sequence=48 RECID=68 STAMP=782465342
input archived log thread=1 sequence=49 RECID=69 STAMP=782465346
input archived log thread=1 sequence=50 RECID=70 STAMP=782465348
input archived log thread=1 sequence=51 RECID=71 STAMP=782465350
input archived log thread=1 sequence=52 RECID=72 STAMP=782465351
input archived log thread=1 sequence=53 RECID=73 STAMP=782465353
channel ORA_DISK_1: starting piece 1 at 05-MAY-12



"backup incremental level 0 database archivelog all delete input;"  备份的优先级 应当根据 需要备份ARCHIVELOG归档日志的大小(不是个数,而是实际需要备份的ARCHIVELOG的容量) 和相关的内部算法决定。

在以上 示例测试中   当有 少量redo archivelog需要备份时 , "backup incremental level 0 database archivelog all delete input;" 优先备份了 incremental level 0 database ,之后才备份了 archivelog

当有大量redo archivelog 需要备份时,  "backup incremental level 0 database archivelog all delete input;"  优先备份了归档日志

这可能是 某个版本以后加入的 rman 优先级算法,算是一个比较隐秘的特性。 相关的隐藏参数可能是 _rman_io_priority

回复 只看该作者 道具 举报

您需要登录后才可以回帖 登录 | 注册

QQ|手机版|Archiver|Oracle数据库数据恢复、性能优化

GMT+8, 2024-12-25 00:34 , Processed in 0.049270 second(s), 21 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部
TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569