• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 439
  • Last Modified:

How to tell who you are in sql session

sqlplus login as sys
select USERNAME,PROGRAM, SID, SERIAL# from v$session where username is not null;
Have got a lot of sqlplus.exe entries like me. Is there any way to distinguish my login from the other?
0
jl66
Asked:
jl66
3 Solutions
 
wdosanjosCommented:
Check MACHINE and OSUSER also. They may provide the info you need to distinguish your session.

select USERNAME,PROGRAM, SID, SERIAL#, MACHINE, OSUSER
  from v$session
where username is not null
0
 
SharathData EngineerCommented:
Can you try this?

select USERNAME,PROGRAM, SID, SERIAL# from v$session where audsid=userenv('SESSIONID');
0
 
sdstuberCommented:
select USERNAME,PROGRAM, SID, SERIAL# from v$session where sid in ( select sid from v$mystat where rownum = 1)
0
 
Gedmis_rCommented:
show user
0
 
jl66Author Commented:
Thanks for everyone's tip.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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