# Miscellaneous > General Database Discussions >  [Microsoft][ODBC SQL Server Driver]Timeout Expired

## Joyce

I am running a query which pulls back about 200,000 records.

When I run this in ISQL (SQL Server 6.5), it runs in almost 2 minutes. 
When I put it in a store procedure and run it off my ASP application, I
get this error

[Microsoft][ODBC SQL Server Driver]Timeout Expired

We&#39;ve tried many things including:
1) Increased connection and command time outs in Global ASA
2) Have the ODBC driver log long Quires to a file
3) Changed Query Time out in Enterprise Manager(360 seconds) Go to
tools --> Preferences/configure -->Connection Tab
4) Changed Maximum allowed open database from 20 to 200
5) Changed resource timeout to 360 seconds from 5 seconds
6) Changed remote query timeout to 0, allowing infinite wait.

What else can we try???

Thanks for taking the time to read this
Joyce

----------


## Cindy Gross

Are you using named pipes?  Microsoft recommends TCPIP Sockets for web applications.  Something to do with the queuing of network requests.


------------
Joyce at 8/19/99 2:44:38 PM

I am running a query which pulls back about 200,000 records.

When I run this in ISQL (SQL Server 6.5), it runs in almost 2 minutes. 
When I put it in a store procedure and run it off my ASP application, I
get this error

[Microsoft][ODBC SQL Server Driver]Timeout Expired

We&#39;ve tried many things including:
1) Increased connection and command time outs in Global ASA
2) Have the ODBC driver log long Quires to a file
3) Changed Query Time out in Enterprise Manager(360 seconds) Go to
tools --> Preferences/configure -->Connection Tab
4) Changed Maximum allowed open database from 20 to 200
5) Changed resource timeout to 360 seconds from 5 seconds
6) Changed remote query timeout to 0, allowing infinite wait.

What else can we try???

Thanks for taking the time to read this
Joyce

----------


## JohnF

I know this is going to sound...weak, but try upgrading to MDAC 2.1 on the WEB/IIS server.  After doing that, you might want to try creating a single DSN on the Web server to point to your database and configure it to use TCP/IP Sockets only...even though you are not using ODBC to connect to your database, I&#39;ve seen these things fix issues like this...

Good luck.

------------
Cindy Gross at 8/21/99 9:55:57 AM

Are you using named pipes?  Microsoft recommends TCPIP Sockets for web applications.  Something to do with the queuing of network requests.


------------
Joyce at 8/19/99 2:44:38 PM

I am running a query which pulls back about 200,000 records.

When I run this in ISQL (SQL Server 6.5), it runs in almost 2 minutes. 
When I put it in a store procedure and run it off my ASP application, I
get this error

[Microsoft][ODBC SQL Server Driver]Timeout Expired

We&#39;ve tried many things including:
1) Increased connection and command time outs in Global ASA
2) Have the ODBC driver log long Quires to a file
3) Changed Query Time out in Enterprise Manager(360 seconds) Go to
tools --> Preferences/configure -->Connection Tab
4) Changed Maximum allowed open database from 20 to 200
5) Changed resource timeout to 360 seconds from 5 seconds
6) Changed remote query timeout to 0, allowing infinite wait.

What else can we try???

Thanks for taking the time to read this
Joyce

----------

