1) For tracing any session we require SID, SERIAL# of that session. Also SPID will help In finding out the session trace file in UDMP folder as trace files are named using SPID of that session.
2) Find out the SID, SERIAL from v$session.
select sid, serial#, machine, terminal from v$session order by logon_date;
Check the machine name for confirming the SID.
3) Login to the DB server as sys as sysdba and give password.
Issue the command
EXEC DBMS_SYSTEM.SET_SQL_TRACE_IN_SESSION (
5) Once the command is executed the user can start his/her transaction.
6) For stopping/disabling the trace issue:
EXEC DBMS_SYSTEM.SET_SQL_TRACE_IN_SESSION(
7) After stopping the trace you can find the trace file in UDUMP folder.UDUMP will be located in C:\Ora9idb\admin\HDC\udump.The spid will be included in the trace file name hdcorion_8853.trc. 8853 is the spid here.
8) The trace file will not be in readable format. You have to convert that in readable format by issuing the following command for the command prompt
TKPROF
TKPROF c:\trace01.txt explain=kastle/kastle sort=(prsela,exeela,fchela)
No comments:
Post a Comment