实例启动时报ORA-00845的解决方法
在Oracle 11g中如果采用AMM内存管理,那么当MEMORY_TARGET的值大于/dev/shm的时候,就会报ORA-00845: MEMORY_TARGET not supported on this system错误,解决办法增加/dev/shm大小,在redhat系列系统中,/dev/shm的默认值是系统总内存的一半
1、修改/dev/shm大小
[oracle@rtest ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 140G 57G 76G 43% /
/dev/sda1 99M 12M 82M 13% /boot
tmpfs 3.9G 995M 3.0G 25% /dev/shm
[oracle@rtest ~]$ mount -o size=8G -o nr_inodes=1000000 -o noatime,nodiratime -o remount /dev/shm
mount: only root can do that
[oracle@rtest ~]$ su -
Password:
[root@rtest ~]# mount -o size=8G -o nr_inodes=1000000 -o noatime,nodiratime -o remount /dev/shm
[root@rtest ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 140G 57G 76G 43% /
/dev/sda1 99M 12M 82M 13% /boot
tmpfs 8.0G 995M 7.1G 13% /dev/shm
2、 vi /etc/fstab
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults,size=8G 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-sda2 swap swap defaults 0 0