I need a number to identified and Oracle session (active, inactive or killed) to use inside a program.
I think that the column AUDSID from view V$SESSION is the correct number for that propose.
My program can not access V$SESSION (because it has not the privilege), so I use the value returned from USERENV('SESSIONID').
But I have some questions:
1. USERENV needs the AUDIT TRAIL with the TRUE value. In our databases, the AUDIT RAIL is FALSE, but the USERENV('SESSIONID') function functions property. Why?
2. When is this number reseated to zero?
3. Do you know another alternative different than AUDSID?
Thanks in advance.