您好,登錄后才能下訂單哦!
在processes設置過大后,可能導致數據庫打不開,開啟數據庫后會報錯:
SQL> startup ORA-00064: object is too large to allocate on this O/S (1,7746920) SQL>
首先找到pfile位置,然后從pfile啟動數據庫;
startup pfile=$ORACLE_BASE/admin/SID/pfile/init.ora.49201715235'
pfile一般在$ORACLE_BASE/admin/$ORACLE_SID/pfile目錄下。
找到spfile位置。然后用spfile生成pfile;
create pfile='/tmp/pfile.ora' from spfile='+DATADG/SID/spfileSID.ora'
spfile文件位置會在文件$ORACLE_HOME/dbs/init${ORACLE_SID}.ora文件中標明。
修改新生成的pfile,把process值改小后,用pfile生成spfile;
create spfile='+DATADG/SID/spfileSID.ora' from pfile='/tmp/pfile.ora';
重啟數據庫后執行 show parameter spfile,查看當前spfile位置,如果位置和 $ORACLE_HOME/dbs/init${ORACLE_SID}.ora文件中標明的位置不一致,請把當前的spfile別名后,重新啟動數據庫。
查看spfile的位置
[oracle@kdb01 ~]$ more /opt/oracle/product/10.2.0/db_1/dbs/initkhadb1.ora SPFILE='+MYDATA/khadb/spfilekhadb.ora'
用spfile生成pfile
SQL> SQL> startup ORA-00064: object is too large to allocate on this O/S (1,7746920) SQL> startup pfile='/opt/oracle/admin/khadb/pfile/init.ora.492017152117'; ORACLE instance started. Total System Global Area 343932928 bytes Fixed Size 2096152 bytes Variable Size 113247208 bytes Database Buffers 222298112 bytes Redo Buffers 6291456 bytes Database mounted. Database opened. SQL> SQL> show parameter spfile; NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ spfile string SQL> SQL> create pfile='/tmp/pfile.ora' from SPFILE='+MYDATA/khadb/spfilekhadb.ora'; File created.
修改新生成的pfile,把process值改小后,用pfile生成spfile
SQL> create SPFILE='+MYDATA/khadb/spfilekhadb.ora' from pfile='/tmp/pfile.ora'; File created.
重啟數據庫,查看processes設置
SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> startup ORACLE instance started. Total System Global Area 343932928 bytes Fixed Size 2096152 bytes Variable Size 142607336 bytes Database Buffers 192937984 bytes Redo Buffers 6291456 bytes Database mounted. Database opened. SQL> show parameter processes; NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ aq_tm_processes integer 0 db_writer_processes integer 1 gcs_server_processes integer 1 job_queue_processes integer 10 log_archive_max_processes integer 2 processes integer 1000 SQL> SQL> show parameter spfile; NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ spfile string +MYDATA/khadb/spfilekhadb.ora SQL>
當 PROCESSES > 1500時,候需要確保ksmg_granule_size=16M or 32M;而ksmg_granule_size大小是根據sga_max_size來決定,當sga_max_size<=1024時,ksmg_granule_size=4M;sga_max_size是根據sga_target來決定的,修改sga_target>=1025M即可;
此處通過下面的方法,先恢復數據庫,后續可根據自己規劃先修改sga_target后,再修改process值
alter system set sga_target=1200m scope=spfile
修改sga_target=1200M,重啟數據庫時,sga_max_size=1200m;
select x.ksppinm name,y.ksppstvl value,x.ksppdesc descbtion from x$ksppi x,x$ksppcv y where x.inst_id=userenv('Instance') and y.inst_id=userenv('Instance') and x.indx=y.indx and x.ksppinm like '%_ksmg_granule%';
查看ksmg_granule_size大小。當SGA足夠大時,我們可以手動設置 _ksmg_granule_size=32MB;
alter system set "_ksmg_granule_size"=33554432 scope=spfile;
再根據自己的需求修process大小
alter system set sessions=10000 scope=spfile;
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。