473,544 Members | 1,369 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 9734
Stefano (stefano.larosa @_Cancellateque sto.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
2225
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 minutes from 15 to 130) downloading a 150 MB BINARY file (a big gzipped ascii file) with the traceback reported below. IMVHO this is not a...
0
9423
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 constant DSN => "dbi:mysql:ABC:localhost"; # database username
17
5177
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 running continuously and refreshing once an hour. I there set timeout= 61 in <sessionState section and on my page it says <meta http-equiv="refresh"...
6
1688
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 database than any of our previous customers. For example, the query to build the datatable now takes about 2 minutes instead of one minute or less....
0
3559
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 requests database, and query execution time exceeds 30 seconds, the following error reported: ===
1
2544
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 s.location in ('ABC','WIAD') and s.date_collected between '2/1/2003' and '2/3/2006' order by s.location, s.date_collected
1
3463
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 up, ftp'd to memphis and restored. In memphis there is a single table in this database that will not open in enterprise manager when you choose to...
17
2256
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 their PC. DLDT.Columns("Date").DataType = GetType(Date) dr.Item("Date") = Date.Parse(dt.Trim).ToShortDateString System.ArgumentException: The...
0
1524
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 scripts themselves timeout. Just wondering if anyone else has ever investigated this world of mystery, or if they would like to join me in my quest...
0
7368
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7610
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7774
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7381
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7712
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
4920
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3418
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
989
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
667
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.