locked
Getting Users who logged on in last month RRS feed

  • Question

  • Hi all,

    Using Sql Server 2005.

    Is it possible to retrieve from Sql Server the name and times of all users who logged into the server in the last month?

    Regards

    Melt

    Tuesday, August 24, 2010 12:09 PM

Answers

  • In addition and giving the assumption that you switched on the Audit successfull (failed) logins int e properties page of SQL Server (SSMS --> Right click the server --> Security tab) and that you keep the SQL Server logs long enough, you can read it from the logs as well. In addition to DDL event you could use extended events / SQL Server audit / C2 audit. But this has to be all configured upfront.

    -Jens


    Jens K. Suessmeyer http://blogs.msdn.com/Jenss
    • Proposed as answer by Tom Li - MSFT Wednesday, August 25, 2010 9:57 AM
    • Marked as answer by Tom Li - MSFT Tuesday, August 31, 2010 2:48 AM
    Wednesday, August 25, 2010 8:09 AM

All replies

  • I don't think this is possible unless you have set up a DDL trigger to audit the login event.
    every day is a school day
    Tuesday, August 24, 2010 1:12 PM
  • In addition and giving the assumption that you switched on the Audit successfull (failed) logins int e properties page of SQL Server (SSMS --> Right click the server --> Security tab) and that you keep the SQL Server logs long enough, you can read it from the logs as well. In addition to DDL event you could use extended events / SQL Server audit / C2 audit. But this has to be all configured upfront.

    -Jens


    Jens K. Suessmeyer http://blogs.msdn.com/Jenss
    • Proposed as answer by Tom Li - MSFT Wednesday, August 25, 2010 9:57 AM
    • Marked as answer by Tom Li - MSFT Tuesday, August 31, 2010 2:48 AM
    Wednesday, August 25, 2010 8:09 AM