Logo

SQL Script

Set Session In Trace

Tested on Oracle 8.1 Tested on Oracle 8.0 Tested on Oracle 7

Updated : 08-Jan-2002
Version : 1.0

Description

Script displays the set session in trace command, but does not run the command.

Parameters

SID - The Session Identifer (from v$session)

SQL Source

col username form a10
col program form a25
col osuser form a10

set ver off

ACCEPT sid PROMPT 'Enter SID : '

select s.SID,s.SERIAL#,s.USERNAME,s.OSUSER,s.PROGRAM, p.SPID 
from v$session s, v$process p
where p.addr = s.paddr and s.sid = &sid
/

set head off

select 'execute dbms_system.set_sql_trace_in_session('	||sid
	||','||serial#||', true);'
from v$session where sid=&sid
/

set head on

Return to Index of SQL Scripts


Home | Company Profile | Services | Contact Us | SQL scripts and tips | Quiz
Legal

Logo