|
Subject:
|
Checking user list logon to SQL server
|
|
Posted By:
|
Jane
|
Post Date:
|
2/16/2006 8:17:03 PM
|
how am i going to list out to those using sql server, so far i only know how many user logon but i dunno who logon the SQL server.
|
|
Reply By:
|
SQLScott
|
Reply Date:
|
2/16/2006 9:01:38 PM
|
try using the sp_who system stored proc. it is used as follows:
EXEC sp_who
This will tell you who is logged on, and to what database, adn from what computer.
|
|
Reply By:
|
David_the_DBA
|
Reply Date:
|
2/19/2006 5:42:33 PM
|
sp_who2 is also revealing: it shows almost all the same columns but adds CPUTime, DiskIO, LastBatch, and Program Name.
David Lundell Principal Consultant and Trainer www.mutuallybeneficial.com
|
|
Reply By:
|
Jane
|
Reply Date:
|
5/15/2006 7:40:28 PM
|
i need to know which pc connected to my SQL server.
|
|
Reply By:
|
peko
|
Reply Date:
|
5/16/2006 2:35:39 AM
|
Hi, simply: SELECT loginame, hostname, db_name(dbid) FROM master.dbo.sysprocesses
Peko
|