Search code examples
sql-serverauthenticationiptrace

need to setup trace to save ip address of SQL Server login


What event can I log so I save every login (Windows or User) from within SQL Server name and IP address of where the user is logging in from?


Solution

  • If you are looking to do an actual trace you have two options:

    1. Use a server side trace with the Audit Login and Audit Login Failed events.
    2. Use an Extended Events session using the Login event. This has a whole list of fields you can track.