Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Oradebug command usage of oracle

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

0 > oradebug usage steps

1) start sql*plus and log in as sysdba

2) Connect to a process

3) set an event or make a diagnostic dump

4) retrieve trc file name

5) disconnect from the process to which you are connected

1 > what commands are available for oradebug?

Log in to the database as sysdba, and you can see the common oradebug commands through oradebug help.

Sqlplus / as sysdba

Oradebug help

2 > track current session information

Oradebug setmypid-tracks the current session

Oradebug setospid-tracking system progress

Oradebug setorapid-tracking the ORACLE process

Oradebug unlimit-remove the trace file size limit

Oradebug close_trace-close trace

Oradebug tracefile_name-View the trace file name and location

3 > use oradebug to do session level 10046 or 10053

Oradebug setmypid

Oradebug unlimit

Oradebug session_event 10046 trace name context forever, level 4-enable session level 10046

Oradebug event 10046 trace name context off-close the 10046 event

Oradebug tracefile_name-View the tracefile file location and file name

4 > use oradebug to do oracle process level 10046

Oradebug setorapid

Oradebug unlimit

Oradebug event 10046 trace name context forever, level 4

Oradebug event 10046 trace name context off

Oradebug tracefile_name

Analysis on the causes of hang residence in 5 > oradebug system

If the system HANG resides, as long as sys users can log in, then it is very useful to use oradebug for cause analysis.

Oradebug setmypid

Oradebug unlimit

Oradebug setinst all-RAC environment

Oradebug hanganalyze 3-A level of 3 is generally sufficient

Oradebug-g def dump systemstate 10-RAC environment

Oradebug tracefile_name

6 > get the status information of a process

Oradebug setospid 22180

Oradebug dump processstate 10

Oradebug tracefile_name

7 > get process error message status

Oradebug setospid 22180

Oradebug dump errorstack 3

8 > track the cause of the error message, such as ORA-04031

Oradebug event 4031 trace name errorstack level 3

9 > sample tracking oracle process:

Oradebug setorapid 120

Oradebug unlimit

Oradebug event 10046 trace name context forever, level 4

Oradebug event 10046 trace name context off

Oradebug tracefile_name

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report