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

An example Analysis of tracking session by oracle

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

Share

Shulou(Shulou.com)05/31 Report--

This article mainly shows you the "oracle tracking session example analysis", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "oracle tracking session example analysis" this article.

Oracle provides many means to track the activities of session, which can track not only the current connected session, but also the session of other users; through the analysis of the trace file, we can not only grasp the activities of the session, but also find out the bottleneck in the session. Tracking session is a common method for system tuning and fault diagnosis of DBA.

Track and stop tracking the activity of the current session:

Alter session set sql_trace=true/false

Track and stop tracking any session:

Exec dbms_system.set_sql_trace_in_session (& sid,&serial#,&sql_trace); alter session set events'& event trace name context forever,level & level';alter session set events'& event trace name context off';exec dbms_system.set_ev (& sid,&serial#,&event_10046,&level_12,''); oradebug event 10046 trace name context forever,level 12

The performance status data of SQL can be collected and recorded in a tracking file by using Event, SQL Trace tools and so on. This tracking file provides a lot of useful information, such as parsing times, execution times, CPU usage time, physical reading, logic reading and so on. These information is the basis to judge the performance of SQL.

The user_dump_dest parameter indicates that the directory of the trace file is generated. To set SQL Trace, you must first set timed_statistics to true in init&sid.ora in order to get those important time information. Because the trace file generated by SQL Trace is difficult to read, it is best to use the TKPROF tool to explain it.

The above is all the contents of the article "oracle's sample Analysis of tracking session". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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