Oracle 配置 Multiple Block Sizes 表空间(一)

2014-11-24 18:29:03 · 作者: · 浏览: 3

一. 参数说明



SYS@anqing1(rac1)> show parameter cache_size


NAME TYPE VALUE


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


db_16k_cache_size big integer 0


db_2k_cache_size big integer 0


db_32k_cache_size big integer 0


db_4k_cache_size big integer 0


db_8k_cache_size big integer 0


db_cache_size big integer 0


db_keep_cache_size big integer 0


db_recycle_cache_size big integer 0


SYS@anqing1(rac1)> show parameter db_block_size



NAME TYPE VALUE


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


db_block_size integer 8192



如果要配置Multiple Block Sizes,就需要配置db_nK_cache_size 参数,这些参数默认都是0. 配置完这些参数之后,我们在创建相关的表空间时,就可以指定对应的block。 这样就完成了Multiple Block Sizes。 但是,Multiple Block Sizes 给管理上代理一定的复杂度,所以实际使用的不多。



注意一点:


在创建非db_block_size 标准的表空间时,必须先执行对应的DB_nK_CACHE_SIZE 参数,来创建nK 的buffer,不然会报:


ORA-29339: tablespace block size 4096 does not matchconfigured block sizes



1.1 DB_BLOCK_SIZE



Property



Description




Parameter type



Integer




Default value



8192




Modifiable



No




Range of values



2048(2k) to 32768(32k), but your operating system may have a narrower range




Basic



Yes




Oracle RAC



You must set this parameter for every instance, and multiple instances must have the same value.




Caution:


Set this parameter at the time of database creation. Do notalter it afterward.


DB_BLOCK_SIZEspecifies (in bytes) the size of Oracle database blocks. Typical values are4096 and 8192. The value of this parameter must be a multiple of the physicalblock size at the device level.


Theva lue for DB_BLOCK_SIZE in effect at the time you create the databasedetermines the size of the blocks. The value must remain set to its initialvalue.


ForReal Application Clusters, this parameter affects the maximum value of theFREELISTS storage parameter for tables and indexes. Oracle uses one databaseblock for each freelist group. Decision support system (DSS) and data warehousedatabase environments tend to benefit from larger block size values.



Note:


(1)32-bit operating systems support a maximum DB_BLOCK_SIZE value of16384(16k)--32位系统,db_block_size最大16k


(2)64-bit operating systems support a maximum DB_BLOCK_SIZE value of32768(32k)--64位系统,db_block_size最大32k



1.2 DB_nK_CACHE_SIZE参数


官网的说明如下:


From: http://download.oracle.com/docs/cd/E11882_01/server.112/e17110/initparams044.htm#REFRN10027



Property



Description




Parameter type



Big integer




Syntax



DB_[2 | 4 | 8 | 16 | 32]K_CACHE_SIZE = integer [K | M | G]




Default value



0 (additional block size caches are not configured by default)




Modifiable



ALTER SYSTEM




Range of values



Minimum: 0 (values greater than zero are automatically modified to be either the granule size * number of processor groups, or 4 MB * number of CPUs, whichever is greater)



Maximum: operating system-dependent




Basic



No




DB_nK_CACHE_SIZE (where n = 2, 4, 8, 16, 32) specifies thesize of the cache for the nK buffers. You can set this parameter onlywhen DB_BLOC