db_cache_size的修改规则
Granule size is determined by total SGAsize. On most platforms, the size of a granule is 4 MB if the total SGA size isless than 1 GB, and granule size is 16MB for largerSGAs. Some platform dependencies arise. Forexample, on 32-bit Windows, thegranule size is 8 M for SGAs larger than 1GB.问题:db_cache_size在修改前的value是52M,执行了修改db_cache_size参数为50M后,再查看发现值还是52M未变成新值50M。SQL> show parameter db_cache_sizeNAME TYPE VALUE----------------------------------------------- ------------------------------db_cache_size big integer 52MSQL> alter system set db_cache_size=50M;System altered. SQL> show parameter db_cache_sizeNAME TYPE VALUE----------------------------------------------- ------------------------------db_cache_size big integer 52MSQL>问题分析:这是由于oracle中SGA大小是523108352 bytes=0.49G,因SGA小于1G,则db_cache_size的value需是4M的倍数,修改的db_cache_size=50M不是4M的倍数,因此修改未生效。解决办法:修改db_cache_size的value为4M的倍数即可。例:SQL> show parameter db_cache_sizeNAME TYPE VALUE----------------------------------------------- ------------------------------db_cache_size big integer 52MSQL> alter system set db_cache_size=56M;System altered.SQL> show parameter db_cache_sizeNAME TYPE VALUE----------------------------------------------- ------------------------------db_cache_size big integer 56MSQL>