-
How can i know my 'sid, serial#' ??
I am running 2 SQL Plus to connect to DB using the same DB user.
When i query v$session, i found the 'sid, serial#' information for the 2 SQL Plus sessions. But how can i know which 'sid, serial#' belongs to which SQL Plus ? Any SQL command i can use to check the 'sid, serial#' of the current SQL Plus session ?
Thanks,
Andrew
-
select sid, serial# from v$session where audsid = userenv('SESSIONID');
-
Here's a little script that will give you information on the
Sql connection you are currently running:
***********************************************************
col a form a70 fold_after 1
set heading off feedback off
select 'Sid, Serial#, Aud sid : '|| s.sid||' , '||s.serial#||' , '||s.audsid a,
'DB User / OS User : '||s.username||' / '||s.osuser a,
'Machine - Terminal : '||s.machine||' - '||s.terminal a,
'OS Process Ids : '||s.process||' (Client) '||p.spid||' (Server)' a,
'Client Program Name : '||s.program a
from v$process p,
v$session s
where p.addr = s.paddr
and s.audsid = userenv('SESSIONID')
/
***********************************************************
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|