Settting maximum Size of Backup Set or Backup Piece

Some older operating system limits the size of individual files. In that case if your datafile size is 10G stored in raw device and your operating system supports only 4GB files on the file system then it is not possible to take backup of the image copy to the file system.

The CONFIGURE MAXSETSIZE command limits the size of backup sets created on file system on a specific channel. If I use 100M then maximum backup set size will be 100M per channel.

You can also control the size of a backup set piece or the entire backup itself with the MAXPIECESIZE parameter.

If your database size is 330M and you set MAXPIECESIZE to 100M then it will be divided in 4 backup pieces containing 100M, 100M, 100M and 30M.

An example:
--------------
RMAN> run{
2> ALLOcate CHANNEL a DEVICE TYPE DISK MAXPIECESIZE 100M;
3> backup database;
4> }

released channel: ORA_DISK_1
allocated channel: a
channel a: sid=155 devtype=DISK

Starting backup at 11-MAY-08
channel a: starting full datafile backupset
channel a: specifying datafile(s) in backupset
input datafile fno=00001 name=/oradata2/data1/dbase/system01.dbf
input datafile fno=00003 name=/oradata2/data1/dbase/sysaux01.dbf
input datafile fno=00002 name=/oradata2/data1/dbase/undotbs01.dbf
input datafile fno=00004 name=/oradata2/data1/dbase/users01.dbf
input datafile fno=00005 name=/oradata2/data.dbf
input datafile fno=00006 name=/oradata2/data1/data02.dbf
input datafile fno=00007 name=/oradata2/6.dbf
channel a: starting piece 1 at 11-MAY-08
channel a: finished piece 1 at 11-MAY-08
piece handle=/oradata2/flash_recovery_area/DBASE/backupset/2008_05_11/o1_mf_nnndf_TAG20080511T051131_42fg23tw_.bkp tag=TAG20080511T051131 comment=NONE
channel a: starting piece 2 at 11-MAY-08
channel a: finished piece 2 at 11-MAY-08
piece handle=/oradata2/flash_recovery_area/DBASE/backupset/2008_05_11/o1_mf_nnndf_TAG20080511T051131_42fg2wvy_.bkp tag=TAG20080511T051131 comment=NONE
channel a: starting piece 3 at 11-MAY-08
channel a: finished piece 3 at 11-MAY-08
piece handle=/oradata2/flash_recovery_area/DBASE/backupset/2008_05_11/o1_mf_nnndf_TAG20080511T051131_42fg3cx4_.bkp tag=TAG20080511T051131 comment=NONE
channel a: starting piece 4 at 11-MAY-08
channel a: finished piece 4 at 11-MAY-08
piece handle=/oradata2/flash_recovery_area/DBASE/backupset/2008_05_11/o1_mf_nnndf_TAG20080511T051131_42fg3tyc_.bkp tag=TAG20080511T051131 comment=NONE
channel a: starting piece 5 at 11-MAY-08
channel a: finished piece 5 at 11-MAY-08
piece handle=/oradata2/flash_recovery_area/DBASE/backupset/2008_05_11/o1_mf_nnndf_TAG20080511T051131_42fg4b0f_.bkp tag=TAG20080511T051131 comment=NONE
channel a: starting piece 6 at 11-MAY-08
channel a: finished piece 6 at 11-MAY-08
piece handle=/oradata2/flash_recovery_area/DBASE/backupset/2008_05_11/o1_mf_nnndf_TAG20080511T051131_42fg4s1m_.bkp tag=TAG20080511T051131 comment=NONE
channel a: backup set complete, elapsed time: 00:01:33
channel a: starting full datafile backupset
channel a: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel a: starting piece 1 at 11-MAY-08
channel a: finished piece 1 at 11-MAY-08
piece handle=/oradata2/flash_recovery_area/DBASE/backupset/2008_05_11/o1_mf_ncsnf_TAG20080511T051131_42fg50l4_.bkp tag=TAG20080511T051131 comment=NONE
channel a: backup set complete, elapsed time: 00:00:01
Finished backup at 11-MAY-08
released channel: a


SQL> !du -sh /oradata2/flash_recovery_area/DBASE/backupset/2008_05_11/o1_mf_nnndf_TAG20080511T051131_42fg23tw_.bkp
100M
/oradata2/flash_recovery_area/DBASE/backupset/2008_05_11/o1_mf_nnndf_TAG20080511T051131_42fg23tw_.bkp

SQL> !du -sh /oradata2/flash_recovery_area/DBASE/backupset/2008_05_11/o1_mf_nnndf_TAG20080511T051131_42fg2wvy_.bkp
100M /oradata2/flash_recovery_area/DBASE/backupset/2008_05_11/o1_mf_nnndf_TAG20080511T051131_42fg2wvy_.bkp

SQL> !du -sh /oradata2/flash_recovery_area/DBASE/backupset/2008_05_11/o1_mf_nnndf_TAG20080511T051131_42fg3cx4_.bkp
100M /oradata2/flash_recovery_area/DBASE/backupset/2008_05_11/o1_mf_nnndf_TAG20080511T051131_42fg3cx4_.bkp

Comments

Popular posts from this blog

ORA-00923: FROM keyword not found where expected

How to make partitioning in Oracle more Quickly

Copy files between Unix and Windows with rcp