How to get MACHINE name, PROGRAM name, operative system USER and the USERNAME related to the current Oracle Database Session


/ Published in: SQL
Save to your folder(s)

To get more information of the current session use this: DESC V$SESSION.

Note: Your user need a GRANT SELECT ON V_$SESSION TO username;


Copy this code and paste it in your HTML
  1. SELECT MACHINE,
  2. PROGRAM,
  3. OSUSER,
  4. USERNAME
  5. FROM V$SESSION
  6. WHERE sid=(SELECT sys_context('USERENV','SID') FROM dual);

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.