SQL Server – Read Errorlog

Enable Audit log to capture successful and failed Logins

— To Enable Failed and Successful Logins
— Need to Restart the Server for this to effect

— Query for Successful Logins

— Login succeeded for user ‘xxxxxx’. Connection made using Windows authentication. [CLIENT: xx.xx.xx.xx]

— Query for Failed Logins

— Login failed for user ”. Reason: Could not find a login matching the name provided. [CLIENT: ]