ora10g_locksga_linux

来源:互联网 发布:电子闹钟品牌 知乎 编辑:程序博客网 时间:2024/05/18 00:29

[root@server ~]#ipcs -m

 

------ SharedMemory Segments --------

key       shmid      owner     perms     bytes      nattch    status     

0x0000000065536     root      600       393216    2          dest        

0x0000000098305     root      600       393216    2          dest        

0x00000000131074    root      600       393216    2          dest        

0x00000000163843    root      600       393216    2          dest        

0x00000000196612    root      600       393216    2         dest        

0x00000000229381    root      600       393216    2          dest        

0x00000000262150    root      600       393216    2          dest        

0x00000000294919    root      600       393216    2          dest        

0x00000000327688    root      600       393216    2          dest        

0x1aface94360457    oracle    640       289406976 25                     

 

SQL> showparameter sga

 

NAME                                TYPE        VALUE

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

lock_sga                            boolean     FALSE

pre_page_sga                        boolean     FALSE

sga_max_size                        big integer 272M

sga_target                          big integer 272M

 

SQL> altersystem set lock_sga=true;

alter system setlock_sga=true

                *

ERROR at line 1:

ORA-02095:specified initialization parameter cannot be modified

 

 

SQL>alter system set lock_sga=true scope=spfile;

 

System altered.

 

SQL> shutdownimmediate

Database closed.

Databasedismounted.

ORACLE instanceshut down.

SQL> startup

ORA-27102: out ofmemory

Linux Error: 12:Cannot allocate memory

 

 

[root@server ~]#ulimit -a

core filesize         (blocks, -c) 0

data seg size          (kbytes, -d) unlimited

schedulingpriority            (-e) 0

file size              (blocks, -f) unlimited

pendingsignals                (-i) 16384

maxlocked memory      (kbytes, -l) 32

max memorysize        (kbytes, -m) unlimited

open files                     (-n) 1024

pipe size           (512 bytes, -p) 8

POSIX message queues    (bytes, -q)819200

real-timepriority             (-r) 0

stack size             (kbytes, -s) 10240

cpu time              (seconds, -t) unlimited

max userprocesses             (-u) 16384

virtualmemory         (kbytes, -v) unlimited

file locks                     (-x) unlimited

 

[root@server ~]#ulimit -l unlimited

[root@server ~]#ulimit -a

core filesize         (blocks, -c) 0

data seg size          (kbytes, -d) unlimited

schedulingpriority            (-e) 0

file size              (blocks, -f) unlimited

pendingsignals                (-i) 16384

maxlocked memory      (kbytes, -l)unlimited

max memorysize        (kbytes, -m) unlimited

open files                     (-n) 1024

pipe size           (512 bytes, -p) 8

POSIX message queues    (bytes, -q)819200

real-timepriority             (-r) 0

stack size             (kbytes, -s) 10240

cpu time              (seconds, -t) unlimited

max userprocesses             (-u) 16384

virtualmemory         (kbytes, -v) unlimited

file locks                     (-x) unlimited

 

SQL> startup

ORA-27102: out ofmemory

Linux Error: 12:Cannot allocate memory

SQL> quit

Disconnected fromOracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With thePartitioning, OLAP and Data Mining options

[root@server~]# echo 'oracle soft memlock -1' >> /etc/security/limits.conf

[root@server~]# echo 'oracle hard memlock -1' >> /etc/security/limits.conf

 

SQL> startup

ORA-27102: out ofmemory

Linux Error: 12:Cannot allocate memory

 

Reboot

 

SQL> conn /assysdba

Connected to anidle instance.

SQL>

SQL>

SQL> startup

ORACLE instancestarted.

Total SystemGlobal Area 188743680 bytes

Fixed Size                 1218436 bytes

Variable Size             62916732 bytes

DatabaseBuffers         121634816 bytes

Redo Buffers               2973696 bytes

Database mounted.

Database opened.

SQL> showparameter lock_sga

 

NAME                                TYPE        VALUE

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

lock_sga                            boolean     TRUE

 

[root@server ~]#ipcs -m

 

------ SharedMemory Segments --------

key       shmid      owner     perms     bytes     nattch    status     

0x0000000065536     root      600       393216    2          dest        

0x0000000098305     root      600       393216    2          dest        

0x00000000131074    root      600       393216    2          dest        

0x00000000163843    root      600       393216    2          dest        

0x00000000196612    root      600       393216    2          dest        

0x00000000229381    root      600       393216    2          dest        

0x00000000262150    root      600       393216    2          dest        

0x00000000294919    root      600       393216    2          dest        

0x00000000327688    root      600       393216    2          dest        

0x1aface94393225    oracle   640       289406976  22                locked

SQL> show sga

 

TotalSystem Global Area 285212672 bytes

Fixed Size                 1218992 bytes

Variable Size             96470608 bytes

DatabaseBuffers         184549376 bytes

Redo Buffers               2973696 bytes

原创粉丝点击