Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 16th, 2006, 09:17 PM
Authorized User
Join Date: Jun 2003
Location: Shah Alam, Selangor, Malaysia.
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
Default Checking user list logon to SQL server

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 With Quote
  #2 (permalink)  
Old February 16th, 2006, 10:01 PM
SQLScott's Avatar
Wrox Author
Join Date: Dec 2004
Location: Wellington, FL , USA.
Posts: 338
Thanks: 0
Thanked 2 Times in 2 Posts

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 With Quote
  #3 (permalink)  
Old February 19th, 2006, 06:42 PM
Friend of Wrox
Join Date: Dec 2005
Location: , AZ, .
Posts: 146
Thanks: 0
Thanked 1 Time in 1 Post

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
Reply With Quote
  #4 (permalink)  
Old May 15th, 2006, 07:40 PM
Authorized User
Join Date: Jun 2003
Location: Shah Alam, Selangor, Malaysia.
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts

i need to know which pc connected to my SQL server.
Reply With Quote
  #5 (permalink)  
Old May 16th, 2006, 02:35 AM
Authorized User
Join Date: Mar 2006
Location: Bratislava, , Slovakia.
Posts: 80
Thanks: 0
Thanked 0 Times in 0 Posts

SELECT loginame, hostname, db_name(dbid) FROM master.dbo.sysprocesses


Reply With Quote

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 Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
One user getting logon screen digby_dog Access 4 August 6th, 2007 12:44 PM
Logon failure: user account restriction. Possible zaghmout HTML Code Clinic 2 January 6th, 2007 10:34 AM
Checking null values in Query(SQL Server) Prob leo_vinay Classic ASP Databases 2 December 28th, 2004 04:31 AM
Obtaining User Logon dearnne Access 1 September 2nd, 2004 01:39 PM
How to detect if a user is logon a Windows NT øej Pro VB.NET 2002/2003 1 January 23rd, 2004 10:30 AM

All times are GMT -4. The time now is 07:23 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.