zoukankan      html  css  js  c++  java
  • 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 --

  • 相关阅读:
    Tuxedo 介绍
    winform如何不卡界面
    银行基金代销系统调研
    如何在wcf中用net tcp协议进行通讯
    20190710用控制台启动一个wcf服务
    wcf必知必会以及与Webapi的区别
    2019年7月第一周总结-RabbitMQ总结
    RabbitMQ入门学习系列(七) 远程调用RPC
    RabbitMQ入门学习系列(六) Exchange的Topic类型
    RabbitMQ入门学习系列(五) Exchange的Direct类型
  • 原文地址:https://www.cnblogs.com/hxlasky/p/10196378.html
Copyright © 2011-2022 走看看