解决 ORA-27102: out of memory问题
当修改数据参数出现ORA-27102: out of memory错误,大概都是系统参数设置的问题,限制了oracle的sga大小
SQL> show parameter sga
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------ lock_sga boolean FALSE pre_page_sga boolean FALSE sga_max_size big integer 1552M sga_target big integer 1536M修改sga_max_size
alter system set sga_max_size=10240M scope=spfile;
重新启动数据库
SQL> startup force
ORA-27102: out of memory Linux-x86_64 Error: 28: No space left on device出现ORA-27102错误,这是我们可以使用备分的参数文件启动数据库;
startup pfile='/opt/oracle/product/11.1/db_1/dbs/initorcl.ora';
问题到这里,虽然库可以启动,但参数还是没有改。
这是我们可以修改一下系统参数/etc/sysctl.conf文件中的kernel.shmall参数
原参数
-------------------------------------------------------------------------------
fs.file-max = 6553600
kernel.shmall=2097152 kernel.shmmax=2147483648 kernel.shmmni=4096-------------------------------------------------------------------------------
修改后为
--------------------------------------------------------------------------------
fs.file-max = 6553600
kernel.shmall = 4194304 kernel.shmmax = 2147483648 kernel.shmmni = 4096---------------------------------------------------------------------------------
修改完这些参数后,我们就可以正常启动了
先创建spfile,然后我们以spfile启动
SQL> create spfile from pfile;
File created.
SQL> startup force
ORACLE instance started.Total System Global Area 1620189184 bytes
Fixed Size 2144824 bytes Variable Size 922748360 bytes Database Buffers 671088640 bytes Redo Buffers 24207360 bytes Database mounted. Database opened.我们再次修改
alter system set sga_max_size=10240M scope=spfile;
ORACLE instance started.Total System Global Area 1.0689E+10 bytes
Fixed Size 2147392 bytes Variable Size 9596570560 bytes Database Buffers 1073741824 bytes Redo Buffers 17014784 bytes Database mounted. Database opened.问题成功解决