热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

ORACLE常见报错之:ORA-00845:MEMORY_TARGETnotsupportedonthis

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

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 /nolog SQL*Plus: Release 11.2.0.1.0 Production on Thu Jul 25 15:39:40 2013 Copyright (c) 1982, 2009, Oracle. All rights reserved. SQL> conn sys/ as sysdba Enter password: Connected to an idle instance. SQL> startup ORA-00845: MEMORY_TARGET not supported on this system SQL>


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 -k Filesystem 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/sda2 ext3 16G 11G 3.9G 74% / /dev/sda3 ext3 1.6G 37M 1.4G 3% /tmp /dev/sda1 ext3 99M 12M 83M 13% /boot tmpfs tmpfs 252M 0 252M 0% /dev/shm


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

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

[root@night ~]# free -m total used free shared buffers cached Mem: 503 368 134 0 26 283 -/+ buffers/cache: 58 444 Swap: 2525 0 2525 [root@night ~]# df -Th /dev/shm/ 文件系统 类型 容量 已用 可用 已用% 挂载点 tmpfs tmpfs 252M 0 252M 0% /dev/shm [root@night ~]#
推荐阅读
  • Nginx使用AWStats日志分析的步骤及注意事项
    本文介绍了在Centos7操作系统上使用Nginx和AWStats进行日志分析的步骤和注意事项。通过AWStats可以统计网站的访问量、IP地址、操作系统、浏览器等信息,并提供精确到每月、每日、每小时的数据。在部署AWStats之前需要确认服务器上已经安装了Perl环境,并进行DNS解析。 ... [详细]
  • 本文介绍了在开发Android新闻App时,搭建本地服务器的步骤。通过使用XAMPP软件,可以一键式搭建起开发环境,包括Apache、MySQL、PHP、PERL。在本地服务器上新建数据库和表,并设置相应的属性。最后,给出了创建new表的SQL语句。这个教程适合初学者参考。 ... [详细]
  • 本文介绍了在Hibernate配置lazy=false时无法加载数据的问题,通过采用OpenSessionInView模式和修改数据库服务器版本解决了该问题。详细描述了问题的出现和解决过程,包括运行环境和数据库的配置信息。 ... [详细]
  • 如何在服务器主机上实现文件共享的方法和工具
    本文介绍了在服务器主机上实现文件共享的方法和工具,包括Linux主机和Windows主机的文件传输方式,Web运维和FTP/SFTP客户端运维两种方式,以及使用WinSCP工具将文件上传至Linux云服务器的操作方法。此外,还介绍了在迁移过程中需要安装迁移Agent并输入目的端服务器所在华为云的AK/SK,以及主机迁移服务会收集的源端服务器信息。 ... [详细]
  • 本文讨论了在数据库打开和关闭状态下,重新命名或移动数据文件和日志文件的情况。针对性能和维护原因,需要将数据库文件移动到不同的磁盘上或重新分配到新的磁盘上的情况,以及在操作系统级别移动或重命名数据文件但未在数据库层进行重命名导致报错的情况。通过三个方面进行讨论。 ... [详细]
  • 本文介绍了在CentOS上安装Python2.7.2的详细步骤,包括下载、解压、编译和安装等操作。同时提供了一些注意事项,以及测试安装是否成功的方法。 ... [详细]
  • Centos7.6安装Gitlab教程及注意事项
    本文介绍了在Centos7.6系统下安装Gitlab的详细教程,并提供了一些注意事项。教程包括查看系统版本、安装必要的软件包、配置防火墙等步骤。同时,还强调了使用阿里云服务器时的特殊配置需求,以及建议至少4GB的可用RAM来运行GitLab。 ... [详细]
  • Metasploit攻击渗透实践
    本文介绍了Metasploit攻击渗透实践的内容和要求,包括主动攻击、针对浏览器和客户端的攻击,以及成功应用辅助模块的实践过程。其中涉及使用Hydra在不知道密码的情况下攻击metsploit2靶机获取密码,以及攻击浏览器中的tomcat服务的具体步骤。同时还讲解了爆破密码的方法和设置攻击目标主机的相关参数。 ... [详细]
  • 本文介绍了Hyperledger Fabric外部链码构建与运行的相关知识,包括在Hyperledger Fabric 2.0版本之前链码构建和运行的困难性,外部构建模式的实现原理以及外部构建和运行API的使用方法。通过本文的介绍,读者可以了解到如何利用外部构建和运行的方式来实现链码的构建和运行,并且不再受限于特定的语言和部署环境。 ... [详细]
  • 本文详细介绍了Linux中进程控制块PCBtask_struct结构体的结构和作用,包括进程状态、进程号、待处理信号、进程地址空间、调度标志、锁深度、基本时间片、调度策略以及内存管理信息等方面的内容。阅读本文可以更加深入地了解Linux进程管理的原理和机制。 ... [详细]
  • 图解redis的持久化存储机制RDB和AOF的原理和优缺点
    本文通过图解的方式介绍了redis的持久化存储机制RDB和AOF的原理和优缺点。RDB是将redis内存中的数据保存为快照文件,恢复速度较快但不支持拉链式快照。AOF是将操作日志保存到磁盘,实时存储数据但恢复速度较慢。文章详细分析了两种机制的优缺点,帮助读者更好地理解redis的持久化存储策略。 ... [详细]
  • http:my.oschina.netleejun2005blog136820刚看到群里又有同学在说HTTP协议下的Get请求参数长度是有大小限制的,最大不能超过XX ... [详细]
  • 本文介绍了在Linux下安装Perl的步骤,并提供了一个简单的Perl程序示例。同时,还展示了运行该程序的结果。 ... [详细]
  • 本文介绍了RPC框架Thrift的安装环境变量配置与第一个实例,讲解了RPC的概念以及如何解决跨语言、c++客户端、web服务端、远程调用等需求。Thrift开发方便上手快,性能和稳定性也不错,适合初学者学习和使用。 ... [详细]
  • 腾讯安全平台部招聘安全工程师和数据分析工程师
    腾讯安全平台部正在招聘安全工程师和数据分析工程师。安全工程师负责安全问题和安全事件的跟踪和分析,提供安全测试技术支持;数据分析工程师负责安全产品相关系统数据统计和分析挖掘,通过用户行为数据建模为业务决策提供参考。招聘要求包括熟悉渗透测试和常见安全工具原理,精通Web漏洞,熟练使用多门编程语言等。有相关工作经验和在安全站点发表作品的候选人优先考虑。 ... [详细]
author-avatar
蟹子萝卜控
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有