Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Timeout

Author  Topic 

pgmr1998
Yak Posting Veteran

66 Posts

Posted - 2010-10-11 : 15:17:42
I have a stored procedure that when invoked has started to time out after 30 secs. This procedure has been running successfully for years. Is there a way to extended to timeout period in sql?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-10-11 : 15:20:15
The timeout value is on the application side. SQL Server does not cancel your query after a certain period of time.

Increasing the timeout value is not really a solution unless the stored procedure is expected to be long running. Instead of doing this, you need to figure out what is going wrong. Have you checked the execution plan, blocking, statistics, and indexes?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2010-10-11 : 15:26:57
..or run profiler and take a peek at what's going on?

Or how about adding sproc logging...capture the time the sproc was enetered, and when it is leaving and log the times in a log table

It may NOT be the sproc



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx





Go to Top of Page

pgmr1998
Yak Posting Veteran

66 Posts

Posted - 2010-10-11 : 15:27:20
I have located the code and will attempt to run it from with a query window. Where do I locate the execution plan and blocking? statistics
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2010-10-11 : 15:29:16
sp_who2
will show blocking

In the query window, look in the menus and it will say show execution plan




Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx





Go to Top of Page
   

- Advertisement -