Solved

MS SqlServer 2008 R2 "Query Timeout Expired"

Posted on 2013-12-10
1
7,713 Views
Last Modified: 2013-12-11
I have a query that runs a remote machine.  It queries our DB for approx 145 rows of data and when run locally in the management console on the server it takes about 45 seconds to complete. We use this for our AR statements.  When I look at the Sql Server Connections property, the "Remote Query Timeout" value = 600.  When I run the query from the remote server using an ODBC driver I get the following message: Sql error: ERROR [HYT00][Microsoft][Sql Server Native Client 10.0]Query timeout expired.
Any help would be appreciated.
0
Comment
Question by:Daves166
1 Comment
 
LVL 39

Accepted Solution

by:
lcohan earned 300 total points
Comment Utility
You can set the connection timeout by setting the SQL_ATTR_CONNECTION_TIMEOUT connection attribute with SQLSetConnectAttr.

You can set the statement query timeout by setting the SQL_ATTR_QUERY_TIMEOUT statement attribute with SQLSetStmtAttr().

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

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now