Oracle 11g的Linux版本在修改了MEMORY_TARGET或者SGA_TARGET后启动可能会报错:
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORA-00845: MEMORY_TARGET not supported on this system
这个问题是由于设置SGA的大小超过了操作系统/dev/shm的大小:
[root@enterprice64 ~]# df -k /dev/shm
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 4089416 0 4089416 0% /dev/shm
Oracle在metalink的文档:Doc ID: Note:460506.1中进行了说明。解决这个问题只有两个方法,一种是修改初始化参数,使得初始化参数中SGA的设置小于/dev/shm的大小,另一种方法就是调整/dev/shm的大小。
1.查看tmpfs参数
df -hl
2.设置参数
# umount tmpfs # mount -t tmpfs shmfs -o size=1500m /dev/shm
3.修改“/etc/fstab”
tmpfs /dev/shm tmpfs size=1500m 0 0
Oracle6.1重启后设置回失效,还需如下设置
4.注释如下语句
#mount -f /dev/shm >/dev/null2>&1
5.在rc.sysinit 中找到如下内容:
在rc.sysinit 中找到如下内容:
# Mount all other filesystems (except forNFS and /proc, which is already # mounted). Contrary to standard usage, # filesystems are NOT unmounted in singleuser mode. if [ "$READONLY" !="yes" ] ; then action $"Mounting local filesystems: " mount -a -tnonfs,nfs4,smbfs,ncpfs,cifs,gfs,gfs2 -O no_netdev else action $"Mounting local filesystems: " mount -a -n -tnonfs,nfs4,smbfs,ncpfs,cifs,gfs,gfs2 -O no_netdev fi 在如下部分里添加tmpfs 这个类型进去: if [ "$READONLY" !="yes" ] ; then action $"Mounting local filesystems: " mount -a -t tmpfs,nonfs,nfs4,smbfs,ncpfs,cifs,gfs,gfs2 -O no_netdev else action $"Mounting local filesystems: " mount -a -n -t tmpfs,nonfs,nfs4,smbfs,ncpfs,cifs,gfs,gfs2 -Ono_netdev fi
然后重启OS:
[root@rac1 ~]# df -lh
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 14G 11G 2.4G 83% /
tmpfs 3.0G 88K 3.0G 1% /dev/shm
/dev/sda1 194M 46M 139M 25% /boot