ORACLE common error: ORA-00845: MEMORY_TARGET not supported on this s

Source: Internet
Author: User

ORACLE common error: ORA-00845: MEMORY_TARGET not supported on this system


1. Question proposal


The following error is reported:

[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. Explanation of the problem


This error has been mentioned in many official documents. You can use this document to learn more about the explanation of this error, so that you can solve the problem faster, more accurately, and more thoroughly.


Open the error messages tag in the official document and you can see the explanation of the error code.

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.


You can also use the search function of the official document to search for error codes and find corresponding explanations and solutions.



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 combinedMEMORY_TARGETParameter without having to setSGA_TARGETAndPGA_AGGREGATE_TARGETExplicitly. This is supported on Linux, Windows, Solaris, HPUX, and AIX (reference Bug 7258378 ).

If you seeORA-00845Error reported on Linux machines at Oracle instance startup when usingMEMORY_TARGETParameter, then check the size/dev/shm. If/dev/shmIs not configured, then mount it sized to be at least the valueMEMORY_TARGET. If/dev/shmIs configured but the amount of available space reported (throughdf -k /dev/shm) Is lessMEMORY_TARGET, Then free the space or mount a larger/dev/shmTo satisfyMEMORY_TARGETSize. Note that if you setMEMORY_MAX_TARGETParameter greaterMEMORY_TARGET, Then ensure that/dev/shmIs sized to be at least the valueMEMORY_MAX_TARGET.

Memory Target for Oracle Database Instances

Running Database Configuration Assistant (DBCA) ults to this Automatic Memory Management option. In the case of upgrade or manual database creation,MEMORY_TARGETCan be specified in the initialization parameter file.


The error is explained in detail in the above content because/dev/shm is smaller than the MEMORY_TARGET size, or/dev/shm is not mounted at all. If both MEMORY_TARGET and MENORY_MAX_TARGET are set, then/dev/shm must be at least the same size as MEMORY_MAX_TARGET.



Insufficient Memory Target Errors

On Linux systems, if the operating system/dev/shmMount 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/shmAllocation. The total memory size of the SGA and PGA, which sets the initialization parameterMEMORY_TARGETOrMEMORY_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:

  • It usesMEMORY_TARGETInsteadSGA_TARGET

  • It usesMEMORY_MAX_TARGETInsteadSGA_MAX_SIZE(DefaultsMEMORY_TARGET)

  • It uses memory allocated/dev/shm

If the valuemax_targetIs set to a value greater than the allocation for/dev/shmSize, 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/shmIs not properly mounted. To rule out this possibility, run the command df -kTo ensure that /dev/shmIs mounted. For example:
$ df -k  Filesystem 1K-blocks Used Available Use% Mounted on shmfs 6291456 832356 5459100 14% /dev/shm

Solution

Increase/dev/shmMountpoint size.

For example:

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

To make this change persistent internal SS system restarts, add an entry in/etc/fstabSimilar to the following:

shmfs /dev/shm tmpfs size=7g 0


The above content not only tells the cause of the error, but also roughly describes the automatic memory management in oracle 11g, and provides the command to solve the error.



3. What is/dev/shm?

First, let's take a look at the mounted file system in linux.

[Oracle @ night ~] $ Df-Th file system type capacity in use % available mount point/dev/sda2 ext3 16G 11G 3.9G 74%/dev/sda3 ext3 1.6G 37 M 1.4G 3%/ tmp/dev/sda1 ext3 99 M 12 M 83 M 13%/boottmpfs tmpfs 252 M 0 252 M 0%/dev/shm


It can be seen that I have mounted/dev/shm, but the file system of this partition is not a common file system type, but a tmpfs file system type, so what is the file system type in tmpfs format?

Tmpfs is a temporary file system in linux. Its size is not fixed. The default size is half of the actual memory.

[Root @ night ~] # Free-m total used free shared buffers cachedMem: 503 368 134 0 26 283-/+ buffers/cache: 58 444 Swap: 2525 0 2525 [root @ night ~] # Df-Th/dev/shm/file system type capacity in use available % mount point tmpfs 252 M 0 252 M 0%/dev/shm [root @ night ~] #


The default mount point is/dev/shm, And/dev/shm is actually a directory, so tmpfs can also be mounted to a custom directory.

[root@night ~]# file /dev/shm//dev/shm/: sticky directory[root@night ~]# ll -d /dev/shm/drwxrwxrwt 2 root root 40 07-25 21:43 /dev/shm/[root@night ~]#


Tmpfs can use system memory or swap, so I can increase the size of tmpfs by a bit.

Because tmpfs exists in the memory, the content of tmpfs will be lost when tmpfs is uninstalled or the linux operating system is shut down and restarted.

Tmpfs is memory-based, while swap is disk-based, so the two are different, and tmpfs IO is very high.


4. Solve the Problem

As we already know, the error is due to the small/dev/shm size, And/dev/shm is a tmpfs file system, which is based on memory, the size changes dynamically with the size of the physical memory, which is generally half of the physical memory. The tmpfs file system can use physical content or swap.

Solve the problem based on the Content

First, let's take a look at the physical memory and swap size.

[root@night ~]# free -m                   total       used       free     shared    buffers     cachedMem:           503        369        134          0         26        283-/+ buffers/cache:         58        444Swap:         2525          0       2525[root@night ~]#

It can be seen that RAM is about m, and SWAP is 2G


Modify the tmpfs size with the root user

[root@night ~]# vim /etc/fstab

The content is as follows:

LABEL=/                 /                       ext3    defaults        1 1LABEL=/tmp              /tmp                    ext3    defaults        1 2LABEL=/boot             /boot                   ext3    defaults        1 2tmpfs                   /dev/shm                tmpfs   defaults,size=1G        0 0devpts                  /dev/pts                devpts  gid=5,mode=620  0 0sysfs                   /sys                    sysfs   defaults        0 0proc                    /proc                   proc    defaults        0 0LABEL=SWAP-sda5         swap                    swap    defaults        0 0~

Remount/dev/shm

[Root @ night ~] # Umount/dev/shm/[root @ night ~] # Mount/dev/shm/[root @ night ~] # Mount/dev/sda2 on/type ext3 (rw) proc on/proc type proc (rw) sysfs on/sys type sysfs (rw) devpts on/dev/pts type devpts (rw, gid = 5, mode = 620)/dev/sda3 on/tmp type ext3 (rw) /dev/sda1 on/boot type ext3 (rw) none on/proc/sys/fs/binfmt_misc type binfmt_misc (rw) none on/proc/fs/vmblock/mountPoint type vmblock (rw) sunrpc on/var/lib/nfs/rpc_pipefs type rpc_pipefs (rw) tmpfs on/dev/shm type tmpfs (rw , Size = 1G) [root @ night ~] # Df-Th/dev/shm/file system type capacity in use available % mount point tmpfs 1.0G 0 1.0G 0%/dev/shm [root @ night ~] #


Restart the oracle service to switch to an oracle user)

