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命令介绍

  1. sys@ORCL> oradebug help  
  2. HELP           [command]                 Describe one or all commands  
  3. SETMYPID                                 Debug current process  
  4. SETOSPID       <ospid>                   Set OS pid of process to debug  
  5. SETORAPID      <orapid> ['force']        Set Oracle pid of process to debug  
  6. SHORT_STACK                              Dump abridged OS stack  
  7. DUMP           <dump_name> <lvl> [addr]  Invoke named dump  
  8. DUMPSGA        [bytes]                   Dump fixed SGA  
  9. DUMPLIST                                 Print a list of available dumps  
  10. EVENT          <text>                    Set trace event in process  
  11. SESSION_EVENT  <text>                    Set trace event in session  
  12. DUMPVAR        <p|s|uga> <name> [level]  Print/dump a fixed PGA/SGA/UGA variable  
  13. DUMPTYPE       <address> <type> <count>  Print/dump an address with type info  
  14. SETVAR         <p|s|uga> <name> <value>  Modify a fixed PGA/SGA/UGA variable  
  15. PEEK           <addr> <len> [level]      Print/Dump memory  
  16. POKE           <addr> <len> <value>      Modify memory  
  17. WAKEUP         <orapid>                  Wake up Oracle process  
  18. SUSPEND                                  Suspend execution  
  19. RESUME                                   Resume execution  
  20. FLUSH                                    Flush pending writes to trace file  
  21. CLOSE_TRACE                              Close trace file  
  22. TRACEFILE_NAME                           Get name of trace file  
  23. LKDEBUG                                  Invoke global enqueue service debugger  
  24. NSDBX                                    Invoke CGS name-service debugger  
  25. -G             <Inst-List | def | all>   Parallel oradebug command prefix  
  26. -R             <Inst-List | def | all>   Parallel oradebug prefix (return output  
  27. SETINST        <instance# .. | all>      Set instance list in double quotes  
  28. SGATOFILE      <SGA dump dir>         Dump SGA to file; dirname in double quotes  
  29. DMPCOWSGA      <SGA dump dir> Dump & map SGA as COW; dirname in double quotes  
  30. MAPCOWSGA      <SGA dump dir>         Map SGA as COW; dirname in double quotes  
  31. HANGANALYZE    [level] [syslevel]        Analyze system hang  
  32. FFBEGIN                                  Flash Freeze the Instance  
  33. FFDEREGISTER                             FF deregister instance from cluster  
  34. FFTERMINST                               Call exit and terminate instance  
  35. FFRESUMEINST                             Resume the flash frozen instance  
  36. FFSTATUS                                 Flash freeze status of instance  
  37. SKDSTTPCS      <ifname>  <ofname>        Helps translate PCs to names  
  38. WATCH          <address> <len> <self|exist|all|target>  Watch a region of memory  
  39. DELETE         <local|global|target> watchpoint <id>    Delete a watchpoint  
  40. SHOW           <local|global|target> watchpoints        Show  watchpoints  
  41. CORE                                     Dump core without crashing process  
  42. IPC                                      Dump ipc information  
  43. UNLIMIT                                  Unlimit the size of the trace file  
  44. PROCSTAT                                 Dump process statistics  
  45. CALL           <func> [arg1] ... [argn]  Invoke function with arguments  
  • 1
  • 2
  • 3
  • 4
  • 下一页

相关内容

    暂无相关文章