rman backup zhi section size

本文详细介绍了Oracle RMAN中的SECTIONSIZE参数,该参数能够提高大数据文件的备份效率。通过将大型数据文件分割成更小的部分进行并行处理,显著提升了备份速度。文章提供了具体的配置示例和运行结果。

DBA运维工作中,可能会遇到数据库中个别的数据文件非常大,这样就会造成rman备份的速度缓慢(即便是多个并行的配置,但依然会是单通道的去备份该大数据文件的情况)11gr2后,Oracle 对此,在备份恢复特性中,推出了增强参数 SECTION SIZE。


官方的原文:

Specifies the size of each backup section produced during a data file backup.

By setting this parameter, RMAN can create a multisection backup. In a multisection backup, RMAN creates a backup piece that contains one file section, which is a contiguous range of blocks in a file. All sections of a multisection backup are the same size. You can create a multisection backup for a data file, but not a data file copy.

如果设置了section size参数,Rman就会创建一个连续范围内(大小为section 决定)的block 组成的备分片。每个备份片大小相同。且它只能在你备份数据文件(或者数据库,亲测),不能用在数据文件copy的备份方式上。

File sections enable RMAN to create multiple steps for the backup of a single large data file. RMAN channels can process each step independently and in parallel, with each channel producing one section of a multisection backup set.

file section 能让rman备份单个大数据文件是分成多个步骤(多个通道按照sectionsize创建备份片),实现并行处理。

If you specify a section size that is larger than the size of the file, then RMAN does not use multisection backup for the file. If you specify a small section size that would produce more than 256 sections, then RMAN increases the section size to a value that results in exactly 256 sections.

如果指定的section size比这个大数据文件还大,rman将无法提供并行备份(即该参数失效)。如果指定的大小非常小,rman会已256份为界限,将大数据文件的size/section size >256 ,调整为 section size为合理的大小,使备份片的量等于256份;

Depending on where you specify this parameter in the RMAN syntax, you can specify different section sizes for different files in the same backup job.备份不同数据文件可以指定不同section size.
Note: You cannot use SECTION SIZE with MAXPIECESIZE or withINCREMENTAL LEVEL 1.
注意,当指定了maxpiecesize 或者做1集备份时该参数失效

例1-1:

run { 
allocate channel c1 type sbt;
allocate channel c2 type sbt;
allocate channel c3 type sbt;
allocate channel c4 type sbt;
backup as compressed backupset datafile 6 section size 10g;
release channel c1;
release channel c2;
release channel c3;
release channel c4;
}

脚本中将启动4个通道,每个通道读取6号数据库文件的一段10GB的连续的block段。
每个通道将生成包含段的备份的片(单独的物理文件)。如果文件为200GB, 将有20个这样的片,一次生成4个,会连续创建5次。
如果没有section size 关键字,并行读将为1(也就是序列化),只会用一个通道执行整个操作。

注意:在用Format定义备份集名字时要记得加上%U,否则会出rman-3009 ora-19504 ora-27038的错。

例1-2 (基于linux 平台 11.2.0.4 单实例)

source /home/oracle/.profile
export ORACLE_SID=wengtf
rman target / <<EOF
run{
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
allocate channel c4 type disk;
backup incremental level 0 cumulative section size 100M database format '/home/oracle/backup_%T_%n_%U'; 
release channel c1;
release channel c2;
release channel c3;
release channel c4;
}
 
run{
allocate channel c00 type disk;
backup archivelog  all format '/home/oracle/arch_backup_%T_%n_%U' delete all input;
release channel c00;
}
 
run{
allocate channel c01 type disk;
crosscheck backup;
delete noprompt expired backup;
delete noprompt obsolete device type disk;
release channel c01;
}
 
exit
 
EOF
 
mutt -s "test01_DailyBackup " -a /home/oracle/DailyBackup.log -- 邮件地址

例1-2 输出(live800 数据文件被分为10份):

