1 2 Previous Next 17 Replies Latest reply: Oct 24, 2011 5:58 AM by 459732 RSS

    ubuntu 11.10 ORA-00845: MEMORY_TARGET not supported on this system

    user549961
      Dear Friends

      On ubuntu 11.10 when trying to start 11.2 xe I get
      ORA-00845: MEMORY_TARGET not supported on this system

      I redused memory target to memory_target=198217728

      but nothing helps

      here my system infos:

      oracle@peter-xps:~/product/11.2.0/xe/config/scripts$ df -h
      Filesystem Size Used Avail Use% Mounted on
      /dev/sda1 213G 153G 50G 76% /
      udev 3.9G 4.0K 3.9G 1% /dev
      tmpfs 1.6G 1016K 1.6G 1% /run
      none 5.0M 0 5.0M 0% /run/lock
      none 3.9G 188K 3.9G 1% /run/shm

      peter@peter-xps:~$ sudo sysctl -a | grep shmmax
      kernel.shmmax = 268435456

      peter@peter-xps:~$ sudo cat /proc/meminfo
      MemTotal: 8126516 kB
      MemFree: 7123664 kB
      Buffers: 44960 kB
      Cached: 425048 kB
      SwapCached: 0 kB
      Active: 426844 kB
      Inactive: 339048 kB
      Active(anon): 296760 kB
      Inactive(anon): 964 kB
      Active(file): 130084 kB
      Inactive(file): 338084 kB
      Unevictable: 0 kB
      Mlocked: 0 kB
      SwapTotal: 8317948 kB
      SwapFree: 8317948 kB
      Dirty: 20 kB
      Writeback: 0 kB
      AnonPages: 295924 kB
      Mapped: 106312 kB
      Shmem: 1844 kB
      Slab: 49172 kB
      SReclaimable: 23312 kB
      SUnreclaim: 25860 kB
      KernelStack: 2984 kB
      PageTables: 20404 kB
      NFS_Unstable: 0 kB
      Bounce: 0 kB
      WritebackTmp: 0 kB
      CommitLimit: 12381204 kB
      Committed_AS: 1805000 kB
      VmallocTotal: 34359738367 kB
      VmallocUsed: 355316 kB
      VmallocChunk: 34359378940 kB
      HardwareCorrupted: 0 kB
      AnonHugePages: 0 kB
      HugePages_Total: 0
      HugePages_Free: 0
      HugePages_Rsvd: 0
      HugePages_Surp: 0
      Hugepagesize: 2048 kB
      DirectMap4k: 135168 kB
      DirectMap2M: 8187904 kB

      Can anyone help ?

      Thanks
      Peter
        • 1. Re: ubuntu 11.10 ORA-00845: MEMORY_TARGET not supported on this system
          Catch-22
          MEMORY_TARGET configures the database to use automatic memory management to manage SGA and PGA memory together. ORA-00845 error usually occurs when using kernel hugepages, which is not compatible with AMM. AMM expects shared memory in /dev/shm.

          Looking at your df output I can see that you have */run/shm* instead of */dev/shm*. Perhaps this is the problem.

          https://wiki.ubuntu.com/OneiricOcelot/ReleaseNotes

          Ubuntu 11.10 has migrated away from /var/run, /var/lock and /dev/shm and now uses /run, /run/lock and /run/shm instead (respectively). It contains a sed command to search and replace some profile that may be used to aid in migration (it allows both the old and the new paths), but I have no idea what profile to edit.

          Alternatively you could try to create a symlink: ln -s  /dev/shm /run/shm (symlink already exists)

          Otherwise, you should be able to start your XE database using ASMM. To accomplish this, remove the MEMROY_TARGET parameter and use the following.

          pga_aggregate_target=200540160
          sga_target=601620480

          Edited by: Dude on Oct 14, 2011 10:29 PM
          • 2. Re: ubuntu 11.10 ORA-00845: MEMORY_TARGET not supported on this system
            user549961
            Thanks for your help

            I tried the link but it dows not work.
            So I went back to set SGA and PGA

            Peter S.
            • 3. Re: ubuntu 11.10 ORA-00845: MEMORY_TARGET not supported on this system
              753102
              Please, could you provide us a bit more of information:

              I have experienced the same error since I have migrated to Ubuntu 11.10.
              Indeed, Oracle is trying to get free memory from /dev/shm which is a symlink to /run/shm and then returns 0 in place of real free memory.

              But how do you change memory target to sga and pga ?
              I've tried to update file /<oracle base dir>/admin/<sid>/pfile.<number> with no success.

              By the way, have you been able to install Oracle 11g 64bits on Unbuntu 11.10 ?
              I am trying since many days without any success, always having link errors, even by following my own tutorial (and many others) which works like a charm on Ubuntu 11.04:
              http://www.makina-corpus.org/blog/how-install-oracle-10g-full-64-bits-version-not-xe-and-tora-gnu-linux-ubuntu-karmic-910-64-bits


              Thanks in advance.

              With kind regards,

              Gaël,
              • 4. Re: ubuntu 11.10 ORA-00845: MEMORY_TARGET not supported on this system
                855458
                Well people,

                I just migrated from Ubuntu 11.04 to 11.10. I cannot install the oracle database 11g xe.

                This is the output for:

                Database Configuration failed. Look into /u01/app/oracle/product/11.2.0/xe/config/log for details

                This is the content at file: CloneRmanRestore.log

                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
                Process ID: 0
                Session ID: 0 Serial number: 0

                declare
                *
                ERROR at line 1:
                ORA-01034: ORACLE not available
                Process ID: 0
                Session ID: 0 Serial number: 0

                select TO_CHAR(systimestamp,'YYYYMMDD HH:MI:SS') from dual
                *
                ERROR at line 1:
                ORA-01034: ORACLE not available
                Process ID: 0
                Session ID: 0 Serial number: 0

                Help me.
                I need the database to work, but i don't want welcome to 11.04 version.

                Victor Jabur
                • 5. Re: ubuntu 11.10 ORA-00845: MEMORY_TARGET not supported on this system
                  Catch-22
                  First of all, please start your own thread. Hijacking another persons thread is considered bad forum usage.

                  The problem you are running into is that Ubuntu 11.10 does not longer provide a /dev/shm mountpoint, which is required for 11g Automatic Memory Management (AMM). It does have a /dev/shm symlink to /run/shm, but it is not good enough for Oracle. To fix the problem you need to modify the init.ora scripts for the clone and auxiliary DB to use ASMM, before running the "configure" command, otherwise the cloning will fail. There are actually a few more things you need to adjust.

                  I'm currently writing a new how-to, which will be somewhat different from my previous how-to at Install Oracle 11gR2 Express Edition on Ubuntu Linux 11.04 (64-bit) Howto The new how-to will also address the Ubuntu Unity desktop. I plan to post here in a couple of days.
                  • 6. Re: ubuntu 11.10 ORA-00845: MEMORY_TARGET not supported on this system
                    855458
                    I'm not hijacking another persons. My problem is related (same problem) that the title of this post: Thread: ubuntu 11.10 ORA-00845: MEMORY_TARGET not supported on this system

                    I put the log error for complement the problem of this post.

                    I congratulations you by trying to resolve this problem, like as the other changes of ubuntu version that you correct. You are a very good profissional.

                    Thanks.
                    Victor Jabur.
                    • 7. Re: ubuntu 11.10 ORA-00845: MEMORY_TARGET not supported on this system
                      Catch-22
                      Ok, I guess hijacking was not the correct term, but hitchhiking should nail it. It's doesn't really make a difference. I just seen it plenty of times and very often such posts get removed. In such situations, it might be better to create a new thread with a reference to an existing link. I believe the idea behind is that when you address an issue by using the thread of someone else you cannot mark correct or helpful answers. Anyway, be it as it is, it's not my thread. I might be able to finish up the new howto today. Meanwhile I also found a way how to bring back the /dev/shm mount point, which should avoid having to modify the OracleXE installation scripts.
                      • 8. Re: ubuntu 11.10 ORA-00845: MEMORY_TARGET not supported on this system
                        753102
                        Hi Dude,

                        Thanks for your howto that I am desperatly expected for.

                        I do not think we are spamming this post: we have both the same problem, so why creating 2 more subjects for this?

                        By the way, could you be more accurate on how to replace memory_target = <value> by pga_aggregate_target and sga_target parameters :

                        On an Ubuntu 11.04 updated to 11.10 I have only found the following oracle init scripts:
                        $ find . -name "**ini**.ora"
                        ./product/11.2.0/dbhome_1/srvm/admin/init.ora
                        ./product/11.2.0/dbhome_1/hs/admin/initdg4odbc.ora
                        ./product/11.2.0/dbhome_1/dbs/init.ora

                        And only ./product/11.2.0/dbhome_1/dbs/init.ora was containing a reference to memory_target, but replacing this parameter by the two others has not changed my problem and I still having the "MEMORY_TARGET" error.

                        Thanks in advance for your help.

                        Gaël.

                        Edited by: user9937506 on 19 oct. 2011 23:08
                        • 9. Re: ubuntu 11.10 ORA-00845: MEMORY_TARGET not supported on this system
                          94627
                          There is a littel workaround until Oracle emit a patch.

                          Edit the oracle binary ($ORACLE_HOME/bin/oracle) with a hexadecimal editor (okteta if you have kubuntu). Then search for H:6465762F73686D (dev/sdm) and replace H:646576 (dev) by H:72756E (run).

                          When finished search the strings with this :

                          strings oracle | grep /shm

                          The results have to be :

                          FAIL in call system('/bin/ls -alrt /run/shm >/tmp/shmls.txt')
                          FAIL to open file /tmp/shmls.txt
                          WARNING: Automatic memory managament feature on ASM needs /run/shm to be mounted and sized alteast to the value of MEMORY_TARGET. Falling back to manual memory management on the ASM instance.
                          memory_target needs larger /run/shm
                          /bin/df -k /run/shm
                          /run/shm
                          /bin/ls -alrt /run/shm
                          /run/shm/ora_%s_%d
                          /proc/sys/kernel/shmmax
                          WARNING: MEMORY_TARGET feature needs /run/shm to be size at least %llu bytes. Please check the size and permission to create files in this directory for MEMORY_TARGET to work correctly.
                          WARNING: You are trying to use the MEMORY_TARGET feature. This feature requires the /run/shm file system to be mounted for at least %llu bytes. /run/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 %llu and used is %llu bytes. Ensure that the mount point is /run/shm for this directory.
                          WARNING: unable to open /run/shm. %d
                          WARNING: size of /run/shm is now %llu bytes.
                          Please set /run/shm to be greater than the sum total of
                          /run/shm/ora
                          /run/shm/ora_%s_%lu
                          /run/shm/ora
                          • 10. Re: ubuntu 11.10 ORA-00845: MEMORY_TARGET not supported on this system
                            753102
                            Well, finally I get it running on Ubuntu 11.10 64bits:

                            - Oracle has been installed from Ubuntu 11.04 64bits, then distribution migrated to 11.10 (I know this is not a valid option)
                            - Then replacing with okteta /dev/shm by /run/shm is a working solution, but patching a binary is too ugly

                            I finally get it running using sga and pga memory parameters by creating a file in product/11.2.0/dbhome_1/dbs/init*orcl*.ora using the howto described here:
                            http://www.tafora.fr/div/recreerinit.doc.html
                            Then replacing memory_target by the parameters provided by Dude.

                            Thanks a lot.

                            With kind regards,

                            Gaël,
                            • 11. Re: ubuntu 11.10 ORA-00845: MEMORY_TARGET not supported on this system
                              orafad
                              For XE / Express Edition, there's a dedicated forum: {forum:id=251}.
                              • 12. Re: ubuntu 11.10 ORA-00845: MEMORY_TARGET not supported on this system
                                Catch-22
                                The fix is quite easy and requires just to temporarily change the OS system init, before the XE installation. Then you can either leave it in place or change from the default AMM to ASMM and undo the system hack. Like I said, I'm working on the howto - I'm just currently busy.

                                The problem is Ubuntu and not XE specific. It has to do with the new version of the systemd init. systemd is a replacement for the System V init daemon for Linux.
                                • 13. Re: ubuntu 11.10 ORA-00845: MEMORY_TARGET not supported on this system
                                  user10968065
                                  Thanks the search replace dev/shm with run/shm brings up the oracle fine on 11.10 upgraded from 11.04.
                                  This solution saved my oracle installation. Thanks once again manu.
                                  • 14. Re: ubuntu 11.10 ORA-00845: MEMORY_TARGET not supported on this system
                                    Rambabu Kola
                                    Here are the steps to make it easily understand

                                    Install Okteta
                                    sudo apt-get install okteta

                                    Perform the below steps to modify
                                    cd $ORACLE_HOME/bin
                                    cp oracle oracle.ori
                                    okteta oracle
                                    Go to Edit > Replace
                                    In search give UTF8 and /dev/shm
                                    In replace with give UTF8 /run/shm
                                    - It will replace 19 places
                                    - type strings oracle | grep /shm

                                    Results will Be

                                    FAIL in call system('/bin/ls -alrt /run/shm >/tmp/shmls.txt')
                                    FAIL to open file /tmp/shmls.txt
                                    WARNING: Automatic memory managament feature on ASM needs /run/shm to be mounted and sized alteast to the value of MEMORY_TARGET. Falling back to manual memory management on the ASM instance.
                                    memory_target needs larger /run/shm
                                    /bin/df -k /run/shm
                                    /run/shm
                                    /bin/ls -alrt /run/shm
                                    /run/shm/ora_%s_%d
                                    /proc/sys/kernel/shmmax
                                    WARNING: MEMORY_TARGET feature needs /run/shm to be size at least %llu bytes. Please check the size and permission to create files in this directory for MEMORY_TARGET to work correctly.
                                    WARNING: You are trying to use the MEMORY_TARGET feature. This feature requires the /run/shm file system to be mounted for at least %llu bytes. /run/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 %llu and used is %llu bytes. Ensure that the mount point is /run/shm for this directory.
                                    WARNING: unable to open /run/shm. %d
                                    WARNING: size of /run/shm is now %llu bytes.
                                    Please set /run/shm to be greater than the sum total of
                                    /run/shm/ora
                                    tmpfs filesys on /run/shm full
                                    No tmpfs file system found under /run/shm
                                    /run/shm/ora_%s_%lu
                                    /run/shm/ora

                                    Then start the database
                                    $ORACLE_HOME/bin/lsnrctl start
                                    $ORACLE_HOME/bin/dbstart

                                    :-)
                                    1 2 Previous Next