Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Which session is mine

Shadow123Nov 30 2016 — edited Dec 4 2016

Hi All

I'm just wondering if somebody guide me.

I just run a query but my query got stuck  and stuck my session as well.

So I execute the below statement.

Statement

select s.username,s.PROGRAM ,'ALTER SYSTEM KILL SESSION '||''''||

      s.sid||','||s.serial#||''''||';'
      
FROM   gv$session s
       JOIN gv$process p ON p.addr = s.paddr AND p.inst_id = s.inst_id
WHERE  1=1
and S.type != 'BACKGROUND'
and s.PROGRAM IN ('SQL Developer','frmbld.exe')
;

Now I can see 3 sessios under the same user name, See below:

SQL Developer ALTER SYSTEM KILL SESSION '13,37369';

SQL Developer ALTER SYSTEM KILL SESSION '35,52381';

SQL Developer ALTER SYSTEM KILL SESSION '160,11021';

My question is that how would I know which session is mine?

This post has been answered by AndrewSayer on Nov 30 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 29 2016
Added on Nov 30 2016
12 comments
722 views