query time outs! please help

query time outs! please help

Post by ramy » Tue, 26 Mar 2002 16:35:15



iam trying to run this following query for within EM
select count(*) from tablename

it gives me the following error.
microsoft[odbc sql server driver] timeout expired

i have set the time out options to 0 in EM server
properties, but still no luck. The same query runs fine in
sql query anlayzer. but fails with the same error if tried
within ado application. this table contains 50,00,000 rows.

please if any one has a soln kindly help

 
 
 

query time outs! please help

Post by Mark Alliso » Tue, 26 Mar 2002 18:05:45


Why on earth do you want 50,000,000 rows returned through
ADO? What are you trying to accomplish?

You can set a time-out period by using the
ConnectionTimeout property of the Connection object. See
here for further info:
http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/ado270/htm/mdobjconnection.asp

Mark.
www.allisonmitchell.com

Quote:>-----Original Message-----
>iam trying to run this following query for within EM
>select count(*) from tablename

>it gives me the following error.
>microsoft[odbc sql server driver] timeout expired

>i have set the time out options to 0 in EM server
>properties, but still no luck. The same query runs fine
in
>sql query anlayzer. but fails with the same error if
tried
>within ado application. this table contains 50,00,000
rows.

>please if any one has a soln kindly help
>.


 
 
 

query time outs! please help

Post by Connor L » Wed, 27 Mar 2002 18:43:09


Hi ,

In regards to your question, I offer you the following answer:

The SEM's default for QueryTimeout is 30 seconds, and the timeout value is
not
configurable.

To avoid this happen again, the only choice you have is:
Do not open long running queries from the SEM.
Run the query from Query Analyzer instead of SEM.

For more detail information, you can check the article at
http://support.microsoft.com/support/kb/articles/q247/0/70.asp

Please let me know if this resolves your problem or if you have additional
questions.  

I look forward to hearing from you.

Connor Liu
Microsoft Partner Support

This posting is provided 'AS IS' with no warranties, and confers no rights.
Get Secure! - www.microsoft.com/security
----------------------------------