SQL> startup nomount;
ORA-00845: MEMORY_TARGET not supported on this system
SQL>
alert_log:
Wed Mar 13 10:38:04 2013
Adjusting the default value of parameter parallel_max_servers
from 160 to 135 due to the value of parameter processes (150)
Starting ORACLE instance (normal)
WARNING: You are trying to use the MEMORY_TARGET feature. This feature requires the /dev/shm file system to be mounted for at least 1610612736 bytes. /dev/shm is either not mounted or is mounted with available space less than this size. Please fix this so that MEMORY_TARGET can work as expected. Current available is 773545984 and used is 242552832 bytes. Ensure that the mount point is /dev/shm for this directory.
memory_target needs larger /dev/shm
Oracle的官方解析:
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 should be at least the greater of MEMORY_MAX_TARGET and MEMORY_TARGET for each Oracle instance on the computer. If MEMORY_MAX_TARGET or MEMORY_TARGET is set to a non zero value, and an incorrect size is assigned to the shared memory, it will result in an ORA-00845 error at startup.
[root@pc02 ~]# df -h | grep shm
tmpfs 970M 232M 738M 24% /dev/shm
[root@pc02 ~]# cat /etc/fstab | grep tmpfs
tmpfs /dev/shm tmpfs defaults 0 0
[root@pc02 ~]#
通过重新挂载来修改其大小:
一:
[root@db2 ~]#vi /etc/fstab //更换/dev/shm默认大小为2G
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
#tmpfs /dev/shm tmpfs defaults 0 0
tmpfs /dev/shm tmpfs defaults,size=2048M 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
LABEL=SWAP-hda3 swap swap defaults 0 0
注:本行defaults,size=10240M 中间无空格
[root@db2 ~]#
[root@db2 ~]# umount /dev/shm
[root@db2 ~]# mount /dev/shm
[root@pc02 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 428G 59G 348G 15% /
/dev/sda2 16G 177M 15G 2% /tmp
tmpfs 4.0G 232M 3.8G 6% /dev/shm
[root@pc02 ~]#
二:
[root@pc02 ~]# mount -o remount,size=4G /dev/shm
[root@pc02 ~]# df -h | grep shm
tmpfs 4.0G 232M 3.8G 6% /dev/shm
[root@pc02 ~]#
[root@pc02 ~]# cat /etc/fstab
LABEL=/ / ext3 defaults 1 1
LABEL=/tmp /tmp ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
LABEL=SWAP-sda3 swap swap defaults 0 0
[root@pc02 ~]#
SQL> startup
ORACLE instance started.
Total System Global Area 1603411968 bytes
Fixed Size 2228784 bytes
Variable Size 905973200 bytes
Database Buffers 687865856 bytes
Redo Buffers 7344128 bytes
Database mounted.
Database opened.
SQL>