BUG: Multiple threads Cause Connection Busy Error in the Driver 
Author Message
 BUG: Multiple threads Cause Connection Busy Error in the Driver

SQL 6.5 | ODBC 3.5

I've just run into the following error:

[Microsoft][ODBC SQL Server Driver]Connection is busy with results for
another hstmt

I found the following support doc on it on the ms support db:
http://www.*-*-*.com/

and

http://www.*-*-*.com/

I was wondering if anyone else has run into this problem and if ms has
created a fix for it yet or how you got around it.

Gary
--
Gary C. New "Web Development, SMIP Interactive"
___________________________________________________
Smip Interactive, Inc.          v 703.442.5210 x233
http://www.*-*-*.com/             f 703.442.5205  
___________________________________________________
http://www.*-*-*.com/  
Comics, advice, horoscopes and opinion - all the best in online
entertainment.



Sat, 23 Jun 2001 03:00:00 GMT  
 BUG: Multiple threads Cause Connection Busy Error in the Driver


Quote:
>SQL 6.5 | ODBC 3.5

>I've just run into the following error:

>[Microsoft][ODBC SQL Server Driver]Connection is busy with results for
>another hstmt

>I found the following support doc on it on the ms support db:
>http://support.microsoft.com/support/kb/articles/q175/9/04.asp?FR=0

>and

>http://support.microsoft.com/support/kb/articles/q175/3/13.asp?FR=0

>I was wondering if anyone else has run into this problem and if ms has
>created a fix for it yet or how you got around it.

Option 1: Use server cursors.  Problem:  There is a disasterous bug
with these in 6.x where the optimser goes crazy.  M$ has known about
this for 2 years (we proved it to them), but they decided not to fix
it until 7.0

Option 2: Use multiple connections - one for each active statement.

Ciao
Fuzzy
:-)



Sat, 23 Jun 2001 03:00:00 GMT  
 BUG: Multiple threads Cause Connection Busy Error in the Driver
On Thu, 7 Jan 1999 01:15:02 +0300, "Slava M. Usov"

Quote:

>Fuzzy,

>>Option 1: Use server cursors.  Problem:  There is a disasterous bug
>>with these in 6.x where the optimser goes crazy.  M$ has known about
>>this for 2 years (we proved it to them), but they decided not to fix
>>it until 7.0

>could you please expand on the nature of the bug? I think many people
>(myself included) will benefit from this information.

Essentially, the problem is this.  If a server cursor is specified as
the cursor type for a statement, and multiple active statements are
open on the connection, then the optimiser will, AT RANDOM, ignore the
existence of index(es) when determining the execution plan for this
new statement on that connection.  

(Yes, I know that's a weird combination of factors, but believe me, I
nearly lost my sanity over it)

For us, this meant a complex statement would run happily maybe 75% of
the time (e.g. in under 2 seconds), but other times would take 10
minutes or more.  (Table scans gallore!)

After tuning everything under the sun, we did some work with a few of
the SQL Server gurus from MS, and found the bug.

The problem seems to have been fixed in SQL Server 7.0 Beta 3.

Ciao
Fuzzy
:-)



Sun, 24 Jun 2001 03:00:00 GMT  
 BUG: Multiple threads Cause Connection Busy Error in the Driver
Fuzzy,

Quote:
>Option 1: Use server cursors.  Problem:  There is a disasterous bug
>with these in 6.x where the optimser goes crazy.  M$ has known about
>this for 2 years (we proved it to them), but they decided not to fix
>it until 7.0

could you please expand on the nature of the bug? I think many people
(myself included) will benefit from this information.

Thanks.

-- Slava
Please send any replies to this newsgroup.



Mon, 25 Jun 2001 03:00:00 GMT  
 BUG: Multiple threads Cause Connection Busy Error in the Driver
Fuzzy,

Quote:
>Essentially, the problem is this.  If a server cursor is specified as
>the cursor type for a statement, and multiple active statements are
>open on the connection, then the optimiser will, AT RANDOM, ignore the
>existence of index(es) when determining the execution plan for this
>new statement on that connection.

