Results 1 to 4 of 4

Thread: SQL Server System SP to detech who's Login to what database?

  1. #1

    Thread Starter
    Hyperactive Member vincentg's Avatar
    Join Date
    Jun 2005
    Location
    Chicago IL, USA
    Posts
    261

    SQL Server System SP to detech who's Login to what database?

    Hi guys,

    I double check one time the Database Server SQL Server (its a test Server) and i saw in the Event Viewer that one programmer is Logging In (Security - Success Audit)

    I am no DBA but i would like to know what SP to run to check on who's login in the SQL Server Database and to what database? Provided that those user logging in uses the SA or Admin Users.

    Thanks a lot!
    - Vincent

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: SQL Server System SP to detech who's Login to what database?

    sp_Who

    returns a list of everybody connected to the server and what database... even shows the current commend executing, and other neat items.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: SQL Server System SP to detech who's Login to what database?

    There is also another flavor - EXEC SP_WHO2 - with some different columns of info.

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  4. #4

    Thread Starter
    Hyperactive Member vincentg's Avatar
    Join Date
    Jun 2005
    Location
    Chicago IL, USA
    Posts
    261

    Re: SQL Server System SP to detech who's Login to what database?

    Is there a LOG file to view where a certain user connects to what Database Object at a specific date & time?

    sp_who only shows the active users connected...

    Thanks again!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width