Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
The best answers are voted up and rise to the top
we got some connections timeouts running a stored procedure in a SQL Server 2008 instance. after a while, the DB started to work as usual, and there weren't any additional timeout errors.
So I'm trying to get additional info about the error.
Does SQL server 2008 have any kind of error log that I can look into?
Do exist any auditing/logging features that I can activate to trace the error (if it happens again)?
asked Jul 16, 2010 at 1:08
64322 gold badges88 silver badges1515 bronze badges
To see the SQL Logs: Connect to your SQL instance via Management Studio, expand the Management folder in the object browser, expand the SQL Server logs folder and you can examine your logs.
Default behavior is to keep six logs with a new one being created each time the database engine server is restarted.
Profiler can always be used to see what is happening under the covers.
You might post the messages associated with your timeout...
answered Jul 16, 2010 at 13:17
1,07688 silver badges1010 bronze badges
SQL Server logs won't capture application timeouts, as they are generated by the client code, not the SQL Server.
To capture long running queries, you need to use SQL Profiler. Setup a trace which captures all commands which take over 30 seconds (the default .NET timeout) and see what comes up.
That or put code in the application so that when it gets a timeout it logs some data about the query that it was running, and the failure reason.
answered Jul 19, 2010 at 0:05
27.1k44 gold badges4141 silver badges6969 bronze badges
The currently selected answer is slightly misleading as it discusses referencing the SQL Server Error Log, which will not help for the given scenario.
As mrdenny quite rightly points out.....
Application timeouts to SQL Server are initiated from the client-side as Attention Events and are not recorded in the SQL Server Error Log.
You can monitor for Attention Events using:
answered May 28, 2014 at 9:18
John SansomJohn Sansom
64333 silver badges77 bronze badges