Memory_Target or Share_Memory Not Supported

Occasionally I have come across instances where during the process of migrating the virtual machine, something gets messed up and starting Oracle results in the following error:

MEMORY_TARGET NOT SUPPORTED

or

SHARED_MEMORY Realm does not exist

Luckily, it is a fairly straightforward fix.

  1. Login as root user
    1. sudo su
    2. Enter ‘cangetin’ as password
  2. Change the size of /dev/shm
    1. mount -o remount,size=4G /dev/shm
  3. Make the change permanent for next time
    1. Install gedit to edit the file: yum install gedit -y
    2. gedit /etc/fstab
    3. Add the following line to the end of the file
    4. tmpfs /dev/shm tmpfs size=4g 0 0
    5. Select save
  4. Login as oracle user
    1. su oracle
  5. Login to SQL*Plus
    1. sqlplus / as sysdba
  6. Startup the database
    1. SQL> STARTUP
  7. Exit back to the student user.