I tried connecting to an Oracle DB today to run a recovery, but I came across this message:
Connected to an idle instance.
upon logging in. I tried to run
SQL> startup but to no avail.
I got the following output:
ORA-00845: MEMORY_TARGET not supported on this system
Thankfully I had my Oracle logs open in another window (
tail -f alert.log)and I saw the issue.
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 21474836480 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 21468090368 and used is 6746112 bytes. Ensure that the mount point is /dev/shm for this directory.
Essentially, my /dev/shm file system was too small for Oracle to use and Oracle is asking me to bump up the space I give it. Doing a
df -h showed me a little more details:
tmpfs 20G 6.5M 20G 1% /dev/shm
I would have to unmount and then remount with a little more space so that Oracle quits complaining.
mount -t tmpfs shmfs -o size=25g /dev/shm
Once I did that, I logged back into Oracle and was able to start up my database properly.
sqlplus / as sysdba
ORACLE instance started.
Total System Global Area 2.1379E+10 bytes
Fixed Size 2262656 bytes
Variable Size 1.4026E+10 bytes
Database Buffers 7314866176 bytes
Redo Buffers 36073472 bytes