maxsetsize跟maxpiecesize用法
区别:maxpiecesize设置的是备份完成后的备份片大小,对备份整体的大小没有影响,比如一个g的备份完成文件,maxpiecesize设置为100m,最后就会变成10个100m的备份文件。maxsetsize设置限定的是整体大小,个人认为这个功能比较鸡肋,一般只要没人动,就用不到的。
maxsetsize的写法:
1.
rman> configure maxsetsize to 2g;
rman> run{
2> allocate channel c1 device type disk;
3> backup database format=’/u01/app/oracle/oradata/backup/oradb_%d_%s.bak’;
4> release channel c1;
5> }
2.
run{
allocate channel c1 device type disk ;
backup database maxsetsize 1000m format=’/u01/app/oracle/oradata/backup/oradb_%d_%s_%p.bak’;
release channel c1;
}
清除maxsetsize的语句:rman> configure maxsetsize clear;
maxpiecesize的写法:
run{
allocate channel c1 device type disk maxpiecesize 100m;
backup database format=’/u01/app/oracle/oradata/backup/oradb_%d_%s_%p.bak’;
release channel c1;
}
然后每个文件都是100m
[oracle@orcl backup]$ ls -lh
total 1.2g
-rw-r—– 1 oracle oinstall 100m dec 24 03:01 oradb_orcl_117_10.bak
-rw-r—– 1 oracle oinstall 100m dec 24 03:01 oradb_orcl_117_11.bak
-rw-r—– 1 oracle oinstall 71m dec 24 03:01 oradb_orcl_117_12.bak
-rw-r—– 1 oracle oinstall 100m dec 24 02:59 oradb_orcl_117_1.bak
-rw-r—– 1 oracle oinstall 100m dec 24 02:59 oradb_orcl_117_2.bak
-rw-r—– 1 oracle oinstall 100m dec 24 02:59 oradb_orcl_117_3.bak
-rw-r—– 1 oracle oinstall 100m dec 24 03:00 oradb_orcl_117_4.bak
-rw-r—– 1 oracle oinstall 100m dec 24 03:00 oradb_orcl_117_5.bak
-rw-r—– 1 oracle oinstall 100m dec 24 03:00 oradb_orcl_117_6.bak
-rw-r—– 1 oracle oinstall 100m dec 24 03:00 oradb_orcl_117_7.bak
-rw-r—– 1 oracle oinstall 100m dec 24 03:00 oradb_orcl_117_8.bak
-rw-r—– 1 oracle oinstall 100m dec 24 03:00 oradb_orcl_117_9.bak
-rw-r—– 1 oracle oinstall 9.7m dec 24 03:01 oradb_orcl_118_1.bak