SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Other SQL Server 2008 Topics
 Time out error
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

curiousxavier
Starting Member

India
1 Posts

Posted - 01/24/2013 :  11:46:52  Show Profile  Reply with Quote
I am facing performance issue.when i try to run a query it throws "Time out " but records are there in DB. It seems it is not able to delete/ or do the necessary action. please do give suggestions .

James K
Flowing Fount of Yak Knowledge

3724 Posts

Posted - 01/24/2013 :  12:42:04  Show Profile  Reply with Quote
Where are you running the query from? If it is from .Net code, there is a query timeout (and a connection timeout) that can cause this. The default value is 15 seconds if I am not mistaken. To see if that is the problem, you can try to run the same query from SSMS. Even so, if it takes 15 seconds or more, investigate why it is taking so long. It could be that the number of rows affected is very large (in which case, you could delete in smaller chunks), or may be that the rows/table is locked by some other process.
Go to Top of Page

jackv
Flowing Fount of Yak Knowledge

United Kingdom
2067 Posts

Posted - 01/24/2013 :  13:41:22  Show Profile  Visit jackv's Homepage  Reply with Quote
Some notes on troubleshooting slow running queries - http://www.sqlserver-dba.com/2012/11/sql-server-how-to-troubleshoot-a-slow-running-query.html

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page

srimami
Posting Yak Master

160 Posts

Posted - 02/05/2013 :  07:44:18  Show Profile  Reply with Quote
If the query is expected to give in more than the time out period, increase the default timeout and try firing the query again; this will work.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000