On 11gR2:
SQL> show parameter lock_sga
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
lock_sga boolean FALSE
SQL> show parameter memory_target
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
memory_target big integer 776M
SQL> ALTER SYSTEM SET LOCK_SGA=TRUE SCOPE=SPFILE;
System altered.
SQL> shutdown
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startupOn 10gR2:
ORA-00847: MEMORY_TARGET/MEMORY_MAX_TARGET and LOCK_SGA cannot be set together
SQL> show parameter lock_sga
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
lock_sga boolean FALSE
SQL> show parameter sga_target
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
sga_target big integer 168M
SQL> ALTER SYSTEM SET LOCK_SGA=TRUE SCOPE=SPFILE;
System altered.
SQL> shutdown
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startupIf need to use LOCK_SGA -)
ORA-27102: out of memory
Linux-x86_64 Error: 12: Cannot allocate memory
- To Disable the Use of Automatic Memory Management or Automatic Shared Memory Management and enable manual shared memory management
Or...
- Don't lock the SGA.
2 comments:
Hey Surachart,
Have a look at my site http://www.petefinnigan.com/ramblings/lock_sga.htm from a few years ago where I came up with a different solution to locking the SGA in core.
cheers
Pete
Thank You..
Nice idea to use C code with shmctl() - SHM_LOCK, SHM_UNLOCK
$ ipcs -m | grep oracle
0x8895c820 393227 oracle 660 4096 0
0x94106560 458764 oracle 660 4096 0
$ ipcs -m | grep oracle | awk '{print $2'} | while read segment ; do ./fix_in_core $segment ; done
locked Segment 393227
locked Segment 458764
$ ipcs -m | grep oracle
0x8895c820 393227 oracle 660 4096 0 locked
0x94106560 458764 oracle 660 4096 0 locked
$ ipcs -m | grep oracle | awk '{print $2'} | while read segment ; do ./unfix_in_core $segment ; done
unlocked Segment 393227
unlocked Segment 458764
$ ipcs -m | grep oracle
0x8895c820 393227 oracle 660 4096 0
0x94106560 458764 oracle 660 4096 0
Post a Comment