Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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)?

share|improve this question
    
Can you post the exact timeout error? It may be the client setting for query timeout. –  K. Brian Kelley Jul 16 '10 at 13:53
    
The application that got the timeout exception do not generate logs. so I have to review the SQL server logs –  SDReyes Jul 16 '10 at 16:45
add comment

2 Answers

up vote 1 down vote accepted

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...

share|improve this answer
    
@jl: Thank you jl, exactly was I was looking for. The application that got the timeout exception do not generate logs. so I reviewed the SQL server logs, but there isn't any error logs around the exception. I would trace it using the profiler if it happens again. +1 : ) –  SDReyes Jul 16 '10 at 16:44
    
except you can't trace with profiler after the fact, you have to have it running when the error happens. –  SqlACID Jul 16 '10 at 23:54
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.