ORA-00845: MEMORY_TARGET not supported on this system

在新建的数据库11.2.0.4.0后,启动数据库报错ORA-00845  MEMORY_TARGET not supported on this system。

点击(此处)折叠或打开

  1. [oracle@mhxy162 pfile]$ sqlplus / as sysdba

  2. SQL*Plus: Release 11.2.0.4.0 Production on Fri Aug 19 19:55:30 2016

  3. Copyright (c) 1982, 2013, Oracle. All rights reserved.

  4. Connected to an idle instance.
  5. SQL> startup pfile='/oracle/database/admin/yxzd/pfile/init.ora.7192016194820';
  6. ORA-00845: MEMORY_TARGET not supported on this system

查看alter日志内容,以及ORA 00845 .

点击(此处)折叠或打开

  1. Starting ORACLE instance (normal)
  2. WARNING: You are trying to use the MEMORY_TARGET feature. This feature requires the /dev/shm file system to be mounted for at least 780140544 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 754434048 and used is 221720576 bytes. Ensure that the mount point is /dev/shm for this directory.
  3. memory_target needs larger /dev/shm

点击(此处)折叠或打开

  1. [oracle@mhxy162 pfile]$ oerr ora 845
  2. 00845, 00000, "MEMORY_TARGET not supported on this system"
  3. // *Cause: The MEMORY_TARGET parameter was not supported on this operating system or /dev/shm was not sized correctly on Linux.
  4. // *Action: Refer to documentation for a list of supported operating systems. Or, size /dev/shm to be at least the SGA_MAX_SIZE on each Oracle instance running on the system.
  5. [oracle@mhxy162 pfile]$ ll
查看pfile文件memory_target 参数值,和alter日志内容一致。

点击(此处)折叠或打开

  1. [oracle@mhxy162 pfile]$ grep memory_target init.ora.7192016194820
  2. memory_target=780140544
  3. [oracle@mhxy162 pfile]$
解决方式: 通过临时更改shm值  数据库启动成功。如果想永久修改需要修改  /etc/inittab 

点击(此处)折叠或打开

  1. [root@mhxy162 ~]# umount /dev/shm/
  2. [root@mhxy162 ~]# df -h
  3. Filesystem Size Used Avail Use% Mounted on
  4. /dev/sda3 26G 15G 9.8G 60% /
  5. /dev/sda1 194M 34M 151M 19% /boot
  6. [root@mhxy162 ~]# mount -a
  7. [root@mhxy162 ~]# mount
  8. /dev/sda3 on / type ext4 (rw)
  9. proc on /proc type proc (rw)
  10. sysfs on /sys type sysfs (rw)
  11. devpts on /dev/pts type devpts (rw,gid=5,mode=620)
  12. /dev/sda1 on /boot type ext4 (rw)
  13. none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
  14. tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0")
  15. [root@mhxy162 ~]# df -h
  16. Filesystem Size Used Avail Use% Mounted on
  17. /dev/sda3 26G 15G 9.8G 60% /
  18. /dev/sda1 194M 34M 151M 19% /boot
  19. tmpfs 931M 0 931M 0% /dev/shm
  20. [root@mhxy162 ~]# umount /dev/shm
  21. [root@mhxy162 ~]# ll
  22. total 280
  23. -rw-------. 1 root root 1193 Aug 19 18:53 anaconda-ks.cfg
  24. drwxr-xr-x. 2 root root 4096 Aug 19 19:15 Desktop
  25. drwxr-xr-x. 2 root root 4096 Aug 19 19:13 Documents
  26. drwxr-xr-x. 2 root root 4096 Aug 19 19:13 Downloads
  27. -rw-r--r--. 1 root root 27794 Aug 19 18:53 install.log
  28. -rw-r--r--. 1 root root 7572 Aug 19 18:52 install.log.syslog
  29. drwxr-xr-x. 2 root root 4096 Aug 19 19:13 Music
  30. -rw-r--r--. 1 root root 207399 Aug 15 13:30 pdksh-5.2.14-30.x86_64.rpm
  31. drwxr-xr-x. 2 root root 4096 Aug 19 19:13 Pictures
  32. drwxr-xr-x. 2 root root 4096 Aug 19 19:13 Public
  33. drwxr-xr-x. 2 root root 4096 Aug 19 19:13 Templates
  34. drwxr-xr-x. 2 root root 4096 Aug 19 19:13 Videos
  35. [root@mhxy162 ~]# df -h
  36. Filesystem Size Used Avail Use% Mounted on
  37. /dev/sda3 26G 15G 9.8G 60% /
  38. /dev/sda1 194M 34M 151M 19% /boot
  39. [root@mhxy162 ~]# mount -t tmpfs shmfs -o size=4000m /dev/shm
  40. [root@mhxy162 ~]# df -h
  41. Filesystem Size Used Avail Use% Mounted on
  42. /dev/sda3 26G 15G 9.8G 60% /
  43. /dev/sda1 194M 34M 151M 19% /boot
  44. shmfs 4.0G 0 4.0G 0% /dev/shm
  45. [root@mhxy162 ~]# mount|grep shmfs
  46. shmfs on /dev/shm type tmpfs (rw,size=4000m,rootcontext="system_u:object_r:tmpfs_t:s0")
  47. [root@mhxy162 ~]#
  48. [root@mhxy162 ~]# su - oracle
  49. [oracle@mhxy162 ~]$ ll
  50. total 2487240
  51. drwxr-xr-x. 7 oracle oinstall 4096 Aug 27 2013 database
  52. -rw-r--r--. 1 oracle oinstall 25193 Aug 19 19:33 db.rsp
  53. -rw-r--r--. 1 oracle oinstall 1395582860 Dec 24 2015 p13390677_112040_Linux-x86-64_1of7.zip
  54. -rw-r--r--. 1 oracle oinstall 1151304589 Dec 24 2015 p13390677_112040_Linux-x86-64_2of7.zip
  55. [oracle@mhxy162 ~]$ sqlplus / as sysdba
  56. SQL*Plus: Release 11.2.0.4.0 Production on Fri Aug 19 20:07:42 2016
  57. Copyright (c) 1982, 2013, Oracle. All rights reserved.
  58. Connected to an idle instance.


    SQL> startup
    ORACLE instance started.


    Total System Global Area  776646656 bytes
    Fixed Size                  2257272 bytes
    Variable Size             507514504 bytes
    Database Buffers          260046848 bytes
    Redo Buffers                6828032 bytes
    Database mounted.
    Database opened.
    SQL> 
    SQL>

更改linux的 /etc/inittab 的文件的tmpfs值。

点击(此处)折叠或打开

  1. [root@mhxy162 ~]# vi /etc/fstab
  2. #
    # /etc/fstab
    # Created by anaconda on Fri Aug 19 18:47:31 2016
    #
    # Accessible filesystems, by reference, are maintained under '/dev/disk'
    # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
    #
    UUID=4155e52c-7e18-4677-903a-5a62dbf104b1 /                       ext4    defaults        1 1
    UUID=b0db3f8c-ccaa-4448-8d66-8d6afefcac8d /boot                   ext4    defaults        1 2
    UUID=ec257f06-dd68-434c-b6e5-0bd75eae9f03 swap                    swap    defaults        0 0
    tmpfs                   /dev/shm                tmpfs   defaults,size=4000m        0 0
    devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
    sysfs                   /sys                    sysfs   defaults        0 0
    proc                    /proc                   proc    defaults        0 0

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/27039319/viewspace-2123762/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/27039319/viewspace-2123762/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值