Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

ORA-00845: MEMORY_TARGET not supported on this system

2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

ORA-00845: MEMORY_TARGET not supported on this system

Using oracle user, start as usual

[oracle@localhost ~]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.1.0 Production on Sun Oct 12 07:07:15 2014

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

SQL> conn /as sysdba

Connected to an idle instance.

SQL>

SQL> startup

ORA-00845: MEMORY_TARGET not supported on this system

Well, what to do when something goes wrong. The setting of MEMORY_MAX_TARGET cannot exceed the size of/dev/shm. Let's check it out.

[oracle@localhost ~]$ df -h

Filesystem Size Used Avail Use% Mounted on

/dev/sdb1 9.5G 2.5G 6.6G 28% /

/dev/sda3 17G 4.6G 12G 29% /home

/dev/sdb2 20G 7.5G 12G 40% /usr/local

/dev/sdc1 30G 174M 28G 1% /opt

/dev/sda1 9.5G 151M 8.9G 2% /tmp

tmpfs 395M 0 395M 0% /dev/shm

This is 395M. As mentioned above, MEMORY_MAX_TARGET will not exceed 395M.

We know that oracle can specify parameters at startup. For example, you can specify whether to use pfile or spfile files. The two can be interchanged. Also, the relationship between the two is that the former is an ordinary text file (can be manually modified), followed by binary format. OK, let's create a pfile.

SQL> create pfile from spfile;

File created.

The resulting file will be placed in the ORACLE_HOME/dbs directory and named initorcl.ora

[oracle@localhost dbs]$ env | grep ORACLE

ORACLE_SID=orcl

ORACLE_BASE=/usr/local/oracle

ORACLE_HOME=/usr/local/oracle/11.2.0

[oracle@localhost oracle]$ pwd

/usr/local/oracle

[oracle@localhost oracle]$ cd 11.2.0/dbs/

Enter it into the dbs directory and check the contents of the file.

*.memory_target=620756992

Obviously, it's bigger than 350M.

Modify the file initorcl.ora to look like this

[oracle@localhost dbs]$ more initorcl.ora

orcl.__ db_cache_size=239075328

orcl.__ java_pool_size=4194304

orcl.__ large_pool_size=4194304

orcl.__ oracle_base='/usr/local/oracle'#ORACLE_BASE set from environment

orcl.__ pga_aggregate_target=251658240

orcl.__ sga_target=369098752

orcl.__ shared_io_pool_size=0

orcl.__ shared_pool_size=113246208

orcl.__ streams_pool_size=0

*.audit_file_dest='/usr/local/oracle/admin/orcl/adump'

*.audit_trail='db'

*.compatible='11.2.0.0.0'

*.control_files='/usr/local/oracle/oradata/orcl/control01.ctl','/usr/local/oracle/oradata/orcl/control02.ctl'

*.db_block_size=8192

*.db_domain='tianjin'

*.db_name='orcl'

*.diagnostic_dest='/usr/local/oracle'

*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'

*.memory_target=390M

*.open_cursors=300

*.processes=150

*.remote_login_passwordfile='EXCLUSIVE'

*.undo_tablespace='UNDOTBS1'

[oracle@localhost dbs]$

This is changed to 392M, which is less than 395M. Okay, let's see if oracle can start.

SQL> startup pfile=$ORACLE_HOME/dbs/initorcl.ora;

ORACLE instance started.

Total System Global Area 410112000 bytes

Fixed Size 1336876 bytes

Variable Size 251660756 bytes

Database Buffers 150994944 bytes

Redo Buffers 6119424 bytes

Database mounted.

Database opened.

Hehe, the activation was successful. Parameters after startup

SQL> show parameter mem;

NAME TYPE VALUE

------------------------------------ ----------- ------------------------------

hi_shared_memory_address integer 0

memory_max_target big integer 392M

memory_target big integer 392M

shared_memory_address integer 0

Well, so far, the problem has been solved. Let's move on.

For example, if MEMORY_TARGET is forcibly set to greater than 350M,

SQL> alter system set MEMORY_TARGET=1G;

alter system set MEMORY_TARGET=1G

*

ERROR at line 1:

ORA-02097: parameter cannot be modified because specified value is invalid

ORA-00837: Specified value of MEMORY_TARGET greater than MEMORY_MAX_TARGET

MEMORY_TARGET cannot be greater than MEMORY_MAX_TARGET. MEMORY_MAX_TARGET is 392M.

OK, when forcibly changing MEMORY_MAX_TARGET to 1G

SQL> alter system set MEMORY_MAX_TARGET=1G scope=spfile;

alter system set MEMORY_MAX_TARGET=1G scope=spfile

*

ERROR at line 1:

ORA-32001: write to SPFILE requested but no SPFILE is in use

Uh, it's started in pfile mode now.

Summary: In pfile mode, parameter files cannot be modified through alter system.

OK, then convert to spfile

SQL> create spfile from pfile;

File created.

After starting with spfile file, i.e. startup

Summary: Try again, let the problem reappear

SQL> alter system set memory_max_target =1G scope=spfile;

System altered.

SQL> shutdown abort;

ORACLE instance shut down.

SQL>

SQL>

started again

SQL> startup

ORA-00845: MEMORY_TARGET not supported on this system

SQL>

The problem recurs, and there is a place to begin this article.

Finally, do the test again, MEMORY_TARGET and MEMORY_MAX_TARGET two parameters, any one greater than 395, what happens

When MEMORY_TARGET is set to 1G

SQL> alter system set memory_target=1G scope=spfile;

System altered.

View changes to spfile files

[oracle@localhost dbs]$ strings spfileorcl.ora

*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'

*.memory_target=1073741824

*.open_cursors=300

Error at startup

SQL> startup

ORA-00845: MEMORY_TARGET not supported on this system

When MEMORY_MAX_TARGET is set to 1G

SQL> alter system set memory_max_target =1G scope=spfile;

View file changes

*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'

*.memory_max_target=1073741824

*.memory_target=390M

*.open_cursors=300

The memory_target = 390M here is specified when using pfile, and then converted to spfile, which is not modified and can be understood as the default value.

Error at startup.

SQL> startup

ORA-00845: MEMORY_TARGET not supported on this system

Although memory_max_target is greater than 395M, not memory_target error, it still prompts MEMORY_TARGET problem. So it can be summarized as, memory_max_target and memory_target any problem, will receive MEMORY_TARGET not supported on this system prompt.

Finally, summarize the process of problem solving

Create a pfile from the spfile file file

Modify memory_max_target, memory_target values

startup pfile=$ORACLE_HOME/dbs/initorcl.ora;

Create a spfile from a pfile file file

Close, restart again

Finally, attached references

ORACLE's interpretation

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report