ORACLE常见报错之:ORA-00845: MEMORY_TARGET not supported on this

ORACLE常见报错之:ORA-00845:MEMORY_TARGETnotsupportedonthissystem1、问题的提出报错如下:[oracle@night~]$sqlplus/nologSQL*Plus:Release11.2.0.1.0Product

oracle常见报错之:ora-00845: memory_target not supported on this system

1、 问题的提出

报错如下:

[oracle@night ~]$ sqlplus /nologSQL*Plus: Release 11.2.0.1.0 Production on Thu Jul 25 15:39:40 2013Copyright (c) 1982, 2009, Oracle. All rights reserved.SQL> conn sys/ as sysdbaEnter password:Connected to an idle instance.SQL> startupORA-00845: MEMORY_TARGET not supported on this systemSQL>

2、 问题的解释

在官方文档中,有好多地方提到这个错误,可以通过官方文档进一步的了解这个报错的解释,以便于更快更准确更透彻的解决问题

打开官方文档的error messages标签,可以看到有关错误代码的解释

ORA-00845: MEMORY_TARGET not supported on this system

Cause: The MEMORY_TARGET parameter was not supported on this operating system or /dev/shm was not sized correctly on Linux.

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.

或者利用官方文档的搜索功能,搜索错误代码,也可以找到相应的解释和解决办法

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 Instances

Running 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_TARGET的大小,或者是/dev/shm根本就没有挂载,如果同时设置了MEMORY_TARGET和MENORY_MAX_TARGET,那么/dev/shm至少必须和MEMORY_MAX_TARGET的大小一致

Insufficient Memory Target Errors

On Linux systems, if the operating system /dev/shm mount size is too small for the Oracle system global area (SGA) and program global area (PGA), then you encounter the following error:

ORA-00845: MEMORY_TARGET not supported on this system.

The cause of this error is an insufficient /dev/shm allocation. The total memory size of the SGA and PGA, which sets the initialization parameter MEMORY_TARGETor MEMORY_MAX_TARGET, cannot be greater than the shared memory file system (/dev/shm) on your operating system.

Background

Automatic Memory Management (AMM) has been updated in Oracle ASM 11g Release 2. It manages both the SGA and PGA together. It is managed by the Memory Manager Process (MMAN). In this release, note the following changes to AMM:

If the value of max_target is set to a value greater than the allocation for the /dev/shm size, then you may encounter the error ORA-00845: MEMORY_TARGET not supported on this system.

Note:

An ORA-00845 error can also occur if /dev/shm is not properly mounted. To rule out this possibility, run the command df -k to ensure that /dev/shm is mounted. For example:$ df -kFilesystem 1K-blocks Used Available Use% Mounted on shmfs 6291456 832356 5459100 14% /dev/shm

Solution

Increase the /dev/shm mountpoint size.

For example:

# mount -t tmpfs shmfs -o size=7g /dev/shm

To make this change persistent across system restarts, add an entry in /etc/fstab similar to the following:

shmfs /dev/shm tmpfs size=7g 0

如上的内容不仅讲出了错误的原因,而且还大概的说了一下在oracle 11g中的自动内存管理,并且给出了该错误的解决的命令

3、问题的深入探究,到底什么是 /dev/shm

首先来看一下linux系统中已经挂载的文件系统

[oracle@night ~]$ df -Th文件系统类型 容量 已用 可用 已用% 挂载点/dev/sda2ext316G 11G 3.9G 74% //dev/sda3ext3 1.6G 37M 1.4G 3% /tmp/dev/sda1ext399M 12M 83M 13% /boottmpfstmpfs 252M0 252M 0% /dev/shm

可以看出我已经挂载了/dev/shm,但是该分区的文件系统并不是普通的文件系统类型,而是tmpfs文件系统类型,那么什么是tmpfs格式的文件系统类型呢?

tmpfs是linux的一种临时文件系统,它的大小是不固定的,香港服务器,默认的大小是实际内存的一半。

