Monday, January 03, 2011

solve ORA-00845: MEMORY_TARGET not supported on this system

I recently tried to start an "old" Oracle 11G database which was installed on a system I used for some other projects. Due to the other projects some settings to the operating system have changed.

When the database was started during the system boot I found an error on the console stating the following error:

ORA-00845: MEMORY_TARGET not supported on this system

It turned out that my tmpfs filesystem was to small for the original settings of my Oracle database. tmpfs is a common name for a temporary file storage facility on many Unix-like operating systems. It is intended to appear as a mounted file system, but stored in volatile memory instead of a persistent storage device. A similar construction is a RAM disk, which appears as a virtual disk drive and hosts a disk file system.

You can check your tmpfs mount with a simple df -h command like below (this is the state after the change):

[oracle@oem bin]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda2 4.1G 3.0G 1.1G 75% /
/dev/xvda1 92M 12M 76M 14% /boot
tmpfs 3.0G 1.2G 1.8G 41% /dev/shm
/dev/xvdb1 27G 13G 13G 49% /u01
[oracle@oem bin]$

It turned out the size was not 3.0G and it turned out that my database settings where set for a 2.0G system. You can check this by executing the following command's"

SQL>
SQL> show parameter MEMORY_MAX_TARGET;

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
memory_max_target big integer 2G
SQL> show PARAMETER MEMORY_TARGET;

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
memory_target big integer 2G
SQL>
SQL>

This shows we need at least 2.0G, to be sure I made my tmpfs 3.0G by editing my /etc/fstab file. Originally it looked like the one below:

[oracle@oem bin]$ cat /etc/fstab
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot 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-VM swap swap defaults 0 0
LABEL=oms /u01 ext3 defaults 1 2
[oracle@oem bin]$

You can change it to the example below so you will mount 3.0G:

[oracle@oem bin]$ cat /etc/fstab
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs size=3000m 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-VM swap swap defaults 0 0
LABEL=oms /u01 ext3 defaults 1 2
[oracle@oem bin]$

No comments: