首页 > 代码库 > ORA-00064 processes设置过大导致数据库打不开
ORA-00064 processes设置过大导致数据库打不开
processes设置过大导致数据库打不开
在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;
本文出自 “未来人” 博客,请务必保留此出处http://zaa47.blog.51cto.com/6181689/1927506
ORA-00064 processes设置过大导致数据库打不开