2012.10.15

ORA-00845: MEMORY_TARGET not supported on this system

###11g에서 ###
sys@ORCL> alter system set memory_target=1013m;
alter system set memory_target=1013m
*
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_max_target과 memory_target은 현재 0 임

###변경(재시작 필요)###
sys@ORCL> alter system set memory_max_target=1013m scope=spfile;
System altered.

###재시작###
sys@ORCL> startup force;
ORA-00845: MEMORY_TARGET not supported on this system

###해결###
Cause of the Problem
10g에서는 ASMM과 PGA자동이 나뉘어 있었지만
11g부터는 AMM이 가능하다. 이 값은 SGA_target + PGA_aggregate_target 값이다.
memory_max_target 로 설정한다.
리눅스 파일 시스템에서는 공유메모리가 /dev/shm 디렉토리에 마운트되어있어야한다. 크기는 memory_target이나 memory_max_target보다 커야 한다.
ORA-00845는 리눅스시스템에서 두가지 이유로 발생할수 있다.

1)If the shared memory which is mapped to /dev/shm directory is less than the size of MEMORY_TARGET or MEMORY_MAX_TARGET.
or,
2)If the shared memory is not mapped to /dev/shm directory.

###/dev/shm 조회###
[oracle@centos5 ~]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
tmpfs                 753M     0  753M   0% /dev/shm

###/dev/shm 설정###
1G로 잡을 것이다.

As a root user,
[root@centos5 ~]# mount -t tmpfs shmfs -o size=1g /dev/shm

###/etc/fstab 수정###
vi /etc/fstab
shmfs /dev/shm tmpfs size=1g 0 추가

###확인###
sys@ORCL> startup;
ORACLE instance started.

Total System Global Area 1068937216 bytes
Fixed Size                  2220200 bytes
Variable Size             599789400 bytes
Database Buffers          461373440 bytes
Redo Buffers                5554176 bytes
Database mounted.
Database opened.

sys@ORCL> show parameter memory

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
hi_shared_memory_address             integer     0
memory_max_target                    big integer 1G
memory_target                        big integer 0
shared_memory_address                integer     0
sys@ORCL>
 
###memory_target 설정###
sys@ORCL> alter system set memory_target=1G;

System altered.

Posted by neo-orcl
,