Thứ Năm, 9 tháng 1, 2020

Các lệnh hay sử dụn trong ORADEBUG

ORADEBUG Utility
ORADEBUG HELP
ORADEBUG SETMYPID;           -- Debug current session
oradebug setmypid
ORADEBUG SETOSPID ;      -- Debug session with the specified OS process
oradebug setospid 3456
ORADEBUG SETORAPID ;   -- Debug session with the specified Oracle process ID
oradebug setorapid 222
oradebug unlimit
oradebug close_trace;
ORADEBUG TRACEFILE_NAME;     -- Display the current trace file

ORADEBUG EVENT event TRACE NAME CONTEXT FOREVER, LEVEL level
ORADEBUG EVENT 10046 TRACE NAME CONTEXT FOREVER, LEVEL 12;
oradebug event 10513 trace name context forever, level 2
ORADEBUG EVENT 10046 TRACE NAME CONTEXT OFF;
oradebug event immediate trace name controlf level 9;
oradebug event immediate trace name file_hdrs level 9;
oradebug SESSION_EVENT event TRACE NAME CONTEXT FOREVER, LEVEL level
ORADEBUG SESSION_EVENT 10046 TRACE NAME CONTEXT FOREVER, LEVEL 12
oradebug session_event 10053 TRACE NAME CONTEXT FOREVER, LEVEL 1

oradebug hanganalzye [level] [syslevel]
10     Dump all processes (IGN state)
5      Level 4 + Dump all processes involved in wait chains (NLEAF state)
4      Level 3 + Dump leaf nodes (blockers) in wait chains (LEAF,LEAF_NW,IGN_DMP state)
3      Level 2 + Dump only processes thought to be in a hang (IN_HANG state) 
1-2    Only HANGANALYZE basic output, no process dump at all
oradebug hanganalyze
oradebug hanganalyze 3
oradebug -g def hanganalyze 1
ORADEBUG DUMP dumpname level
oradebug dump hanganalyze 3
oradebug -g all dump hanganalyze 3
oradebug dump systemstate
oradebug dump systemstate 266
oradebug dump systemstate 258
oradebug -g all dump systemstate 267
oradebug dump errorstack 3
ORADEBUG DUMP HEAPDUMP 1
ORADEBUG DUMP LIBRARY_CACHE 4
oradebug dump ashdump 10
ORADEBUG DUMPLIST pid
oradebug dumplist
ORADEBUG DUMPSGA
oradebug dumpvar [level]
ORADEBUG DUMPVAR SGA variable_name
ORADEBUG DUMPVAR SGA kcbnhb
oradebug dumptype 

ORADEBUG FLUSH
ORADEBUG SUSPEND
ORADEBUG RESUME
ORADEBUG WAKEUP pid
ORADEBUG PEEK address length
ORADEBUG PEEK 0x20005F0C 12
ORADEBUG POKE address length value
ORADEBUG POKE 0x20005F0C 4 0x46495845
ORADEBUG POKE 0x20005F14 2 0x5A45
ORADEBUG IPC
ORADEBUG FFBEGIN
ORADEBUG SGATOFILE directory
ORADEBUG FFRESUMEINST
oradebug core
oradebug call [arg1] ... [argn]
oradebug current_sql
oradebug delete watchpoint 
oradebug direct_access 
oradebug dmpcowsga 

oradebug dump crs 3
oradebug dump css 3
oradebug dump ocr 3

e.g: 1
oradebug setospid 15190     <--spid font="">
oradebug event 10046 trace name context forever, level 12
oradebug tracefile_name
...wait for sometime...
oradebug event 10046 trace name context off

e.g: 2
oradebug setospid  
oradebug unlimit
oradebug dump hanganalyze 3
oradebug dump systemstate 258
...wait 1-2 minutes...
oradebug dump hanganalyze 3
oradebug dump systemstate 258

e.g: 2
oradebug setmypid
oradebug unlimit
oradebug -g all hanganalyze 3
oradebug -g all dump systemstate 258
...wait 3-5 minutes...
oradebug -g all hanganalyze 3
oradebug -g all dump systemstate 258

e.g: 4
oradebug setospid 
oradebug unlimit
oradebug dump errorstack 3
...wait 90 seconds...
oradebug dump errorstack 3

e.g: 5
oradebug unlimit 
oradebug dump errorstack 3 
oradebug dump systemstate 266 
...wait 1 minute...
oradebug dump errorstack 3 
oradebug dump systemstate 266 
...wait 1 minute...
oradebug dump errorstack 3 
oradebug dump systemstate 266 
oradebug tracefile_name


oradebug doc component asm

@ Trần Văn Bình - Founder of Oracle DBA AZ

#BossData #OraAz #OracleDBAAz #OracleTutorial #Quản_trị_cơ_sở_dữ_liệu_Oracle #OracleDBA #OracleDatabaseAdministration

ĐỌC NHIỀU

Trần Văn Bình - Oracle Database Master