MAXPIECESIZE理解

wenhual43發表於2013-11-20
測試:maxpiecesize=5M
RMAN>
 Configure channel device type disk maxpiecesize=5M
RMAN> backup tablespace lwh ;

Starting backup at 20-NOV-13
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=10 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=00005 name=D:\APP\ORADATA\ORCL\LWH.DBF
input datafile file number=00006 name=D:\APP\ORADATA\ORCL\LWH01.DBF
channel ORA_DISK_1: starting piece 1 at 20-NOV-13
channel ORA_DISK_1: finished piece 1 at 20-NOV-13
piece handle=D:\APP\PRODUCT\11.2.0\DBHOME_1\DATABASE\0DOPE1QS_1_1 tag=TAG2013112
0T095644 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 20-NOV-13

測試:maxpiecesize=1M
RMAN> Configure channel device type disk maxpiecesize=1M
RMAN> backup tablespace lwh ;


Starting backup at 20-NOV-13
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=10 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=00005 name=D:\APP\ORADATA\ORCL\LWH.DBF
input datafile file number=00006 name=D:\APP\ORADATA\ORCL\LWH01.DBF
channel ORA_DISK_1: starting piece 1 at 20-NOV-13
channel ORA_DISK_1: finished piece 1 at 20-NOV-13
piece handle=D:\APP\PRODUCT\11.2.0\DBHOME_1\DATABASE\0COPE19O_1_1 tag=TAG2013112
0T094735 comment=NONE
channel ORA_DISK_1: starting piece 2 at 20-NOV-13
channel ORA_DISK_1: finished piece 2 at 20-NOV-13
piece handle=D:\APP\PRODUCT\11.2.0\DBHOME_1\DATABASE\0COPE19O_2_1 tag=TAG2013112
0T094735 comment=NONE
channel ORA_DISK_1: starting piece 3 at 20-NOV-13
channel ORA_DISK_1: finished piece 3 at 20-NOV-13
piece handle=D:\APP\PRODUCT\11.2.0\DBHOME_1\DATABASE\0COPE19O_3_1 tag=TAG2013112
0T094735 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 20-NOV-13

結論:
表空間lwh= 40M,由2個20m的資料檔案構成。配置maxpiecesize=5M,為什麼備份後,只有一個檔案?
原因:生成的備份只有2.3m,當然就不會生成多個檔案了。不要想當然的認為會生成8個檔案哦!備份集是會
跳過空塊,只備份有資料的塊,所以備份集會比資料檔案小很多!當配置maxpiecesize=1M,備份集有2.3M,就拆成了3個小piece,它們同屬於一個備份集。

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