Published by : Obay Salah , November 19, 2024

 The user can create User Trace Files at the Instance level, and there are two variables that control this Trace:

The first is SQL_TRACE, which by default takes the value False. It can be configured to take the value True to enable the generation of Trace Files for SQL Statements that occur at the Instance level.

The second variable is USER_DUMP_DEST, which specifies the location where USER TRACE FILES are stored.

In a Dedicated Server environment, a Trace is created for each Server Process, while for a Shared Server, a Trace is created for each Shared Server.

SHOW PARAMETER SQL_TRACE

ALTER SYSTEM SET SQL_TRACE=TRUE;

SHOW PARAMETER SQL_TRACE


Now, if you execute SQL Statements, they will be included in the User Trace File located in the path User_Dump_Dest, where a User Trace File is created with the name:

(SID)ora(SPID).trc

The database administrator can identify the session that generated the trace file through the following query:


select s.username,s.sid,p.spid from v$session s, v$process p where s.paddr=p.addr; 

Now, through the SPID, you can access the trace file that was created by this session.

Tags : Database

You May Also Like

Comments

no comment yet!