Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle database active session question

Justin BleisteinApr 20 2018 — edited Apr 20 2018

I am tracking active sessions in my database. I noticed that the number of sessions which are active where username is not null(to execlude background porcesses) comes back a certain number but v$sql for users_executing > 0 almost always has more.

I would think that the number of sql/cursors listed in v$sql which has a users_executing column value of > 0 would match the number of v$session rows with status = 'active'. I even tried to join the v$session.sql_address column with the v$sql.address column but nada.

I would start a long running SQL statement as myself in one session, in another I would see v$session showing it as active and last_call_et number incrementing which is good, and I would see it in v$sql with users_executing > 0, which is also good, but I would also see other rows in v$sql

with users_executing > 0 but no corresponding row in v$session for the sql_id, or address. I'm not using parallel servers or shared server or anything like that, which could potentially cause a session correlation confusion.

--Justin

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 18 2018
Added on Apr 20 2018
1 comment
591 views