thanks for sharing. Argh, at least it does not do anything bad to the data,
and the right data are eventually returned. Most of us can (me thinks) live
with that... with waiting...

-- Slava
Please send any replies to this newsgroup.



Mon, 25 Jun 2001 03:00:00 GMT  
 BUG: Multiple threads Cause Connection Busy Error in the Driver
Thanks for the reply.  So MS hasn't reliesed a fix or a service pack
that addresses it?  I would really rather not have to reprog all my
code.

Gary

Quote:



> >SQL 6.5 | ODBC 3.5

> >I've just run into the following error:

> >[Microsoft][ODBC SQL Server Driver]Connection is busy with results for
> >another hstmt

> >I found the following support doc on it on the ms support db:
> >http://support.microsoft.com/support/kb/articles/q175/9/04.asp?FR=0

> >and

> >http://support.microsoft.com/support/kb/articles/q175/3/13.asp?FR=0

> >I was wondering if anyone else has run into this problem and if ms has
> >created a fix for it yet or how you got around it.

> Option 1: Use server cursors.  Problem:  There is a disasterous bug
> with these in 6.x where the optimser goes crazy.  M$ has known about
> this for 2 years (we proved it to them), but they decided not to fix
> it until 7.0

> Option 2: Use multiple connections - one for each active statement.

> Ciao
> Fuzzy
> :-)

--
Gary C. New "Web Development, SMIP Interactive"
___________________________________________________
Smip Interactive, Inc.          v 703.442.5210 x233
http://www.smip.com             f 703.442.5205  
___________________________________________________
http://www.creators.com  
Comics, advice, horoscopes and opinion - all the best in online
entertainment.


Mon, 25 Jun 2001 03:00:00 GMT  
 BUG: Multiple threads Cause Connection Busy Error in the Driver

Quote:
>Thanks for the reply.  So MS hasn't reliesed a fix or a service pack
>that addresses it?  I would really rather not have to reprog all my
>code.

>Gary




>> >SQL 6.5 | ODBC 3.5

>> >I've just run into the following error:

>> >[Microsoft][ODBC SQL Server Driver]Connection is busy with results for
>> >another hstmt

>> >I found the following support doc on it on the ms support db:
>> >http://support.microsoft.com/support/kb/articles/q175/9/04.asp?FR=0

>> >and

>> >http://support.microsoft.com/support/kb/articles/q175/3/13.asp?FR=0

>> >I was wondering if anyone else has run into this problem and if ms has
>> >created a fix for it yet or how you got around it.

>> Option 1: Use server cursors.  Problem:  There is a disasterous bug
>> with these in 6.x where the optimser goes crazy.  M$ has known about
>> this for 2 years (we proved it to them), but they decided not to fix
>> it until 7.0

>> Option 2: Use multiple connections - one for each active statement.

>> Ciao
>> Fuzzy
>> :-)

We encountered the same problem and discovered that if you use
SQL_CURSOR_KEYSET_DRIVEN the performance is consistently acceptable,
e.g. a simple SELECT that was taking 30 seconds to complete, due to the
bug, came down to < 0.01 second when SQL_CURSOR_KEYSET_DRIVEN was
employed.

--
Martin Curtis



Tue, 26 Jun 2001 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. BUG: Multiple threads Cause Connection Busy Error in the Driver

2. 0 [Microsoft][ODBC SQL Server Driver] Connection is busy with results for another hstmt

3. 0 [Microsoft][ODBC SQL Server Driver] Connection is busy with results for another hstmt

4. Printer Busy error when printing multiple documents

5. Connection Busy Error

6. ADO Error (Connection is busy with results for another hstmt)

7. DSN less connection to server error IM012 Driver keyword syntax error

8. Event fired in a thread cause error

9. Marshalled ADODB.Connection object causes error

10. DAO bug: can't have multiple connections to same database

11. threading - Multiple threads returning values at same time

12. Bug in Remote Scripting Caused by Javascript bug?

 

 
Powered by phpBB® Forum Software