Recovery Manager: Release 11.2.0.4.0 - Production on Sun Mar 6 14:59:01 2016
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
connected to target database: TEST1 (DBID=1279889488)
RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 
using target database control file instead of recovery catalog
allocated channel: c1
channel c1: SID=171 device type=DISK
allocated channel: c2
channel c2: SID=193 device type=DISK
allocated channel: c3
channel c3: SID=4 device type=DISK
allocated channel: c4
channel c4: SID=25 device type=DISK
Starting backup at 06-MAR-16
channel c1: starting incremental level 0 datafile backup set
channel c1: specifying datafile(s) in backup set
input datafile file number=00005 name=/u01/oracle/oradata/TEST1/datafile/datalive800
backing up blocks 1 through 12800
channel c1: starting piece 1 at 06-MAR-16
channel c2: starting incremental level 0 datafile backup set
channel c2: specifying datafile(s) in backup set
input datafile file number=00002 name=/u01/oracle/oradata/TEST1/datafile/o1_mf_sysaux_cc38tgc5_.dbf
backing up blocks 1 through 12800
channel c2: starting piece 1 at 06-MAR-16
channel c3: starting incremental level 0 datafile backup set
channel c3: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/oracle/oradata/TEST1/datafile/o1_mf_system_cc38tg9t_.dbf
backing up blocks 1 through 12800
channel c3: starting piece 1 at 06-MAR-16
channel c4: starting incremental level 0 datafile backup set
channel c4: specifying datafile(s) in backup set
input datafile file number=00003 name=/u01/oracle/oradata/TEST1/datafile/o1_mf_undotbs1_cc38tgcg_.dbf
backing up blocks 1 through 12800
channel c4: starting piece 1 at 06-MAR-16
channel c4: finished piece 1 at 06-MAR-16
piece handle=/home/oracle/backup_20160306_TEST1xxx_8pqvqbpp_1_1 tag=TAG20160306T145905 comment=NONE
channel c4: backup set complete, elapsed time: 00:00:01
channel c4: starting incremental level 0 datafile backup set
channel c4: specifying datafile(s) in backup set
input datafile file number=00005 name=/u01/oracle/oradata/TEST1/datafile/datalive800
backing up blocks 12801 through 25600
channel c4: starting piece 2 at 06-MAR-16
channel c1: finished piece 1 at 06-MAR-16
piece handle=/home/oracle/backup_20160306_TEST1xxx_8mqvqbpp_1_1 tag=TAG20160306T145905 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:02
channel c1: starting incremental level 0 datafile backup set
channel c1: specifying datafile(s) in backup set
input datafile file number=00005 name=/u01/oracle/oradata/TEST1/datafile/datalive800
backing up blocks 25601 through 38400
channel c1: starting piece 3 at 06-MAR-16
channel c2: finished piece 1 at 06-MAR-16
piece handle=/home/oracle/backup_20160306_TEST1xxx_8nqvqbpp_1_1 tag=TAG20160306T145905 comment=NONE
channel c2: backup set complete, elapsed time: 00:00:02
channel c2: starting incremental level 0 datafile backup set
channel c2: specifying datafile(s) in backup set
input datafile file number=00005 name=/u01/oracle/oradata/TEST1/datafile/datalive800
backing up blocks 38401 through 51200
channel c2: starting piece 4 at 06-MAR-16
channel c3: finished piece 1 at 06-MAR-16
piece handle=/home/oracle/backup_20160306_TEST1xxx_8oqvqbpp_1_1 tag=TAG20160306T145905 comment=NONE
channel c3: backup set complete, elapsed time: 00:00:02
channel c3: starting incremental level 0 datafile backup set
channel c3: specifying datafile(s) in backup set
input datafile file number=00005 name=/u01/oracle/oradata/TEST1/datafile/datalive800
backing up blocks 51201 through 64000
channel c3: starting piece 5 at 06-MAR-16
channel c1: finished piece 3 at 06-MAR-16
piece handle=/home/oracle/backup_20160306_TEST1xxx_8mqvqbpp_3_1 tag=TAG20160306T145905 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:00
channel c1: starting incremental level 0 datafile backup set
channel c1: specifying datafile(s) in backup set
input datafile file number=00005 name=/u01/oracle/oradata/TEST1/datafile/datalive800
backing up blocks 64001 through 76800
channel c1: starting piece 6 at 06-MAR-16
channel c2: finished piece 4 at 06-MAR-16
piece handle=/home/oracle/backup_20160306_TEST1xxx_8mqvqbpp_4_1 tag=TAG20160306T145905 comment=NONE
channel c2: backup set complete, elapsed time: 00:00:00
channel c2: starting incremental level 0 datafile backup set
channel c2: specifying datafile(s) in backup set
input datafile file number=00005 name=/u01/oracle/oradata/TEST1/datafile/datalive800
backing up blocks 76801 through 89600
channel c2: starting piece 7 at 06-MAR-16
channel c4: finished piece 2 at 06-MAR-16
piece handle=/home/oracle/backup_20160306_TEST1xxx_8mqvqbpp_2_1 tag=TAG20160306T145905 comment=NONE
channel c4: backup set complete, elapsed time: 00:00:01
channel c4: starting incremental level 0 datafile backup set
channel c4: specifying datafile(s) in backup set
input datafile file number=00005 name=/u01/oracle/oradata/TEST1/datafile/datalive800
backing up blocks 89601 through 102400
channel c4: starting piece 8 at 06-MAR-16
channel c1: finished piece 6 at 06-MAR-16
piece handle=/home/oracle/backup_20160306_TEST1xxx_8mqvqbpp_6_1 tag=TAG20160306T145905 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:01
channel c1: starting incremental level 0 datafile backup set
channel c1: specifying datafile(s) in backup set
input datafile file number=00005 name=/u01/oracle/oradata/TEST1/datafile/datalive800
backing up blocks 102401 through 115200
channel c1: starting piece 9 at 06-MAR-16
channel c2: finished piece 7 at 06-MAR-16
piece handle=/home/oracle/backup_20160306_TEST1xxx_8mqvqbpp_7_1tag=TAG20160306T145905 comment=NONE
channel c2: backup set complete, elapsed time: 00:00:00
channel c2: starting incremental level 0 datafile backup set
channel c2: specifying datafile(s) in backup set
input datafile file number=00005 name=/u01/oracle/oradata/TEST1/datafile/datalive800
backing up blocks 115201 through 128000
channel c2: starting piece 10 at 06-MAR-16
channel c3: finished piece 5 at 06-MAR-16
piece handle=/home/oracle/backup_20160306_TEST1xxx_8mqvqbpp_5_1tag=TAG20160306T145905 comment=NONE
channel c3: backup set complete, elapsed time: 00:00:01
channel c3: starting incremental level 0 datafile backup set
channel c3: specifying datafile(s) in backup set
input datafile file number=00005 name=/u01/oracle/oradata/TEST1/datafile/datalive800
backing up blocks 128001 through 131072
channel c3: starting piece 11 at 06-MAR-16
channel c1: finished piece 9 at 06-MAR-16
piece handle=/home/oracle/backup_20160306_TEST1xxx_8mqvqbpp_9_1 tag=TAG20160306T145905 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:00
channel c1: starting incremental level 0 datafile backup set
channel c1: specifying datafile(s) in backup set

