• ORA-00845: MEMORY_TARGET not supported on this system


    1.修改memory_target
    SQL> alter system set memory_target=6g scope=spfile;

    System altered.

    SQL> shutdown immediate
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> exit
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    [oracle@localhost myshell]$ echo $ORACLE_SID
    slnngk
    [oracle@localhost myshell]$
    [oracle@localhost myshell]$ sqlplus /nolog

    SQL*Plus: Release 11.2.0.4.0 Production on Sat Dec 29 15:33:47 2018

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

    SQL> connect / as sysdba
    Connected to an idle instance.
    SQL> startup
    ORA-00845: MEMORY_TARGET not supported on this system

    官方解释:
    Starting with Oracle Database 11g, the Automatic Memory Management feature requires more shared memory (/dev/shm)and file descriptors. The size of the shared memory should be at least the greater of MEMORY_MAX_TARGET and MEMORY_TARGET for each Oracle instance on the computer. If MEMORY_MAX_TARGET or MEMORY_TARGET is set to a non zero value, and an incorrect size is assigned to the shared memory, it will result in an ORA-00845 error at startup.
    简单来说就是 MEMORY_MAX_TARGET 的设置不能超过 /dev/shm 的大小:
    [oracle@localhost ]$ df -h | grep shm
    tmpfs 5.8G 0 5.8G 0% /dev/shm

    2.修改/etc/fstab文件
    [root@localhost ~]# cat /etc/fstab | grep tmpfs
    tmpfs /dev/shm tmpfs defaults,size=8G 0 0

    现在可以通过重启使这个配置生效,也可以通过重新挂载来修改其大小:

    [root@localhost ~]# mount -o remount,size=8G /dev/shm
    [root@localhost ~]# df -h | grep shm
    tmpfs 4.0G 0 4.0G 0% /dev/shm

    3.再次启动
    SQL> startup
    ORACLE instance started.

    Total System Global Area 6413680640 bytes
    Fixed Size 2265224 bytes
    Variable Size 3489664888 bytes
    Database Buffers 2902458368 bytes
    Redo Buffers 19292160 bytes
    Database mounted.
    Database opened.

    -- The End --

  • 相关阅读:
    bzoj 3027 [Ceoi2004]Sweet——生成函数
    bzoj 3028 食物——生成函数
    JZOJ 5461 购物 —— 贪心
    JZOJ 1003 [ 东莞市选 2007 ] 拦截导弹 —— 递推
    JZOJ 1667 ( bzoj 1801 ) [ AHOI 2009 ] 中国象棋 —— DP
    洛谷 P2055 [ ZJOI 2009 ] 假期的宿舍 —— 二分图匹配
    洛谷 P3398 仓鼠找sugar —— 树链剖分
    洛谷 P1083 [ NOIP 2012 ] 借教室 —— 线段树 / 二分差分数组
    bzoj 3895 取石子 —— 博弈论
    洛谷 P1312 [ NOIP 2011 ] Mayan游戏 —— 搜索+模拟
  • 原文地址:https://www.cnblogs.com/hxlasky/p/10196378.html
Copyright © 2020-2023  润新知