3、故障解决
从上面的情形可知,我们可以通过增加tempfs文件系统的大小或者是适当减少MEMORY_TARGET的值来解决
a、调整参数memory_target
[Oracle@linux1 ~]$ grep memory $ORACLE_HOME/dbs/initcatadb.ora
memory_target=521M
[oracle@linux1 ~]$ export ORACLE_SID=catadb
[oracle@linux1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Thu Nov 14 11:51:57 2013
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
idle> startup nomount;
ORACLE instance started.
Total System Global Area 548216832 bytes
Fixed Size 1337804 bytes
Variable Size 331351604 bytes
Database Buffers 209715200 bytes
Redo Buffers 5812224 bytes
idle> shutdown abort;
ORACLE instance shut down.
b、增加tempfs大小
[oracle@linux1 ~]$ grep memory $ORACLE_HOME/dbs/initcatadb.ora
memory_target=1G
#下面的方法用于临时调整tempfs的大小,重启后失效
#即将tempfs的大小调整到1200M,inode数量调整到1000000,此时大约可可存放一百万个小文件
[root@linux1 ~]# mount -o size=1200M -o nr_inodes=1000000 -o noatime,nodiratime -o remount /dev/shm
[root@linux1 ~]# df -h | grep shm
tmpfs 1.2G 154M 1.1G 13% /dev/shm
[root@linux1 ~]# su - oracle
[oracle@linux1 ~]$ export ORACLE_SID=catadb
[oracle@linux1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Thu Nov 14 12:04:02 2013
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
idle> startup nomount;
ORACLE instance started.
Total System Global Area 1071333376 bytes
Fixed Size 1341312 bytes
Variable Size 620759168 bytes
Database Buffers 444596224 bytes
Redo Buffers 4636672 bytes
# Author : Leshami
# Blog : http://www.linuxidc.com
#永久增加tempfs的大小,直接修改/etc/fstab
vi /etc/fstab
tmpfs /dev/shm tmpfs defaults,size=2048M 0 0
修改之后remount
mount -o remount /dev/shm
4、Doc ID 1399209.1
Starting with Oracle Database 11g, the Automatic Memory Management feature requires more shared memory (/dev/shm) and file descriptors. The size of the shared memory must be at least the greater of the MEMORY_MAX_TARGET and MEMORY_TARGET parameters for each Oracle instance on the computer. If the MEMORY_MAX_TARGET parameter or the MEMORY_TARGET parameter is set to a nonzero value, and an incorrect size is assigned to the shared memory, it results in an ORA-00845 error at startup.
On Linux systems, if the operating system /dev/shm mount size is too small for the Oracle system global area (SGA) and program global area (PGA), then you encounter the following error:
The cause of this error is an insufficient /dev/shm allocation. The total memory size of the SGA and PGA, which sets the initialization parameter MEMORY_TARGET or MEMORY_MAX_TARGET, cannot be greater than the shared memory file system (/dev/shm) on your operating system.