Oracle Articles
Performance Tuning
Performance Tuning
- Query that will return the trace file for a given session or for all sessions attached to the database. You should be connected as SYSDBA
- Automation for Enabling and disabling SQL Trace
Example-1 Query that will return the trace file for a given session or for all sessions attached to the database. You should be connected as SYSDBA
1 |
COLUMN username format a10 |
Example-2 Automation for Enabling and disabling for SQL Trace
The query gets the SID and serial no for the session that need tracing.
1 |
SELECT SID, serial#, username |
The procedure enable tracing and disable automatically after time you specified. It would also give us tracing directory with file name. You have to specify time interval in seconds
1 |
SET serveroutput ON |
Related Articles
