행위

"오라클 덤프 oradebug"의 두 판 사이의 차이

DB CAFE

(덤프)
(덤프)
60번째 줄: 60번째 줄:
 
</source>
 
</source>
  
 +
{{틀:고지상자2
 +
|제목= oradebug 덤프명령어
 +
|내용=
 +
{| class="wikitable"
 +
|-
 +
! 옵션 !! 수행결과
 +
|-
 +
| buffers N || * 버퍼,버퍼헤더 및 다양한 링크디 리스트 정보 덤프
 +
*
 +
|-
 +
| 예시 || 예시
 +
|-
 +
| 예시 || 예시
 +
|}
 +
}}
 
<source lang=sql>
 
<source lang=sql>
  

2024년 4월 28일 (일) 18:58 판

thumb_up 추천메뉴 바로가기


1 프로세스 서브펜딩[편집]

  • sysdba 권한 필요
  • DBWR 과 LGWR 수행을 이해 하기 위해서는 해당 프로세스를 stop 시킬필요가 있음.
  • Oradeb 를 이용 하여 suspend , resume 시킴.

1) 오라클 프로세스 Attach 시키기 위해 v$process에서 pid 확인

-- oracle process attach 
select prc.pid
  from v$bgprocess bgp
     , v$process prc 
 where bgp.name = 'LGWR'
   and prc.addr = bgp.paddr
;
       PID
----------
	20
SQL> oradebug setorapid 20
Oracle pid: 20, Unix process pid: 2977, image: oracle@b4eb0743df57 (LGWR)

2) suspend

oradebug suspend

3) 다른 세션에서 sql 을 수행하고 commit 을 수행함.

-- commit 작업은 hang에 걸리게 됨. log file sync 대기이벤트를 대기 하게 됨.

4) resume

oradebug resume

2 덤프[편집]

  • 메모리 구조를 트레이스 파일로 덤프
SQL> oradebug setmypid
Statement processed.


SQL> alter session set tracefile_identifier = DBCAFE;
Session altered.
SQL> oradebug tracefile_name
/u01/app/oracle/diag/rdbms/mongo/MONGO/trace/MONGO_ora_30886_DBCAFE.trc
notifications_active oradebug 덤프명령어

{

SQL> oradebug dumpvar sga kcbnchk
boolean kcbnchk_ [060019FD4, 060019FD8) = 00000001


SQL> alter session set use_stored_outlines = rule_based;

Session altered.

SQL> oradebug setmypid
Statement processed.
SQL> oradebug dumpvar uga ugauso_p
qolprm ugauso_p [7F197A4EFC48, 7F197A4EFCD0) = 00000001 5552000A 425F454C 44455341 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ...

3 SGA내 변수 찾기 - x$ksmfsv (Kernel Services Memory Fiexed SGA Variables )[편집]

SQL> select ksmfsnam from x$ksmfsv where ksmfsnam like 'kcbn%'
  2  ;

KSMFSNAM
----------------------------------------------------------------
kcbncbh_
kcbnwp_
kcbnbf_
kcbnpg_
kcbnchkl_
kcbnchk_
kcbnumaactive_
kcbnvmenabled_
kcbnbcscv_

9 rows selected.