[root@night ~]# free -mtotalusedfreeshared bufferscachedMem:503368134026283-/+ buffers/cache:58444Swap:252502525[root@night ~]# df -Th /dev/shm/文件系统类型 容量 已用 可用 已用% 挂载点tmpfstmpfs 252M0 252M 0% /dev/shm[root@night ~]#

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至253000106@qq.com举报,一经查实,本站将立刻删除。

发布者:PHP中文网,转转请注明出处:https://www.chuangxiangniao.com/p/1854163.html

(0)
上一篇 2025年2月22日 03:16:27
下一篇 2025年2月22日 03:16:44

AD推荐 黄金广告位招租... 更多推荐

相关推荐

  • navicat的连接名填什么

    navicat的连接名填写取决于数据库类型,常见类型连接名如下:MySQL:数据库名称MariaDB:数据库名称PostgreSQL:数据库名称Oracle:服务名称或实例名称Microsoft SQL Server:服务器名称实例名称SQ…

    2025年2月23日
    100
  • navicat链接名怎么看

    通过 Navicat 中左侧面板的“连接”标签或菜单栏中的“连接”,查看连接名称,该名称显示在每个连接下方的括号中,例如:数据库名称 (连接名称),其中连接名称在创建连接时指定。 如何查看 Navicat 中的连接名称 在 Navicat …

    2025年2月23日
    100
  • navicat怎么登陆

    如何使用 navicat 登录数据库 Navicat 是一个多功能数据库管理和开发工具,它可以连接到各种数据库系统,包括 MySQL、MariaDB、SQL Server、PostgreSQL 和 Oracle 等。要使用 Navicat …

    数据库 2025年2月23日
    100
  • navicat怎么配置oracle

    使用 Navicat 配置 Oracle 的步骤:创建连接:输入连接信息,包括主机、端口、用户名和密码。配置连接属性:设置服务名称、字符集和语言。创建数据库对象:选择名称、字符集和存储空间。配置数据库属性:设置数据库链接、自动提交和日志大小…

    2025年2月23日
    100
  • navicat能连接oracle吗

    是的,Navicat 可以连接 Oracle 数据库。具体步骤如下:打开 Navicat Premium,选择“连接”菜单中的“Oracle”类型。填写连接信息,包括主机名、端口、服务名、用户名和密码。测试连接后点击“确定”。在导航器中即可…

    2025年2月23日
    100
  • navicat能连接服务器的数据库吗

    是的,Navicat 可以连接到服务器数据库,具体步骤:启动 Navicat 应用程序。单击“文件”菜单,选择“新建连接”。选择数据库类型,如 MySQL。输入数据库服务器的 IP 地址或主机名、端口号。输入连接所需的用户名和密码。单击“连…

    2025年2月23日
    100
  • navicat怎么连oracle数据库

    要使用 Navicat 连接 Oracle 数据库,请依次执行以下步骤:打开 Navicat 并新建 Oracle 连接。输入数据库信息,包括主机名/IP 地址、端口、服务名称以及用户名和密码。根据需要选择认证方法。进行连接测试以验证信息是…

    2025年2月23日
    100
  • navicat怎么执行语句

    在 Navicat 中执行 SQL 语句的方法是:1. 打开 SQL 编辑器。2. 输入 SQL 语句。3. 设置连接。4. 点击“执行”按钮。 Navicat 中如何执行 SQL 语句 Navicat 是一款功能强大的数据库管理工具,允许…

    2025年2月23日
    100
  • navicat中文名叫什么

    运维大师是一款数据库管理工具,拥有易用的中文界面和强大的功能。它支持跨平台和多数据库,并提供丰富的操作、数据可视化和协同开发功能。运维大师以其易用性、效率、安全性、可扩展性而著称,适用于数据库管理、数据分析和软件开发等领域。 navicat…

    2025年2月23日
    100
  • navicat怎么运行命令

    通过 Navicat 运行命令的步骤包括:连接到数据库。打开 SQL 编辑器。输入 SQL 命令。执行命令。查看结果。 如何使用 Navicat 运行命令 Navicat 是一款流行的数据库管理工具,它允许用户运行 SQL 命令来操作数据库…

    2025年2月23日
    100

发表回复

登录后才能评论