生产环境的一套Oracle数据库,启动数据库的时候,报错。
-
SQL> startup pfile='/u01/oracle/product/11gr2/db_home/dbs/initerp.ora'
-
ORA-27102: out of memory
-
Linux-x86_64 Error: 28: No space left on device
-
-
# 报错原因
-
# 查看内核参数配置文件,发现关于内存的内核参数被修改成很小的值,这个值远远低于数据库SGA、PGA内存参数设置的值;进而导致数据库无法启动。
-
$ cat sysctl.conf
-
# Controls the maximum shared segment size, in bytes
-
kernel.shmmax = 68719476736
-
-
# Controls the maximum number of shared memory segments, in pages
-
kernel.shmall = 4294967296
-
-
-
fs.aio-max-nr = 1048576
-
fs.file-max = 6815744
-
kernel.shmmax = 536870912
-
net.ipv4.ip_local_port_range = 9000 65500
-
kernel.shmall = 2097152
-
kernel.shmmax = 2147483648
-
-
# 解决方法
-
# 注释掉错误的参数,重新刷新内核参数
-
[root@erp2 ~]# sysctl -p
-
net.ipv4.ip_forward = 0
-
net.ipv4.conf.default.rp_filter = 1
-
net.ipv4.conf.default.accept_source_route = 0
-
kernel.sysrq = 0
-
kernel.core_uses_pid = 1
-
net.ipv4.tcp_syncookies = 1
-
kernel.msgmnb = 65536
-
kernel.msgmax = 65536
-
kernel.shmmax = 68719476736
-
kernel.shmall = 4294967296
-
fs.aio-max-nr = 1048576
-
fs.file-max = 6815744
-
net.ipv4.ip_local_port_range = 9000 65500
-
kernel.shmmni = 4096
-
kernel.sem = 250 32000 100 128
-
net.core.rmem_default = 262144
-
net.core.rmem_max = 4194304
-
net.core.wmem_default = 262144
-
net.core.wmem_max = 1048576
-
-
SQL> startup pfile='/u01/oracle/product/11gr2/db_home/dbs/initerp.ora'
-
ORACLE instance started.
-
-
Total System Global Area 1.0689E+10 bytes
-
Fixed Size 2216344 bytes
-
Variable Size 1946160744 bytes
-
Database Buffers 8724152320 bytes
-
Redo Buffers 16945152 bytes
-
Database mounted.
-
Database opened.
-
SQL> shutdown immediate
-
Database closed.
-
Database dismounted.
-
ORACLE instance shut down.
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26506993/viewspace-2155754/
,如需转载,请注明出处,否则将追究法律责任。