[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 718
  • Last Modified:

Oracle session ID

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
hussainkhan22
Asked:
hussainkhan22
1 Solution
 
sindhuxyzCommented:
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
 
slightwv (䄆 Netminder) Commented:
check out v$session.  This had the sid and serial# of the connection.  It also gives you the SQL_ADDRESS.
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now