Admin/admin

Oracle DB에 접근할수 없을때 SYSTEMSTATE 덤프 받는법

Qhtlr 2007. 8. 30. 17:09

Oracle Database에 접근할 수 없을때 시스템 덤프를 받는 방법이다.

접근이 가능하다면
svrmgr> connect internal
svrmgr> oradebug setmypid
svrmgr> oradebug unlimit
svrmgr> oradebug dump systemstate 10

혹은
svrmgr> alter session set max_dump_file_size=unlimited;
svrmgr> alter session set events 'immediate trace name systemstate level 10';


dbx 명령
목적:운영 시스템하에서 프로그램을 실행하고 디버그하기 위한 환경을 제공합니다.

dbx -h
dbx: fatal error: DBX Startup Options:

dbx [-a ProcessID] [-c CommandFile] [-d NestingDepth] [-I Directory]
[-k] [-u] [-x] [-F] [-L] [-r] [ObjectFile [CoreFile]]

        -a ProcessID        Attach to specified process
        -c CommandFile      Run dbx subcommands in specified file first
        -d NestingDepth     Set limit for nesting of program blocks
        -I Directory        Include Directory in list of directories
                            searched for source files
        -k                  Map memory addresses
        -u                  Prepend file name symbols with an
'@'
        -x                  Strip postfix '_' from FORTRAN symbols
        -F                  Read all symbols at start-up time
        -L                  Keep linkage symbols
        -r                  Run object file immediately


[테스트]
$dbx -a 211432

Waiting to attach to process 211432 ...
Successfully attached to oracle.
warning: Directory containing oracle could not be determined.
Apply 'use' command to initialize source path.

Type 'help' for help.
reading symbolic information ...
stopped in sskgpwwait at 0x10385474 ($t1)
0x10385474 (sskgpwwait+0x1c) 80410014        lwz   r2,0x14(r1)
(dbx) call ksudss(10)

ksudss returns successfully
(dbx) quit

$BDUMP/pmon_211432_xxxxxx.trc

테스트 Dump 후 바로 DBWR이 죽으며 DB가 다운되었음...

DBW0: terminating instance due to error 472
Instance terminated by DBW0, pid = 106172

00472, 00000, "PMON  process terminated with error"
// *Cause:  The process cleanup process died
// *Action: Warm start instance

http://kr.forums.oracle.com/forums/thread.jspa?threadID=477252&tstart=0