My Oracle Support Banner

SYS_CONTEXT('USERENV', 'SESSIONID') Recorded at the Start of a DBMS_SCHEDULER Job is Different at the Completion of the Job (Doc ID 2476943.1)

Last updated on FEBRUARY 20, 2019

Applies to:

Oracle Database - Standard Edition - Version 12.2.0.1 and later
Oracle Database - Enterprise Edition - Version 12.2.0.1 and later
Information in this document applies to any platform.

Symptoms

When using dbms_scheduler to run a job the  SESSION_ID returned from SYS_CONTEXT changes from the start of the job to the completion of the job

The following simple test case demonstrates the issue

The resulting output demonstrates that the SESSIONID changes after upgrading to 12.2.0.1

Results
=======
11g
===
start:4294967295   <-----------SESSIONID value returned at create job
session 1:4294967295
session 2:4294967295
session end:4294967295  <---------SESSIONID remains the same at completion of job

12102
=====
session start:20112438 <-----------SESSIONID value returned at create job
session 1:20112438
session 2:20113608
session end:20113608 <---------SESSIONID remains the same at completion of job

12201
=====
session start:4507723 <---------SESSIONID remains the same at completion of job
session 1:4507723
session 2:4507745
session end:4507745 <---------SESSIONID changes at completion of job

 

 

 

Changes

 Upgrade to 12.2.0.1 or later

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.