再说ORA-00845: MEMORY_TARGET not supported on this system

网上很多关于这个错误的文章,有些还引用了Oracle文档中的说明。

Setting Memory Target at Instance Startup on Linux
Starting with Oracle Database 11g Release 1 (11.1), Oracle provides the option of automatically managing SGA and PGA with a combined MEMORY_TARGETparameter without having to set SGA_TARGET and PGA_AGGREGATE_TARGET explicitly. This is supported on Linux, Windows, Solaris, HPUX, and AIX (reference Bug 7258378).
If you see the ORA-00845 error reported on Linux machines at Oracle instance startup when using the MEMORY_TARGET parameter, then check the size of /dev/shm. If /dev/shm is not configured, then mount it sized to be at least the value of MEMORY_TARGET. If /dev/shm is configured but the amount of available space reported (through df -k /dev/shm) is less than MEMORY_TARGET, then free the space or mount a larger /dev/shm to satisfy the MEMORY_TARGET size. Note that if you set theMEMORY_MAX_TARGET parameter greater than MEMORY_TARGET, then ensure that /dev/shm is sized to be at least the value of MEMORY_MAX_TARGET.
Memory Target for Oracle Database InstancesRunning Database Configuration Assistant (DBCA) defaults to this Automatic Memory Management option. In the case of upgrade or manual database creation,MEMORY_TARGET can be specified in the initialization parameter file.

大部分人理解为,要求/dev/shm至少必须不小于MEMORY_MAX_TARGET的大小。

但是根据测试的实际情况,必须是/dev/shm的可用空间不小于MEMORY_MAX_TARGET的大小。

例如

SQL> show parameter target

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
archive_lag_target                   integer     0
db_flashback_retention_target        integer     1440
fast_start_io_target                 integer     0
fast_start_mttr_target               integer     0
memory_max_target                    big integer 6336M
memory_target                        big integer 6336M
parallel_servers_target              integer     16
pga_aggregate_target                 big integer 0
sga_target                           big integer 0

根据参数,memory_max_target 参数为6.18G

[[email protected] ~]# mount -o remount,size=10G /dev/shm
[[email protected] ~]# df -h
Filesystem                        Size  Used Avail Use% Mounted on
/dev/mapper/vg_centosdbo-lv_root   50G   42G  5.3G  89% /
tmpfs                              10G  9.9G 144M  99% /dev/shm
/dev/sda2                         485M   39M  421M   9% /boot
/dev/sda1                         200M  260K  200M   1% /boot/efi
/dev/mapper/vg_centosdbo-lv_home  1.3T  504G  744G  41% /home
[[email protected] ~]# su – oracle

即便这里我设置size大小为10G。但是可用空间只有144M.

这时我启动数据库:

SQL*Plus: Release 11.2.0.1.0 Production on Wed Mar 30 14:29:21 2016

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

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

仍然会报错。

如下所示,如果保证可用空间大于memory_max_target,则数据库正常启动。

[[email protected] ~]# mount -o remount,size=16G /dev/shm
[[email protected] ~]# df -h
Filesystem                        Size  Used Avail Use% Mounted on
/dev/mapper/vg_centosdbo-lv_root   50G   42G  5.3G  89% /
tmpfs                              16G  6.2G  9.9G  39% /dev/shm
/dev/sda2                         485M   39M  421M   9% /boot
/dev/sda1                         200M  260K  200M   1% /boot/efi
/dev/mapper/vg_centosdbo-lv_home  1.3T  504G  744G  41% /home
[[email protected] ~]# sqlplus /nolog
-bash: sqlplus: command not found
[[email protected] ~]# su - oracle
[[email protected] ~]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.1.0 Production on Wed Mar 30 14:30:41 2016

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

SQL> conn /as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.

Total System Global Area 6614106112 bytes
Fixed Size                  2213896 bytes
Variable Size            3556771832 bytes
Database Buffers         3019898880 bytes
Redo Buffers               35221504 bytes
Database mounted.
Database opened.
SQL>

由此可能的情况是,/dev/shm默认为系统内存的一半,虽然理论上可能已经大于MEMORY_TARGET,但数据库启动是可能仍然会报错。

比如我所用的测试库,MEMORY_TARGET是6.18G

而默认/dev/shm为内存的一半,即7.7G左右。但数据库启动时仍然报错。

[[email protected] ~]# free -g
             total       used       free     shared    buffers     cached
Mem:            15         11          4          0          0         10
-/+ buffers/cache:          0         14
Swap:            7          0          7
[[email protected] ~]#

时间: 2024-10-05 17:05:57

再说ORA-00845: MEMORY_TARGET not supported on this system的相关文章

ORA-00845 : MEMORY_TARGET not supported on this system(调大数据库内存无法启动)

问题描述:调大数据库内存后,启动数据库报 ORA-00845 : MEMORY_TARGET not supported on this system . -- 调大数据库内存后,数据库启动报错[[email protected] bin]# ./srvctl start database -d jcdydbPRCR-1079 : Failed to start resource ora.jcdydb.dbCRS-5017: The resource action "ora.jcdydb.db

oracle启动报错ORA-00845: MEMORY_TARGET not supported on this system解决办法

oracle启动报错ORA-00845: MEMORY_TARGET not supported on this system 原因可能:ORACLE MEMORY_TARGET参数设置超过了oracle服务器本身内存.或超过了现在服务器空闲内存(就是oracle启动时无法获取设置的内存) eg: oracle version:11gR2 OS version:RedHat 6.4企业版 服务器:虚拟机 分析步骤: 1.查看当前 MEMORY_TARGET参数的值为*.memory_target

Oracle11g 启动报错ORA-00845: MEMORY_TARGET not supported on this system报错解决

ORA-00845: MEMORY_TARGET not supported on this system报错解决 Oracle启动报错 ORA-00845: MEMORY_TARGET not supported on this system报错解决 SQL> startup ORA-00845: MEMORY_TARGET not supported on this system 查看原本大小 [[email protected] oracle]# df -h|grep shm tmpfs

ORA-00845: MEMORY_TARGET not supported on this system??????

OS version : Red Hat Enterprise Linux Server release 5.5 (Tikanga) database version : Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production PL/SQL Release 11.2.0.1.0 - Production CORE    11.2.0.1.0      Production TNS for Linux: Vers

ORA-00845: MEMORY_TARGET not supported on this system报错解决

数据库版本:11.2.0.2 现象 Oracle 11g数据库修改pfile参数后启动数据库报错ora-00845 SQL> startup ORA-00845: MEMORY_TARGET not supported on this system 查找资料后发现问题如下,见metalinikID 460506.1 在oracle 11g中新增的内存自动管理的参数MEMORY_TARGET,它能自动调整SGA和PGA,这个特性需要用到/dev/shm共享文件系统,而且要求/dev/shm必须大于

Oracle study之--“ORA-00845: MEMORY_TARGET not supported on this system"错误

Oracle study之--"ORA-00845: MEMORY_TARGET not supported on this system"错误 系统环境:    操作系统:RedHat EL6(64)    Oracle:    Oracle 11g R2 故障案例: 在Oracle 11gR2下调整内存参数:memory_target SQL> show parameter mem NAME TYPE VALUE -------------------------------

startup ORA-00845: MEMORY_TARGET not supported on this system

一台虚拟机跑多个实例时,由于/dev/shm空间不够导致如下报错> startupORA-00845: MEMORY_TARGET not supported on this system解决方法:修改/etc/fstab中为tmpfs                   /dev/shm                tmpfs   defaults,size=2048m        0 0 重新mount mount -o remount /dev/shm

Oracle 11g ORA-00845: MEMORY_TARGET not supported on this system

启动Oracle 11gR2后报错:ORA-00845 rac1:/home/oracle> sqlplus / as sysdba; SQL*Plus: Release 11.2.0.3.0 Production onTue Feb 14 09:11:41 2012 Copyright (c) 1982, 2011, Oracle.  All rights reserved. Connected to an idle instance. SQL> startup ORA-00845: MEM

ORA-00845: MEMORY_TARGET not supported

Enabling Automatic Memory Management alter system set memory_max_target=50G scope=spfile; alter system set memory_target=50G scope=spfile; alter system set sga_max_size=50G  scope=spfile; alter system set pga_aggregate_target=0 scope=spfile; alter sy