Audit failed/successful login LOG

  • Hello everyone (:

    I have some Audit issue on SQL Server 2008R2 version, standard edition.

    I want to Audit failed and successful login, so to do that i'm right click on the instance --> Properties -> Security, and choose the option "Both failed and successful logins", and save:

    The only problem is that he keep a lot of  successful events, and I just want to save the last month and that's it.

    How do i do it ?

    Thank's!

    Attachments:
    You must be logged in to view attached files.
  • Because where you're setting it will be tracking the information in the SQL Logs, rather than a separate log (such as using SQL Audit in Enterprise edition,) you'd have to change how long you retain your SQL Logs instead.

  • jasona.work wrote:

    Because where you're setting it will be tracking the information in the SQL Logs, rather than a separate log (such as using SQL Audit in Enterprise edition,) you'd have to change how long you retain your SQL Logs instead.

    But how?

    • This reply was modified 5 years ago by  Nivs719.
  • In SSMS, if you right-click on the SQL Server Logs in the Management section, you can limit the number of log files before they get recycled.  Note, though, that the logs cycle when the SQL service starts, so unless you're restarting the server monthly, or manually going in to restart the service, they'll keep accumulating entries.

    Alternatively, you can "force" a log recycle using "sp_cycle_errorlog"

    • This reply was modified 5 years ago by  jasona.work. Reason: Added some detail
  • Alternatively, stop using the errorlog to capture login events and use SQL Audit or an Extended Events session instead.  That way, you can control with fine granularity what you keep and what you don't.

    John

  • John Mitchell-245523 wrote:

    Alternatively, stop using the errorlog to capture login events and use SQL Audit or an Extended Events session instead.  That way, you can control with fine granularity what you keep and what you don't.

    John

    Except Audit isn't available in Standard Edition, which is what the OP has.

  • Audit is indeed available in Standard Edition, going all the way back to (at least) SQL Server 2008 R2.  Granted, it's only for server-level events, but I think that will include failed and successful logins (although I haven't actually tried it).

    John

    • This reply was modified 4 years, 11 months ago by  John Mitchell-245523. Reason: Crossed out what I said, because it's wrong. Audit was only available in Enterprise Edition when it was first introduced

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

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