프린트 하기

내맘대로긍정이 알려주는

Oracle 23ai 신기능
무료 세미나 발표자료

다운로드 trending_flat
2024
10.12
14:00

OS환경 : Oracle Linux 7.6 (64bit)

 

DB 환경 : Oracle Database 19.10.0.0

 

방법 : 오라클 19c ORA-04036 에러를 발생시키는 방법

pga_aggregate_limit 파라미터가 설정되어 있지 않다면 설정

1
2
3
SQL> alter system set pga_aggregate_limit = 3g;
 
System altered.

 

 

무한루프를 일으키는 sql 파일 생성

1
2
3
4
5
6
7
8
9
10
11
12
13
14
$ vi test4036.sql
DECLARE
 
TYPE num_array IS TABLE OF NUMBER INDEX BY PLS_INTEGER;
my_array num_array;
i PLS_INTEGER := 1;
BEGIN
LOOP
my_array(i) := i;
i := i + 1;
END LOOP;
 
END;
/

 

 

100개(n개) 세션을 동시에 실행하는 sh 쉘 스크립트 생성

1
2
3
4
5
6
7
8
$ vi test4036.sh
#!/bin/bash
 
for ((i=1; i<=200; i++))
do
nohup sqlplus imsi/imsi @test4030.sql &
done
wait

 

 

쉘 스크립트 실행

1
$ sh test4030.sh 

 

 

alert log 확인

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$ vi alert.log
2023-05-01T03:19:53.356470+09:00
Errors in file /ORA19/app/oracle/diag/rdbms/oracle19/oracle19/trace/oracle19_ora_2962.trc  (incident=27692):
ORA-04036: PGA memory used by the instance exceeds PGA_AGGREGATE_LIMIT
2023-05-01T03:19:53.375516+09:00
Errors in file /ORA19/app/oracle/diag/rdbms/oracle19/oracle19/trace/oracle19_ora_2924.trc  (incident=27452):
ORA-04036: PGA memory used by the instance exceeds PGA_AGGREGATE_LIMIT
2023-05-01T03:19:53.387746+09:00
DDE: Problem Key 'ORA 4036' was completely flood controlled (0x6)
Further messages for this problem key will be suppressed for up to 10 minutes
.
.
2023-05-01T03:30:30.879358+09:00
PGA_AGGREGATE_LIMIT has been exceeded but some processes using the most PGA
memory are not eligible to receive ORA-4036 interrupts.  Further occurrences
of this condition will be written to the trace file of the DBRM process.

ora-04036이 발생함

발생하는 상태로 계속 놔두면 DDE 메세지와 또 다른 메세지가 발생함

 

 

테스트 초기 목적은 ora-04030을 발생시키기 위해 테스트하였으나 ora-04036만 발생하는것을 확인함

pga_aggregate_limit 을 0(무제한)으로 변경 하고 테스트 할 시 ora-04036 조차 발생하지 않음

 

 

참조 : https://positivemh.tistory.com/193

 

ORA-04036: PGA memory used by the instance exceeds PGA_AGGREGATE_LIMIT 해결

OS환경 : Oracle Linux 6.8 (64bit) DB 환경 : Oracle Database 12.2.0.1 에러 : ORA-04036: PGA memory used by the instance exceeds PGA_AGGREGATE_LIMIT 해결 방법 : pga_aggregate_limit을 알맞게 설정한다.PGA 자동 관리(pga_aggregate_target)

positivemh.tistory.com