Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where are SQL Server connection attempts logged?

Does SQL Server has an external log file or internal table for attempted connections, or is that kind of info put somewhere in the Windows Event Log?

like image 345
John K Avatar asked Jul 20 '11 22:07

John K


People also ask

Where are SQL Server error logs located?

By default, the error log is located at Program Files\Microsoft SQL Server\MSSQL. n \MSSQL\LOG\ERRORLOG and ERRORLOG. n files.

How do I view SQL login history?

Go to security option. Expand and right click on Logins. click reports> Standard reports > Login statistics.

Where are SQL logins stored?

Where are user names and passwords stored in SQL Server? - They are stored in master db in the sysxlogins table.


1 Answers

You can enable connection logging. For SQL Server 2008, you can enable Login Auditing. In SQL Server Management Studio, open SQL Server Properties > Security > Login Auditing select "Both failed and successful logins".

Make sure to restart the SQL Server service.

Once you've done that, connection attempts should be logged into SQL's error log. The physical logs location can be determined here.

like image 85
vcsjones Avatar answered Oct 19 '22 05:10

vcsjones