11 Replies Latest reply: Jan 15, 2013 7:02 AM by 984656 RSS

    Ubuntu 12.04 Oracle XE and ORA-00845: MEMORY_TARGET not supported

    930664
      I was going to install Oracle XE on ubuntu 12.04, following instructions from: Oracle 11gR2 Express Edition on Linux Ubuntu 11.10 howto (Oracle XE installation on Ubuntu 11.10) but the following error occures after /etc/init.d/oracle-xe configure is called:

      Starting Oracle Net Listener...Done
      Configuring database...
      Database Configuration failed. Look into /u01/app/oracle/product/11.2.0/xe/config/log for details

      cloneDBCreation.log
      ORA-01034: ORACLE not available
      ORA-27101: shared memory realm does not exist
      Linux-x86_64 Error: 2: No such file or directory
      ORA-00845: MEMORY_TARGET not supported on this system
      Create controlfile reuse set database "XE"

      I've checked and repeated steps regarding this issue few times (point 7 from the above tutorial for 11.10) but it didn't help. I've got 4 GB RAM and 2 GB of shared memory. so it seems that it should work. Any hints about what should I check/try?

      I must add that there was one more report like mine for 12.04, from another user (it's now removed by moderator), so I'm not the only one facing this issue.

      Regards

      Edited by: ext on 2012-04-17 10:16
        • 1. Re: Ubuntu 12.04 Oracle XE and ORA-00845: MEMORY_TARGET not supported
          Udo
          Hello,
          ORA-27101: shared memory realm does not exist
          This error usually has two reasons:
          1) ORACLE_HOME and/or ORACLE_SID aren't set as expected
          2) Your shared memory configuration has some error.

          So, let's start the analysis... For 1) please run
          env | grep ORACLE
          and see if you get the following values (or none if you've uninstalled already)
          ORACLE_SID=XE
          ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
          For 2) we have
          sysctl -p |grep kernel
          df -k /dev/shm
          The first one should verify that you have enough shared memory in your kernel parameters to serve your memory_target parameter. (Which value did you enter for that parameter, anyway?) You can also verify if the semaphore parameters ( sem ) have been setup as required.
          The second one should verify that this amount of shared memory is actually available on the mounted device using the right filesystem-type ( tmpfs ).
          I've checked and repeated steps regarding this issue few times (point 7 from the above tutorial for 11.10) but it didn't help.
          It's not just section 7 that's relevant for using memory target. I'm not sure if you read and applied all the steps of the guide you've referenced.
          We'll see if your configuration is expected when you post the output for the commands above.

          -Udo
          • 2. Re: Ubuntu 12.04 Oracle XE and ORA-00845: MEMORY_TARGET not supported
            931219
            Hello !

            I have the same problem with Ubuntu 12.04 amd64.

            # uname -a
            Linux xxxxxx 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

            # env | grep ORACLE
            ORACLE_SID=XE
            ORACLE_BASE=/u01/app/oracle
            ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe

            # sysctl -p |grep kernel
            nothing

            # sysctl -a |grep kernel | grep shm
            kernel.shmmax = 429496729
            kernel.shmall = 2097152
            kernel.shmmni = 4096
            kernel.shm_rmid_forced = 0

            # sysctl -a | grep kernel | grep sem
            kernel.sem = 250     32000     100     128

            # df -k /dev/shm
            Filesystem 1K-blocks Used Available Use% Mounted on
            none 2877236 200 2877036 1% /run/shm

            Seems to I made all steps from Oracle 11gR2 Express Edition on Linux Ubuntu 11.10 howto but after "/etc/init.d/oracle-xe configure" Oracle still says in logs:

            ORA-00845: MEMORY_TARGET not supported on this system
            select TO_CHAR(systimestamp,'YYYYMMDD HH:MI:SS') from dual
            *
            ERROR at line 1:
            ORA-01034: ORACLE not available


            WBR, Alex.

            Edited by: user13111289 on Apr 17, 2012 5:06 PM
            • 3. Re: Ubuntu 12.04 Oracle XE and ORA-00845: MEMORY_TARGET not supported
              Udo
              Hello Alex,
              # df -k /dev/shm
              Filesystem 1K-blocks Used Available Use% Mounted on
              none 2877236 200 2877036 1% /run/shm

              Seems to I made all steps from Oracle 11gR2 Express Edition on Linux Ubuntu 11.10 howto but after "/etc/init.d/oracle-xe configure" Oracle still says in logs:
              It seems the mounted filesystem does not fit. As I mentioned before, "tmpfs" is needed.
              You'll find a thread where this has been confirmed here: {message:id=10242332} and a comment of somebody who fixed his ORA-00845 the same way (and seems to have stumbled upon that thread before) as reply to the guide here: {message:id=10280550}
              I guess it will help in your case as well.

              -Udo
              • 4. Re: Ubuntu 12.04 Oracle XE and ORA-00845: MEMORY_TARGET not supported
                931219
                Hello, Udo !

                Thank you very much !

                'replacing “mount -B /run/shm /dev/shm” with “mount -t tmpfs shmfs -o size=2048m /dev/shm” in /etc/init.d/oracle-shm' really helps me for Ubuntu 12.04.

                As far as I understand, it's a little bit other solution. Instead binding /dev/shm->/run/shm, we just creating one more filesystem. But it works good.

                WBR, Alex.
                • 5. Re: Ubuntu 12.04 Oracle XE and ORA-00845: MEMORY_TARGET not supported
                  930664
                  The solution to make things work on Ubuntu 12.04 is to replace

                  "mount -B /run/shm /dev/shm"

                  with

                  "mount -t tmpfs shmfs -o size=2048m /dev/shm"

                  in

                  "/etc/init.d/oracle-shm"

                  Where the value of "size" parameter depends on available system memory.
                  • 6. Re: Ubuntu 12.04 Oracle XE and ORA-00845: MEMORY_TARGET not supported
                    Catch~22
                    It may fix the installation problem, but I wasn't so sure if this is the right solution.

                    ORA-00845 has 2 reasons:

                    1) /dev/shm does not exist
                    2) /dev/shm is too small

                    Ubuntu 11.10 replaced /dev/shm with /run/shm - that's reason #1 causing the problem. Shared memory is 50 % of RAM by default. If free space in /run/shm is less than 1 GB, Oracle XE cannot allocate sufficient shared memory - that's reason #2.

                    The mount -B command creates a mount point /dev/shm using the same source as /run/shm. The mount -t command creates additional shared memory. Since /run/shm is already 50 % of RAM, adding another 50 % of shared memory under /dev/shm can hardly be a solution.

                    Did 12.04 change any known defaults for /run/shm? I just had a quick look in 12.04 beta 2 and /run/shm seems a few KB smaller than in the previous release. Perhaps this is the reason, however, before going into more details I'd rather wait for the release version.
                    • 7. Re: Ubuntu 12.04 Oracle XE and ORA-00845: MEMORY_TARGET not supported
                      Catch~22
                      For what it's worth, I think I figured out what the problem is in 12.04

                      <pre>
                      df -k /dev/shm
                      </pre>

                      shows different results in 11.10 and 12.04

                      Under 12.04 it shows "mounted on */run/shm*"

                      in 11.10 it shows "mounted on */dev/shm*"

                      Hence Oracle does not find shared memory:

                      ([pid  2018] write(12, "devshm available 0 bytes, used 0"..., 38))

                      ORA-01034: ORACLE not available
                      ORA-27101: shared memory realm does not exist
                      Linux-x86_64 Error: 2: No such file or directory
                      ORA-00845: MEMORY_TARGET not supported on this system

                      I'm not sure how to fix this yet. Perhaps it is a bug in 12.04
                      • 8. Re: Ubuntu 12.04 Oracle XE and ORA-00845: MEMORY_TARGET not supported
                        Catch~22
                        The following could be a possible work around. At least it does not add another tempfs ramdisk and the Oracle Xe installation works:

                        In /etc/init.d/oracle-shm:

                        replace:
                        <pre>
                        mount -B /run/shm /dev/shm
                        </pre>
                        with:
                        <pre>
                        mount --move /run/shm /dev/shm
                        mount -B /dev/shm /run/shm
                        </pre>

                        Note the changed order of /dev/shm in the 2nd mount -B command.
                        • 9. Re: Ubuntu 12.04 Oracle XE and ORA-00845: MEMORY_TARGET not supported
                          950987
                          I was facing this problem and solve with this:

                          +'replacing “mount -B /run/shm /dev/shm” with “mount -t tmpfs shmfs -o size=2048m /dev/shm” in /etc/init.d/oracle-shm' really helps me for Ubuntu 12.04.+


                          I found this solution in this thread:


                          Re: Oracle 11gR2 Express Edition on Linux Ubuntu 11.10 howto
                          • 10. Re: Ubuntu 12.04 Oracle XE and ORA-00845: MEMORY_TARGET not supported
                            753102
                            Another solution can be to not use automatic memory management by setting manually PGA and SGA memory size.
                            You can do this [after installation, see my previous post|https://forums.oracle.com/forums/thread.jspa?threadID=2298493&start=0&tstart=0#jive-message-9943783] , or better, at installation time.


                            By the way, you will if it can help, I have written an [howto install Oracle 11g on Ubuntu 12.04 64bits|http://www.makina-corpus.org/blog/howto-install-oracle-11g-ubuntu-linux-1204-precise-pangolin-64bits] which list most of the common issues during installation.
                            • 11. Re: Ubuntu 12.04 Oracle XE and ORA-00845: MEMORY_TARGET not supported
                              984656
                              Another solution is to [url http://askubuntu.com/questions/240412/how-can-i-modify-the-default-behaviour-of-ubuntu-12-04-12-10-to-prevent-a-sy]prevent Ubuntu from creating the symbolic link from /dev/shm to /run/shm by default. This is just a matter of editing /etc/init/mounted-dev.conf and commenting out the line that reads:

                              # [ -e /dev/shm ] || ln -s /run/shm /dev/shm

                              Then it's just a matter of adding an entry into /etc/fstab for the shared memory temporary file system mounted at /dev/shm, say for a 2 gigabyte file add:

                              shm /dev/shm tmpfs size=2g 0 0

                              NB. The really neat thing about this is that you now don't need the /etc/init.d/oracle-shm fix-up script at all as described in Section 7) of [url https://forums.oracle.com/forums/thread.jspa?threadID=2301639&start=0&tstart=0]Oracle 11gR2 Express Edition on Linux Ubuntu 11.10 howto. However if you have already created it you can remove it using:

                              update-rc.d -f oracle-shm remove

                              Then either reboot to mount the new file system, or run:

                              rm -f /dev/shm
                              mount /dev/shm

                              Edited by: Paul Hudson on 15-Jan-2013 05:02