Question: What is the easiest way to display my session ID number? I'm not a DBA, I just want to know my own session?
Answer: While Oracle provides the v$session view to display all current session details, there are several queries that you can use to see your own session ID number. It's abbreviated SID, and these SQL queries will show your current SID:
select
sys_context('USERENV','SID')
from dual;select
sid
from
v$mystat
where
rownum <=1;select
to_number(substr(dbms_session.unique_session_id,1,4),'XXXX') mysid
from dual;select distinct
sid
from v$mystat;