From the course: Complete Guide to Oracle Database 23ai: From Beginner to Advanced

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

SQL tracing

SQL tracing

- [Narrator] While AWR, ASH and other utilities view data at a database level, yes, even active session history, or dig into SQL, tracing is valuable as it traces a user session. The ability to trace a complex user session from beginning to end can offer insight that may not be easily ascertained from a single SQL statement, including application logic, secondary latency, experience from auditing or management demands, or even network latency. As with other aspects of Oracle, tracing can be initiated at many levels, including Oracle Enterprise Manager, Enterprise Manager Express, SQL Developer, and from the command line. Issuing a trace requires information about the session, including the session ID, AKA SID, and the serial number for the session. This data can be queried from the V$SESSION view and even after a session is under way, capture the information and a trace can be issued. We can now turn on tracing for the session and a trace file will be created on the database host and…

Contents