....此处省略.....

RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 1 days
no obsolete backups found
released channel: c01
RMAN> 
RMAN> 
Recovery Manager complete.
END


内容概要:本文系统研究了基于CNN-SVM的卷积神经网络与支持向量机融合的数据分类预测方法,聚焦其在工业故障识别中的应用,提供了完整的Matlab代码实现。通过CNN提取输入数据的深层空间特征,再由SVM进行高精度分类,充分发挥两者优势,有效提升了故障识别的准确性、鲁棒性与泛化能力。该方法特别适用于处理电力系统、机械设备等领域的高维、非线性、强噪声监测数据,在变压器故障诊断、轴承缺陷识别等场景中具有重要应用价值。文档还整合了机器学习、深度学习、图像处理、路径规划、电力系统优化等多个前沿科研方向的技术资源,配套大量Matlab/Simulink仿真案例与Python代码,全面支持科研复现与工程实践。; 适合人群:具备一定编程基础,熟练掌握Matlab或Python语言,从事电气工程、自动化、人工智能、机械故障诊断等相关领域研究的研发人员及高校研究生; 使用场景及目标:① 实现工业设备的状态监测与多类别故障分类;② 深入理解CNN与SVM融合模型的设计原理与工程实现细节;③ 借助所提供的丰富算法案例开展科研复现、模型优化与系统仿真验证; 阅读建议:建议按照文档目录结构系统化学习,结合百度网盘提供的完整代码资源进行动手实践,重点关注CNN特征提取层与SVM分类器之间的数据接口设计与参数调优策略,同时可延伸学习文中涉及的其他智能算法及其在电力系统、信号处理等领域的交叉应用,全面提升科研创新能力。
内容概要:本文围绕“考虑电动汽车灵活性的微网多时间尺度协调调度”展开研究,提出了一种基于Matlab代码实现的优化调度模型。该模型深入挖掘电动汽车作为灵活可控负荷与分布式储能单元的双重潜力,通过构建日前、日内及实时等多时间尺度的协调调度机制,有效应对光伏发电的间歇性与波动性,实现微电网内部功率的动态平衡。研究综合集成了电动汽车集群的有序充放电管理、储能系统协同优化与多种需求响应策略,建立了以系统运行成本最小化、可再生能源消纳最大化及供电可靠性最优化为目标的综合数学模型,并采用Matlab进行仿真求解。结果表明,所提方法能显著平抑功率波动,优化源-荷-储资源的时空配置,提升微电网运行的经济性与稳定性。; 适合人群:电气工程、能源与动力工程、控制科学与工程、电力系统及其自动化等专业的研究生、高校科研人员,以及从事智能电网、微电网规划、电动汽车与电网互动(V2G)技术研发的工程技术人员。; 使用场景及目标:①研究高比例可再生能源接入背景下,含大规模电动汽车的微电网协同优化运行策略;②掌握多时间尺度滚动优化的建模思想与Matlab/Simulink仿真技术;③探索电动汽车聚合商参与电力市场辅助服务的可行路径与效益评估方法; 阅读建议:建议读者结合提供的Matlab代码进行复现与调试,深入理解目标函数构建、约束条件处理及求解器调用等关键技术环节,可尝试引入电池老化模型、用户出行行为不确定性等更贴近实际的因素,以深化研究的实用性与前瞻性。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值