今天遇到
SQL> startup
ORA-00064: object is too large to allocate on this O/S (1,4652840)
平台SOLARS 10 ORACLE 10.2.0.5 64 BIT
经过测试当PROCESS达到1500左右的时候就不能启动了。
开始以为是shell LIMIT或者内核参数的信号量设置不对,但是通过查看文档,SOLARIS 10实际上不需要过多的关注信号量参数了。但是我还是进行了修改如下:
projadd -U oracle -p 1233 oracle_param
projadd -U oracle -p 1233 oracle_param
projadd -U oracle -p 1234 -c "oracle parameter" user.oracle
projdel oracle_param
projmod -s -K "project.max-sem-ids=(priv,100,deny)" user.oracle
projmod -s -K "process.max-sem-nsems=(priv,3000,deny)" user.oracle --这个实际就是信号量默认512
projmod -s -K "project.max-shm-ids=(priv,100,deny)" user.oracle
projmod -a-K "project.max-shm-memory=(priv,10g,deny)" user.oracle
查看:
prctl -n process.max-sem-nsems -i process $$
prctl -n project.max-sem-ids -i process $$
prctl -n project.max-shm-ids -i process $$
修改过后还是不行。
查看ULIMIT -A 修改了还是不行
顺便说说修改了最大文件打开数量和堆载大小
projmod -a -K "process.max-stack-size=(basic,40960000,deny)" user.oracle
projmod -a -K "process.max-file-descriptor=(basic,65537,deny)" user.oracle
通过prctl -i process $$可以看到所有的核心参数和资源限制
也可以查看
-bash-3.2$ more /etc/project
system:0::::
user.root:1::::
noproject:2::::
default:3::::
group.staff:10::::
user.oracle:1234:oracle parameter:oracle::process.max-file-descriptor=(basic,65537,deny),(priv,65538,deny);process.max-sem-nsems=(priv,300,deny);process.max-stack-size
=(basic,40960,deny),(basic,40960000,deny);project.max-sem-ids=(priv,100,deny);project.max-shm-ids=(priv,100,deny)
查看其配置
最后查看ORACLE文档,并没有一个相关的说明,而在一个升级到10.2.0.2 DBUA中有部分说明如下:
'startup migrate' failed with ORA-64 while upgrading to 10.2.0.2 with DBUA (Doc ID 386855.1)
CAUSE
1. High value of oracle parameter PROCESSES
The oracle parameter PROCESSES bigger than 1500 requests the allocation of big granule size.
2. Low value of granule size.
The oracle hidden parameter "_ksmg_granule_size" is set based on the oracle sga size.
- sga_max_size - sga_max_size > 1024M then _ksmg_granule_size = 16M
If you set a parameter that exceeds the value of the granule size that was
calculated based on the size of the sga.
You will manually have to set the parameter _ksmg_granule_size.
- default _ksmg_granule_size is 4M
Low value of _ksmg_granule_size can prohibit the database startup.
3. The ORA-64 error could be occured even though the big "_ksmg_granule_size" was configured in
init.ora file.
DBUA in 10.2.x strips out the oracle hidden parameter while opening oracle database.
SOLUTION
reduce the oracle parameter "PROCESSES" as described in Note 310838.1
# open oracle parameter file with editor and put following line
PROCESSES
Increase Oracle hidden parameter value of "_ksmg_granule_size"
1. Increase directly the value of '_ksmg_granule_size' parameter to 16M (16777216) or 32M (33554432)
1.1 open oracle parameter file with editor and put following line
_ksmg_granule_size=16777216 or 33554432
1.2 do the manual upgradation
OR
2. Increase SGA size bigger than 1024M to affect granule size
2.1 open oracle parameter file with editor and put following line
sga_max_size = 1025M
2.2 Continue the upgradation using DBUA or manually.
OR
1.3 run DBUA with -initParam flag.
$ dbua -initParam "_ksmg_granule_size"=16777216 or 33554432
查看了文档,进行修改SGA大于1G后可以启动。
SQL> startup
ORA-00064: object is too large to allocate on this O/S (1,4652840)
平台SOLARS 10 ORACLE 10.2.0.5 64 BIT
经过测试当PROCESS达到1500左右的时候就不能启动了。
开始以为是shell LIMIT或者内核参数的信号量设置不对,但是通过查看文档,SOLARIS 10实际上不需要过多的关注信号量参数了。但是我还是进行了修改如下:
projadd -U oracle -p 1233 oracle_param
projadd -U oracle -p 1233 oracle_param
projadd -U oracle -p 1234 -c "oracle parameter" user.oracle
projdel oracle_param
projmod -s -K "project.max-sem-ids=(priv,100,deny)" user.oracle
projmod -s -K "process.max-sem-nsems=(priv,3000,deny)" user.oracle --这个实际就是信号量默认512
projmod -s -K "project.max-shm-ids=(priv,100,deny)" user.oracle
projmod -a-K "project.max-shm-memory=(priv,10g,deny)" user.oracle
查看:
prctl -n process.max-sem-nsems -i process $$
prctl -n project.max-sem-ids -i process $$
prctl -n project.max-shm-ids -i process $$
修改过后还是不行。
查看ULIMIT -A 修改了还是不行
顺便说说修改了最大文件打开数量和堆载大小
projmod -a -K "process.max-stack-size=(basic,40960000,deny)" user.oracle
projmod -a -K "process.max-file-descriptor=(basic,65537,deny)" user.oracle
通过prctl -i process $$可以看到所有的核心参数和资源限制
也可以查看
-bash-3.2$ more /etc/project
system:0::::
user.root:1::::
noproject:2::::
default:3::::
group.staff:10::::
user.oracle:1234:oracle parameter:oracle::process.max-file-descriptor=(basic,65537,deny),(priv,65538,deny);process.max-sem-nsems=(priv,300,deny);process.max-stack-size
=(basic,40960,deny),(basic,40960000,deny);project.max-sem-ids=(priv,100,deny);project.max-shm-ids=(priv,100,deny)
查看其配置
最后查看ORACLE文档,并没有一个相关的说明,而在一个升级到10.2.0.2 DBUA中有部分说明如下:
'startup migrate' failed with ORA-64 while upgrading to 10.2.0.2 with DBUA (Doc ID 386855.1)
CAUSE
1. High value of oracle parameter PROCESSES
The oracle parameter PROCESSES bigger than 1500 requests the allocation of big granule size.
2. Low value of granule size.
The oracle hidden parameter "_ksmg_granule_size" is set based on the oracle sga size.
- sga_max_size - sga_max_size > 1024M then _ksmg_granule_size = 16M
If you set a parameter that exceeds the value of the granule size that was
calculated based on the size of the sga.
You will manually have to set the parameter _ksmg_granule_size.
- default _ksmg_granule_size is 4M
Low value of _ksmg_granule_size can prohibit the database startup.
3. The ORA-64 error could be occured even though the big "_ksmg_granule_size" was configured in
init.ora file.
DBUA in 10.2.x strips out the oracle hidden parameter while opening oracle database.
SOLUTION
reduce the oracle parameter "PROCESSES" as described in Note 310838.1
# open oracle parameter file with editor and put following line
PROCESSES
Increase Oracle hidden parameter value of "_ksmg_granule_size"
1. Increase directly the value of '_ksmg_granule_size' parameter to 16M (16777216) or 32M (33554432)
1.1 open oracle parameter file with editor and put following line
_ksmg_granule_size=16777216 or 33554432
1.2 do the manual upgradation
OR
2. Increase SGA size bigger than 1024M to affect granule size
2.1 open oracle parameter file with editor and put following line
sga_max_size = 1025M
2.2 Continue the upgradation using DBUA or manually.
OR
1.3 run DBUA with -initParam flag.
$ dbua -initParam "_ksmg_granule_size"=16777216 or 33554432
查看了文档,进行修改SGA大于1G后可以启动。