Oracle工具 + 生產力:oradebug

來源:互聯網
上載者:User

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
  • 下一頁

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.