RE: How to identify the session inside Jobs

  • From: "Christian Antognini" <Christian.Antognini@xxxxxxxxxxxx>
  • To: <gcuccu@xxxxxxxxxxx>
  • Date: Mon, 7 Feb 2005 21:45:10 +0100

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,

>-----Original Message-----
>From: oracle-l-bounce@xxxxxxxxxxxxx =
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Giovanni
>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 =
>Oracle on AIX
>Thanks in advance,
>       Giovanni

Other related posts: