在Oracle 11gR2环境下,通过ipcs命令查看共享内存,竟然发现分配给Oracle的内存只有4096Bytes,而在Oracle 10g环境下从未发现这种问题!
[root@rh6 ~]# ipcs -a
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x00000000 0 root 644 52 2
0x00000000 32769 root 644 16384 2
0x00000000 65538 root 644 268 2
0x00000000 98307 gdm 600 393216 2 dest
0x00000000 131076 gdm 600 393216 2 dest
0x00000000 163845 gdm 600 393216 2 dest
0x00000000 196614 gdm 600 393216 2 dest
0x00000000 229383 gdm 600 393216 2 dest
0x4b4218ec 557064 oracle 660 4096 0
------ Semaphore Arrays --------
key semid owner perms nsems
0x00000000 0 root 600 1
0x00000000 98305 root 600 1
0x000000a7 327682 root 600 1
0xbe61d9cc 983043 oracle 660 154
------ Message Queues --------
key msqid owner perms used-bytes messages
数据库版本:
16:27:09 SYS@ test3 >select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
Oraccle 11g的通过以下两个参数实现内存的自动个管理:
16:27:19 SYS@ test3 >show parameter mem
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
hi_shared_memory_address integer 0
memory_max_target big integer 300M
memory_target big integer 300M
shared_memory_address integer 0
在Oracle 11g中用看Oracle的共享内存段---------IPCS
1、会不会是参数memory_max_target有关系呢?把它设为0,然后重启数据库。
16:28:11 SYS@ test3 >alter system set memory_target=0 ;
System altered.
16:36:44 SYS@ test3 >show parameter mem
NAME TYPE VALUE
------------------------------------ ---------------------- ------------------------------
hi_shared_memory_address integer 0
memory_max_target big integer 300M
memory_target big integer 0
shared_memory_address integer 0
16:30:51 SYS@ test3 >startup force ;
ORACLE instance started.
Total System Global Area 313860096 bytes
Fixed Size 1336232 bytes
Variable Size 205524056 bytes
Database Buffers 100663296 bytes
Redo Buffers 6336512 bytes
Database mounted.
Database opened.
再看共享内存: