Rman關於filesperset引數的介紹

lusklusklusk發表於2020-08-16

filesperset說明了一個備份集最多的檔案數目,FILESPERSET不指定的話,FILESPERSET(預設值=64)


filesperset =files per backupset

假如10個datafiles,filesperset =4,10/4=2.5,你備份資料庫的時候生成3個backupset



當指定filesperset引數時,rman比較filesperset與自動計算出來的值(對每個已分配通道的檔案數目),並取其中較小的那個值來保證所有的通道被使用。


如果沒有指定filesperset,rman比較計算出來的值(檔案數目除以已分配的通道)和預設值64,並取其中較小的那個值來保證所有通道可用。一個例外是通道比要備份的檔案還要多



例如:

A. filesperset設定為6,資料檔案數目為30,通道資料為4,透過30/4可以得出每個

備份集可含有8個檔案,取6和8中較小的值6,那麼30/6=5個備份集,那麼4個通道肯定都有事情可做了。


B. 如果不指定filesperset,假設資料檔案數目為30,通道資料為4,透過30/4可以

得出每個備份集可含有8個檔案,比較8和預設值64,我們取其中較小的8,那麼也可以保證4個通道都有事情可做





SQL> select file_name from dba_data_files where tablespace_name='USERS';


FILE_NAME

--------------------------------------------------------------------------------

/u01/app/oracle/oradata/PROD7/users01.dbf

/u01/app/oracle/oradata/PROD7/users02.dbf

/u01/app/oracle/oradata/PROD7/users03.dbf

/u01/app/oracle/oradata/PROD7/users04.dbf





RMAN> backup filesperset 3 tablespace users format '/u01/backup/users%U';


Starting backup at 09-AUG-18

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=224 device type=DISK

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00007 name=/u01/app/oracle/oradata/PROD7/users03.dbf

input datafile file number=00008 name=/u01/app/oracle/oradata/PROD7/users04.dbf

channel ORA_DISK_1: starting piece 1 at 09-AUG-18

channel ORA_DISK_1: finished piece 1 at 09-AUG-18

piece handle=/u01/backup/users01ta4lfl_1_1 tag=TAG20180809T144925 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00006 name=/u01/app/oracle/oradata/PROD7/users02.dbf

input datafile file number=00004 name=/u01/app/oracle/oradata/PROD7/users01.dbf

channel ORA_DISK_1: starting piece 1 at 09-AUG-18

channel ORA_DISK_1: finished piece 1 at 09-AUG-18

piece handle=/u01/backup/users02ta4lfm_1_1 tag=TAG20180809T144925 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 09-AUG-18


RMAN> backup filesperset 1 tablespace users format '/u01/backup/users%U';


Starting backup at 09-AUG-18

using channel ORA_DISK_1

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00006 name=/u01/app/oracle/oradata/PROD7/users02.dbf

channel ORA_DISK_1: starting piece 1 at 09-AUG-18

channel ORA_DISK_1: finished piece 1 at 09-AUG-18

piece handle=/u01/backup/users03ta4lg4_1_1 tag=TAG20180809T144939 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00007 name=/u01/app/oracle/oradata/PROD7/users03.dbf

channel ORA_DISK_1: starting piece 1 at 09-AUG-18

channel ORA_DISK_1: finished piece 1 at 09-AUG-18

piece handle=/u01/backup/users04ta4lg5_1_1 tag=TAG20180809T144939 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00008 name=/u01/app/oracle/oradata/PROD7/users04.dbf

channel ORA_DISK_1: starting piece 1 at 09-AUG-18

channel ORA_DISK_1: finished piece 1 at 09-AUG-18

piece handle=/u01/backup/users05ta4lg6_1_1 tag=TAG20180809T144939 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00004 name=/u01/app/oracle/oradata/PROD7/users01.dbf

channel ORA_DISK_1: starting piece 1 at 09-AUG-18

channel ORA_DISK_1: finished piece 1 at 09-AUG-18

piece handle=/u01/backup/users06ta4lg7_1_1 tag=TAG20180809T144939 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 09-AUG-18


RMAN> backup filesperset 4 tablespace users format '/u01/backup/users%U';


Starting backup at 09-AUG-18

using channel ORA_DISK_1

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00006 name=/u01/app/oracle/oradata/PROD7/users02.dbf

input datafile file number=00007 name=/u01/app/oracle/oradata/PROD7/users03.dbf

input datafile file number=00008 name=/u01/app/oracle/oradata/PROD7/users04.dbf

input datafile file number=00004 name=/u01/app/oracle/oradata/PROD7/users01.dbf

channel ORA_DISK_1: starting piece 1 at 09-AUG-18

channel ORA_DISK_1: finished piece 1 at 09-AUG-18

piece handle=/u01/backup/users07ta4ljp_1_1 tag=TAG20180809T145137 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 09-AUG-18


RMAN> backup filesperset 5 tablespace users format '/u01/backup/users%U';


Starting backup at 09-AUG-18

using channel ORA_DISK_1

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00006 name=/u01/app/oracle/oradata/PROD7/users02.dbf

input datafile file number=00007 name=/u01/app/oracle/oradata/PROD7/users03.dbf

input datafile file number=00008 name=/u01/app/oracle/oradata/PROD7/users04.dbf

input datafile file number=00004 name=/u01/app/oracle/oradata/PROD7/users01.dbf

channel ORA_DISK_1: starting piece 1 at 09-AUG-18

channel ORA_DISK_1: finished piece 1 at 09-AUG-18

piece handle=/u01/backup/users08ta4lk1_1_1 tag=TAG20180809T145145 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 09-AUG-18


RMAN>


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30126024/viewspace-2712151/,如需轉載,請註明出處,否則將追究法律責任。

相關文章