Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> 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
--
![]() |
![]() |