If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Microsoft SQL Server > Getting session information

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-19-12, 05:51
Breako Breako is offline
Registered User
 
Join Date: Jan 2006
Posts: 119
Getting session information

Hi,
How do I get as mch information about all active sessions as possible? For example, at any point in time, I want to check who is logged in the database? Also, want to really get all the session information to cover cases where you have the same user logged in twice in different sessions?

Thanks a mill.
Reply With Quote
  #2 (permalink)  
Old 01-19-12, 09:42
MCrowley MCrowley is offline
Wage drone 24601
 
Join Date: Jan 2003
Location: Massachusetts
Posts: 4,899
The easiest way is to use the system stored procedure sp_who2. If you want more information, you will most likely have to delve into the dynamic management view sys.dm_exec_sessions, sys.dm_exec_requests, and sys.dm_tran_locks.

Management Studio should also give a view of the current connections. Just not sure where it is in there.
Reply With Quote
  #3 (permalink)  
Old 01-19-12, 11:15
blindman blindman is online now
World Class Flame Warrior
 
Join Date: Jun 2003
Location: Ohio
Posts: 11,735
In Manglement Studio, its a little icon that looks like a chart. When you hover over it, the title displayed is "Activity Monitor".
__________________
If it's not practically useful, then it's practically useless.

blindman
www.chess.com: "sqlblindman"
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On