473,320 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

strange query timeout

Hi everibody,
it's the first time i post on this newsgroup. I'm Stefano from Milano,
italy.
I'm a beginners with Sql2000. My problem is this.
I run a View using enterprise manager and after less then 20 second it goes
in error time out. I run this view using a VB application and the error
comes again .When i run it with Query Analyzer after 50 seconds it give me
the right result.
i've tried to change the value of querytimeout using sp_configure with the
same bad result.

i've tried to change the ado command timeout in visul basic but still
doesn't work.

any suggest ?

Thanks in advance
Jul 20 '05 #1
4 9726
Stefano (stefano.larosa@_Cancellatequesto.fastwebnet.it) writes:
I run a View using enterprise manager and after less then 20 second it
goes in error time out. I run this view using a VB application and the
error comes again .When i run it with Query Analyzer after 50 seconds it
give me the right result.
i've tried to change the value of querytimeout using sp_configure with the
same bad result.

i've tried to change the ado command timeout in visul basic but still
doesn't work.


The timeout is purely a client-side thing, so sp_configure is not going
to help you. (That one is for distributed queries, when the SQL Server is
the client to another server.)

QA has a query command which 0 by default, that is no timeout. Good boy.

EM has a default timeout of 30 seconds, and may be changeable, but maybe
not for everything.

In VB, the property .CommandTimeout is your man. But you may have to set
it both on the Connection object and the Command object. I believe that
the Command object does not inherit it from the Connection object.
--
Erland Sommarskog, SQL Server MVP, so****@algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #2
> Hi everibody,
it's the first time i post on this newsgroup. I'm Stefano from Milano,
italy.
I'm a beginners with Sql2000. My problem is this.
I run a View using enterprise manager and after less then 20 second it goes
in error time out. I run this view using a VB application and the error
comes again .When i run it with Query Analyzer after 50 seconds it give me
the right result.
i've tried to change the value of querytimeout using sp_configure with the
same bad result.

Hi Stefano,

It appears that the core problem is that the query takes too long.
Run it in Query Analyzer with the "show execution plan" enabled. The
execution plan will explain what MSSQL is doing. Optimizing queries is
a trial and error process. Good luck. - Louis
Jul 20 '05 #3
Yep, look for the timeout on your ADO components. This will override
the timeout settings from SQL (if smaller).
Jul 20 '05 #4
Correct. This is a big gotcha.

On Mon, 15 Dec 2003 23:22:29 +0000 (UTC), Erland Sommarskog
<so****@algonet.se> wrote:
the Command object does not inherit it from the Connection object.


Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: siggy2 | last post by:
Hi, I'm using Python 2.3.4 (#53, May 25 2004, 21:17:02) on win32 I've noticed a strange (= not deterministic) behaviour of ftplib.py: sometimes (not always) it fails (after a variable number of...
0
by: Philip.M.Collins | last post by:
It looks like mysql doesn't have the ability to set a query timeout. Is this true? So in the mean time I created the following perl DBI script to do it for me. #!perl # DBI service name use...
17
by: jensen bredal | last post by:
Hello, i'm struggling with a somehow badly understood session scenario. I provide acces to my pages based on form authentication using Session cookies. Som of my pages are supposed to be...
6
by: Gary | last post by:
I have an application that has been working just fine for a couple of years. It queries a SQL database and returns some formatted data back to the client. I have a new client, who has a larger...
0
by: ivb | last post by:
Hi all, I am using DB2 8.1.11.1 on NT with ASP.NET 1.1 When application make connection to database (via ADO.NET), it set "Connection timeout" parameter to 30 seconds. After, when my webpage...
1
by: traceable1 | last post by:
I have 2 SQL databases which are the same and are giving me different query plans. select s.* from hlresults h inner join specimens s on s.specimen_tk = h.specimen_tk where s.site_tk = 9 and...
1
by: msmith | last post by:
MSSQL Server 2000 SP3 in both houston and memphis I have a database in houston, lets call it RED. Specific tables from database RED are copied to database BLUE. Database BLUE is then backed...
17
by: Terry Olsen | last post by:
Given that variable dt = "3/31/2007", why does it produce the following exception on some machines? It works fine on my PC, but others have sent me this exception information because it threw up on...
0
by: adamalton | last post by:
I'm trying to investigate the way PHP behaves in relation to timeouts and included scripts. PHP seems to do very strange things when scripts that include other scripts timeout, or when the included...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.