How can we extract the complete list of users for a database and whether they are active or not

  • How can we extract the complete list of users for a database and whether they are active or not in both sql server 2000 and 2005. I need this information for a audit purpose.

  • You can start in the sys.syslogins view in SQL 2005 and above. If memory services me correctly, there was a syslogins table in SQL 2000. I do not have a SQL 2000 instance to verify

    There is all kinds of info in the system tables. Looks there for things like this

    Andrew SQLDBA

  • There is a table called sysxlogins but that only gives the logins details.

    But, I need a query that gives me a complete list of users who connect to the database from various applications.

  • Would query sys.sysusers (2K5+) give you the answer you're looking for?



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • Hi, Thanks for your reply..

    sysusers only shows the local users but I want the details of users in the complete AD who are accessing the database and whether they are active or not..

  • sys.dm_exec_sessions -- 2005

    sysprocesses -- 2000

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply