Oracle实用工具:oradebug
1 oradebug介绍
oradebug主要是给Oracle支持人员使用的,尽管很早便有,但oracle官网很少有记载。他是个sql*plus命令行工具,有sysdba的权限就可以登入,无需特别设置。他可以被用于:
1)追踪进程,或者是你的,或者是外部的
2)确定进程往哪个trc文件写
3)转储:数据文件头、内部oracle结构等
4)挂起进程,暂时的
5)确定实例使用了哪些共享内存块和信号量
6)找出RAC实例使用了哪些互联地址和协议
7)修改SGA中的数据结构
2 oradebug使用步骤
1)启动sql*plus并以sysdba身份登入
2)连接到一个进程
3)设置一个事件或者进行诊断转储
4)检索trc文件名
5)与连接到的进程断开
3 oradebug命令介绍
- sys@ORCL> oradebug help
- HELP [command] Describe one or all commands
- SETMYPID Debug current process
- SETOSPID <ospid> Set OS pid of process to debug
- SETORAPID <orapid> ['force'] Set Oracle pid of process to debug
- SHORT_STACK Dump abridged OS stack
- DUMP <dump_name> <lvl> [addr] Invoke named dump
- DUMPSGA [bytes] Dump fixed SGA
- DUMPLIST Print a list of available dumps
- EVENT <text> Set trace event in process
- SESSION_EVENT <text> Set trace event in session
- DUMPVAR <p|s|uga> <name> [level] Print/dump a fixed PGA/SGA/UGA variable
- DUMPTYPE <address> <type> <count> Print/dump an address with type info
- SETVAR <p|s|uga> <name> <value> Modify a fixed PGA/SGA/UGA variable
- PEEK <addr> <len> [level] Print/Dump memory
- POKE <addr> <len> <value> Modify memory
- WAKEUP <orapid> Wake up Oracle process
- SUSPEND Suspend execution
- RESUME Resume execution
- FLUSH Flush pending writes to trace file
- CLOSE_TRACE Close trace file
- TRACEFILE_NAME Get name of trace file
- LKDEBUG Invoke global enqueue service debugger
- NSDBX Invoke CGS name-service debugger
- -G <Inst-List | def | all> Parallel oradebug command prefix
- -R <Inst-List | def | all> Parallel oradebug prefix (return output
- SETINST <instance# .. | all> Set instance list in double quotes
- SGATOFILE <SGA dump dir> Dump SGA to file; dirname in double quotes
- DMPCOWSGA <SGA dump dir> Dump & map SGA as COW; dirname in double quotes
- MAPCOWSGA <SGA dump dir> Map SGA as COW; dirname in double quotes
- HANGANALYZE [level] [syslevel] Analyze system hang
- FFBEGIN Flash Freeze the Instance
- FFDEREGISTER FF deregister instance from cluster
- FFTERMINST Call exit and terminate instance
- FFRESUMEINST Resume the flash frozen instance
- FFSTATUS Flash freeze status of instance
- SKDSTTPCS <ifname> <ofname> Helps translate PCs to names
- WATCH <address> <len> <self|exist|all|target> Watch a region of memory
- DELETE <local|global|target> watchpoint <id> Delete a watchpoint
- SHOW <local|global|target> watchpoints Show watchpoints
- CORE Dump core without crashing process
- IPC Dump ipc information
- UNLIMIT Unlimit the size of the trace file
- PROCSTAT Dump process statistics
- CALL <func> [arg1] ... [argn] Invoke function with arguments
相关推荐
IT之家 2020-03-11
graseed 2020-10-28
zbkyumlei 2020-10-12
SXIAOYI 2020-09-16
jinhao 2020-09-07
impress 2020-08-26
liuqipao 2020-07-07
淡风wisdon大大 2020-06-06
yoohsummer 2020-06-01
chenjia00 2020-05-29
baike 2020-05-19
扭来不叫牛奶 2020-05-08
hxmilyy 2020-05-11
黎豆子 2020-05-07
xiongweiwei00 2020-04-29
Cypress 2020-04-25
冰蝶 2020-04-20