Solved

Oracle session ID

Posted on 2010-08-25
2
676 Views
Last Modified: 2013-12-12
Hey guys how can i find the session id for any particular SQL is running with it. I appreciate your help and time in advance.
0
Comment
Question by:hussainkhan22
2 Comments
 
LVL 5

Accepted Solution

by:
sindhuxyz earned 500 total points
Comment Utility
Can u try this:




    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;
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
Comment Utility
check out v$session.  This had the sid and serial# of the connection.  It also gives you the SQL_ADDRESS.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now