Re: ADO - Bad when it is time to Optimize
- From: "Ralph" <nt_consulting64@xxxxxxxxx>
- Date: Sat, 10 Mar 2007 21:32:28 -0600
"Stephen Howe" <stephenPOINThoweATtns-globalPOINTcom> wrote in message
news:OHo7vi0YHHA.4988@xxxxxxxxxxxxxxxxxxxxxxx
cursors.We have a situation where SQL server gets slow in processing requests
due to some contention issues and at that point I can see the User
Connections shooting up.
You ought to bear in mind that SQL Server is such that you can only have
_ONE_ active Server-sided, ForwardOnly cursor per-connection.
You cannot have 2 or more for the same connections. You can have multiple
types of other cursors. Just not 2 active Server-sided, ForwardOnly
It is a SQL Server limitation.connection
And I beleive, but not checked it out, that ADO will duplicate a
just to give you your 2nd Server-sided, ForwardOnly cursor.
I use Server-sided, ForwardOnly cursor a lot, but I tend to use them
serially so I dont run into this limitation.
Stephen Howe
A good point, as it illustrates one of the many ways it is to miss-use
connections and not even realize it. Another common mistake is to create a
disconnected recordset from a Server-Side cursor, or temporary stored
procedure.
It is rare that one doesn't find opportunities within the code whenever you
run into what appears to be 'connection pool' problem.
-ralph
.
- Follow-Ups:
- Re: ADO - Bad when it is time to Optimize
- From: cvsudheer
- Re: ADO - Bad when it is time to Optimize
- References:
- ADO - Bad when it is time to Optimize
- From: cvsudheer
- Re: ADO - Bad when it is time to Optimize
- From: Bob Barrows [MVP]
- Re: ADO - Bad when it is time to Optimize
- From: cvsudheer
- Re: ADO - Bad when it is time to Optimize
- From: Stephen Howe
- ADO - Bad when it is time to Optimize
- Prev by Date: Re: ADO - Bad when it is time to Optimize
- Next by Date: Re: ADO - Bad when it is time to Optimize
- Previous by thread: Re: ADO - Bad when it is time to Optimize
- Next by thread: Re: ADO - Bad when it is time to Optimize
- Index(es):
Relevant Pages
|
|