User's Own Session Details

No votes yet

An SQL to find user's session's details from within his/her session.

SELECT * FROM v$session
WHERE sid = (SELECT sid FROM v$mystat
             WHERE rownum=1);

You can also use the SQL below if you are running on 10g or higher:
SELECT * FROM v$session
WHERE sid = sys_context('userenv','sid');

Please try to help out with unanswered topics on the forum. Chances are you have had the same issue/question some time in your IT career!

Comments

Have a question? Please ask it on the forum instead.

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
The question below is to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.