Itpub上有人提到在windows平台的Oracle10g中创建32k的block cache出错
alter system set db_32k_cache_size=10m
*
ERROR at line 1:
ORA-32017: failure in updating SPFILE
ORA-00382: 32768 not a valid block size, valid range [..]
实际上Oracle9i也是这样子的。根据metalink的说法,这个限制不是oracle的问题,而是os的限制。
Note:138242.1
This limitation is not an Oracle9i restriction, but is operating system-specific. Refer to the platform specifications for your operating system.
AIX-Based Systems, Compaq Tru64 UNIX, HP 9000 Series HP-UX, Linux Intel,
Sun SPARC Solaris:DB_BLOCK_SIZE: 2048 to 16384 (Linux, Solaris)
2048 to 32768 (AIX, HP, Tru64)Oracle9i Database Administrator’s Guide for Windows:
DB_BLOCK_SIZE: 2048 to 16384 (Windows NT, 95, 98, 2000)
实际上,在Oracle9i 和10g的administrator’s guide中也有相关论述
These non-standard block sizes can have any power-of-two value between 2K and 32K: specifically, 2K,4K, 8K, 16K or 32K. Platform-specific restrictions regarding the maximum block size apply, so some of these sizes may not be allowed on some platforms.
实际上不仅仅不能使用32k做为非标准块大小,也不能使用32k做为标准块大小。如果在windows平台为32768做为标准块大小建库,则会遭遇Ora-00374错误
另外,block size必须是os block size的整数倍。关于如何查看windows上文件系统块的大小,NTFS可以使用工具fsutil,具体请参考eygle的文章