最大的設定都不能超過2g,有的系統最大值甚至不能超過1.7g左右。dba為了讓記憶體充分利用,不至于浪費記憶體資源,于是想讓sga_max_size
最大化,對資料庫相關參數做了調整,設定參數use_indirect_data_buffers為true,調整sga_max_size為
3424m,然而使用use_indirect_data_buffers參數,就不能在使用其他9i以後新增的記憶體控制參數了,比如
sga_target、db_cache_size等等,必須通過db_block_buffers參數來指定記憶體的容量。是以sga_target為
0,關閉了assm特性。下面述說一下當時的解決問題思路和過程。

首先我試着啟用assm,設定sga_target的大小跟sga_max_size的大小一緻,如下所示,結果報錯:
epps> alter system set sga_target=3424m scope=both;
alter system set sga_target=3424m scope=both
*
error at line 1:
ora-02097: parameter cannot be modified because specified value is invalid
ora-00824: cannot set sga_target due to existing internal settings, see alert log for more information
使用指令“oerr 錯誤類型 錯誤編号” ,檢視錯誤資訊的詳細原因和action,
[oracle@get-orasvr02 db_com_sql]$ oerr ora 00824
00824, 00000, "cannot set sga_target due to existing internal settings, see alert log for more information"
// *cause: unable to set sga_target due to current parameter settings.
// *action: see alert log for more information.
通過告警日志檢視詳細出錯資訊,結果檢視告警日志發現如下提示資訊:
cannot set sga_target with db_block_buffers set
tue sep 2 16:08:51 2013
在metalink上查詢了一下這方面的資料,發現sga_target > 0 不能與db_block_buffer這個過時的參數共存,否則就會出現ora-00824錯誤。具體資訊如下
cause
if you enable
automatic sga management by setting sga_target >0 and also have
db_block_buffers(obsolete parameter) in your parameter file
(pfile/spfile)
startup of database fails with ora-00824 error
solution
a) either you need to disable the automatic sga mangement by setting sga_target=0
==or==
b) replace the db_block_buffers parameter with db_cache_size parameter
steps to resolve
1. make an os copy of the spfile if you do not have a pfile for this database
2. edit the copy of the spfile to remove the binary stuff before the first parameter
3. remove the binary stuff after the last parameter.
4. edit parameters needed to be changed.
5. save the file and note name and location.
6. start sqlplus and connect / as sysdba
7. issue startup pfile = '<full path and file name of file just updated>'
8. create spfile from pfile.
db_block_buffers
cannot be combined with the dynamic db_cache_size parameter; combining
these parameters in the same parameter file will produce an error.
epps> show parameter db_block_buffers
name type value
------------------------------------ ----------- ------------------------------
db_block_buffers integer 240000
epps> show parameter db_cache_size
db_cache_size big integer 0
epps>
解決步驟:
step 1:備份spfile檔案,避免修改資料庫參數導緻資料庫當機或啟動不了的意外情況出現。
epps> show parameter spfile
spfile string /u01/app/oracle/product/10.2.0
/db_1/dbs/spfileepps.ora
epps> !
cd /u01/app/oracle/product/10.2.0/db_1/dbs/
cp spfileepps.ora spfileepps.ora.bak
epps> create pfile='/u01/app/oracle/product/10.2.0/db_1/dbs/pfile_20130903_bak.ora' from spfile;
file created.
step 2: 修改pfile下的資料庫參數,例如去掉*.db_block_buffers=240000,如果隻删除db_block_buffers參數,這時啟動資料庫就會報ora-32006、ora-00385錯誤,如下圖所示
epps> startup pfile='/u01/app/oracle/product/10.2.0/db_1/dbs/pfile_20130903_bak.ora'
ora-32006: parallel_automatic_tuning initialization parameter has been deprecated
ora-00385: cannot enable very large memory with new buffer cache parameters
是以還需要修改
use_indirect_data_buffers等參數。到此,問題出現的來龍去脈,解決方法都已全部給出,當然最後還是直接修改
streams_pool_size來解決問題友善,如果将sga_max_size改回去,肯定會對資料庫性能産生比較大的影響。