RE: How to identify the session inside Jobs

Ciao Giovanni

Eventually v$mystat contains the information you are looking for... If =
it is the case, you don't need to know the sid/serial pair.

Ti auguro una buona giornata,
Chris

>-----Original Message-----
>From: oracle-l-bounce@xxxxxxxxxxxxx =
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Giovanni
>Cuccu
>Sent: 07 February 2005 17:52
>To: Oracle-l
>Subject: How to identify the session inside Jobs
>
>Hi all,
>       I have to monitor some session statistics (amount of redo log for
>example) and I setup a logofftrigger to do this. Inside the trigger I
>use  sys_context('USERENV','SESSIONID') to identify the current session
>and to trace the stats on a table.
>My main problem is that if the pl/sql code executes inside a job
>(DBMS_JOB) the trigger get always 0 as
>sys_context('USERENV','SESSIONID') and I don't know hwo to identify the
>job session stats. Does anyone know how to determine sid, serial or
>whatever gives access to the session statistics from the session =
itself?
>Oracle 9.2.0.4 on AIX
>Thanks in advance,
>       Giovanni
--
http://www.freelists.org/webpage/oracle-l

Other related posts: