Groups | Blog | Home
all groups > sql server odbc > july 2004 >

sql server odbc : OLE DB Timeout Expired


Gregg Savage
7/19/2004 5:56:50 PM
I am getting a Timeout Expired message when executing a query against a
linked server. The query is basically "INSERT INTO local_table(...)
SELECT ... FROM table". When executed from Query Analyzer the query
takes about 34 seconds. When I run the query from my VB6SP5
application, I get the timeout. I have tried the setting the
CommandTimeout properties of the connection and command objects used:
(VB Code - MDAC 2.8)
[ADODB.Connection].CommandTimeout = 999999
[ADODB.Command].CommandTimeout = 999999

Am I missing some other place to configure the timeout? All of these
settings are in effect when the timeout occurs (always after 30 seconds).

Michael Otey
7/20/2004 8:02:33 AM
If you're using SQL Server 2000 you can specify a timeout value for
connections to a linked server
by using the sp_serveroption stored procedure in conjunction with the
'connect timeout' option.

Michael Otey

[quoted text, click to view]


AddThis Social Bookmark Button