[Oracle @ night ~] $ Df-Th/dev/shm/file system type capacity in use available % mount point tmpfs 1.0G 0 1.0G 0%/dev/shm [oracle @ night ~] $ Sqlplus/nologSQL * Plus: Release 11.2.0.1.0 Production on Thu Jul 25 22:05:01 2013 Copyright (c) 1982,200 9, Oracle. all rights reserved. SQL> conn sys/as sysdbaEnter password: Connected to an idle instance. SQL> startupORACLE instance started. total System Global Area 418484224 bytesFixed Size 1336932 bytesVariable Size 281020828 bytesDatabase Buffers 130023424 bytesRedo Buffers 6103040 bytesDatabase Mounted. Database opened. SQL>! Lsnrctl startLSNRCTL for Linux: Version 11.2.0.1.0-Production on 25-JUL-2013 22: 07: 06 Copyright (c) 1991,200 9, Oracle. all rights reserved. starting/u01/app/oracle/product/bin/tnslsnr: please wait... TNSLSNR for Linux: Version 11.2.0.1.0-ProductionSystem parameter file is/u01/app/oracle/product/network/admin/listener. oraLog messages written to/u01/app/oracle/diag/tnslsnr/night/listener/alert/l Og. xmlListening on: (DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (KEY = EXTPROC1521) Listening on: (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = night) (PORT = 1521) Connecting to (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1521) STATUS of the LISTENER -------------------- Alias LISTENERVersion TNSLSNR for Linux: version 11.2.0.1.0-ProductionStart Date 25-JUL-2013 22: 07: 15 Uptime 0 days 0 hr. 0 min. 30 se CTrace Level offSecurity ON: Local OS AuthenticationSNMP OFFListener Parameter File/u01/app/oracle/product/network/admin/listener. oraListener Log File/u01/app/oracle/diag/tnslsnr/night/listener/alert/log. xmlListening Endpoints Summary... (DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (KEY = EXTPROC1521) (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = night) (PORT = 1521) The listener supports no servicesThe comman D completed successfullySQL>! Ps-ef | grep thinkdbaoracle 4117 1 0 22:06? 00:00:00 ora_pmon_thinkdbaoracle 4119 1 0? 00:00:00 ora_vktm_thinkdbaoracle 4123 1 0? 00:00:00 ora_gen0_thinkdbaoracle 4125 1 0? 00:00:00 ora_diag_thinkdbaoracle 4127 1 0? 00:00:00 ora_dbrm_thinkdbaoracle 4129 1 0? 00:00:00 ora_psp0_thinkdbaoracle 4131 1 0? 00:00:00 ora_dia0_thinkdbaoracle 4133 1? 00:00:01 ora_mman_thinkdbaoracle 4135 1 0? 00:00:00 ora_dbw0_thinkdbaoracle 4137 1 0? 00:00:00 ora_lgwr_thinkdbaoracle 4139 1 0? 00:00:00 ora_ckpt_thinkdbaoracle 4141 1 0? 00:00:00 ora_smon_thinkdbaoracle 4143 1 0? 00:00:00 ora_reco_thinkdbaoracle 4145 1? 00:00:01 ora_mmon_thinkdbaoracle 4147 1 0? 00:00:00 ora_mmnl_thinkdbaoracle 4149 1 0? 00:00:00 ora_d000_thinkdbaoracle 4151 1 0? 00:00:00 ora_s000_thinkdbaoracle 4186 4066 2? 00:00:02 oraclethinkdba (DESCRIPTION = (LOCAL = YES) (ADDRESS = (PROTOCOL = beq) oracle 4192 1 0? 00:00:00 ora_qmnc_thinkdbaoracle 4208 1? 00:00:00 ora_cjq0_thinkdbaoracle 4210 1 0? 00:00:00 ora_q000_thinkdbaoracle 4212 1 0? 00:00:00 ora_q00425thinkdbaoracle 4214 1 0? 00:00:00 ora_vkrm_thinkdbaoracle 4222 1 29? 00:00:17 ora_j002_thinkdbaoracle 4231 1 5? 00:00:03 ora_j006_thinkdbaoracle 4237 1 4? 00:00:02 ora_j007_thinkdbaoracle 4250 4066 0 00:00:00 pts/1 00:00:00/bin/bash-c ps-ef | grep thinkdbaoracle 4252 4250 0 pts/1 grep thinkdbaSQL>


Started successfully


View the memory_target size

SQL> show parameter memoryNAME                                 TYPE        VALUE------------------------------------ ----------- ------------------------------hi_shared_memory_address             integer     0memory_max_target                    big integer 400Mmemory_target                        big integer 400Mshared_memory_address                integer     0SQL>


The size of/dev/shm is greater than that of memory_max_target.




This article is from "night★Linux O & M | DBA blog, please be sure to keep this source http://thinkdba.blog.51cto.com/7492507/1257103

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.