[ Oracle 10g SGA 메모리 설정 ]
☞ Oracle 10g SGA 메모리 설정
|
|
; 오라클을 설치하고 메모리를 튜닝(최소화)하려고 보니 10g부터는 SGA_TARGET 파라메타를 이용해서 쉽게 설정할 수 있는 방법이 있다. Oracle 10g는 SGA_TARGET 파라메타를 설정하면 나머지 값들을 적절하게 자동으로 설정해준다. |
☞ Oracle 9i |
|
; Oracle 9i에서 SGA메모리를 설정하려면 shared_pool_size, log_buffer, java_pool_size, large_pool_size, buffer_cache_size등의 파라메타를 계산을 해서 설정해야한다. | |
☞ 10g SGA 메모리 설정 예제 |
|
문제) 총 메모리를 160M로 설정하는 방법이다
C:/> sqlplus sys as sysdba SQL> show parameter sga NAME TYPE VALUE ------------------------- ---------------------- ------------------------ lock_sga boolean FALSE pre_page_sga boolean FALSE sga_max_size big integer 160M sga_target big integer 160M
SQL> show sga Total System Global Area 167772160 bytes Fixed Size 1247876 bytes Variable Size 71304572 bytes Database Buffers 88080384 bytes Redo Buffers 7139328 bytes
SQL> alter system set sga_target=160M scope=both; 시스템이 변경되었습니다.
% -------------------------------------- SQL> alter system set sga_max_size=320M scope=both; alter system set sga_max_size=320M ORA-02095: 지정된 초기화 매개변수를 수정할 수 없습니다 ==> sga_max_size 는 static 파라미터이므로 변경이 불가능하다. 아래와 같이 spfile 에서 수정후 오라클을 재 시작함.
alter system set sga_max_size = 320M scope = spfile;
|
☞ Redhat AS3.0 에서 SGA설정예제
|
|
문제) [Redhat AS3.0] SGA를 1.7G 이상 설정하는 방법 Advanced Server 3.0 에서 SGA를 1.7G 이상 설정하는 방법
장비명: HP DL XXX
CPU: 4장
Memory: 8G
Disk: 73G * XX개
OS: Redhat Advanced Server 3.0
Oracle Version: 9.2.0.4.0
문제상황 :
init.ora 파라메터에서 SGA값을 증가시킨다 하더라도 원하는대로 DB가 startup 되지 않는다.
/etc/sysctl.conf 에서 shmmax 를 2G 이상으로 설정했는데...-_-;;
ORA-27123: unable to attach to shared memory segment.
해결방법:
오타는 곤란하니까 복사하기 붙여넣기 하세요~
오라클 유저에서 하시면 됩니다.
$ cd $ORACLE_HOME/rdbms/lib
$ cp ksms.s ksms.s_orig (만약 ksms.s 가 존재하면 먼저 백업한다. 실제로는 없었음.)
$ genksms -s 0x15000000 > ksms.s
$ make -f ins_rdbms.mk ksms.o
$ make -f ins_rdbms.mk ioracle
이렇게 하신 다음 DB를 startup 하시면 SGA 크기를 1.7G 이상으로 설정 하실 수 있습니다. |
|