There is always something that gets in the way. One problem I regularly stumble upon when installing a new Oracle 11g R2 installation is the following error when I try to start the database:
So I keep this post mainly for my own reference when installing a new database on a Linux system.
SQL> startup nomount; ORA-00845: MEMORY_TARGET not supported on this system
This error comes up because you tried to use the Automatic Memory Management (AMM) feature of Oracle 11g R2. Well done, but it seems that your shared memory filesystem (shmfs) is not big enough. So let’s look at the steps necessary to enlarge your shared memory filesystem to avoid the error above.
First of all, login as root and have a look at the filesystem:
So we can see that
[root@oracle-em oracle]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg_oracleem-lv_root 93G 19G 69G 22% / tmpfs 5.9G 112K 5.9G 1% /dev/shm /dev/sda1 485M 99M 362M 22% /boot
tmpfshas a size of 6GB. We can change the size of that filesystem by issuing the following command (where “12g” is the size I want for my MEMORY_TARGET):
This command (re)mounts the shmfs filesystem (check this post for more information about shmfs) with the option “
[root@oracle-em oracle]# mount -t tmpfs shmfs -o size=12g /dev/shm
The shared memory file system should be big enough to accommodate the
MEMORY_MAX_TARGETvalues, or Oracle will throw the ORA-00845 error. Note that when changing something with the
mountcommand, the changes are not permanent.
To make the change persistent, edit your
/etc/fstabfile to include the option you specified above:
In my case, I replaced the “defaults” option with the
[root@oracle-em ~]# cat /etc/fstab [..] tmpfs /dev/shm tmpfs size=12g 0 0 [..]
size=12goption. After saving the file, the changes should be permanent. Now back to Oracle. Let’s see if we can start the database now…
SQL> startup nomount ORACLE instance started.