您的当前位置:首页正文

Rman关于filesperset参数的介绍

2024-11-10 来源:个人技术集锦

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>

Top