Re: deadlocks when fetching
From: David Gugick (davidg-nospam_at_imceda.com)
Date: 02/28/05
- Next message: Aaron [SQL Server MVP]: "Re: Need Max date?"
- Previous message: Tibor Karaszi: "Re: Restore Database problem"
- In reply to: Erik Knudsen: "Re: deadlocks when fetching"
- Next in thread: Uri Dimant: "Re: deadlocks when fetching"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 28 Feb 2005 12:18:33 -0500
Erik Knudsen wrote:
> Andrew J. Kelly wrote:
>
>> It sounds like you are using a server side cursor. Have you tried
>> using a client side cursor instead?
>
> We basically use (ODBC):
> ---------------------
> 1. SQLAllocStmt()
> 2. SQLExecDirect()
> 3. SQLFetch() (repetedly)
> 4. SQLFreeStmt()
> ---------------------
>
> We don't explicitly use cursors, and we don't want to because some of
> our supported DBMS's don't support it.
>
> I'd like to force the deadlock to happen at SQLExecDirect() or not at
> all. I guess that would involve setting some stricter (not as
> optimistic) locking policy or something. Any ideas?
>
>
> Regards,
> Erik Knudsen
Not sure if this is related, but I believe SQLAllocStmt() has been
replaced with SQLAllocHandle(). In addition SQLFreeStmt() is not
recommended in ODBC 3.0 and later (replaced with SQLFreeHandle I think).
But as Andrew mentioned, check your cursor type. probably fastest to use
a forward-only, read-only, firehose cursor with ODBC. These types of
"cursors" are not cursors in the strictest sense. They are analogous to
SQL Server generating a result set (as it normally does) and pulling
that information into the application using ODBC.
-- David Gugick Imceda Software www.imceda.com
- Next message: Aaron [SQL Server MVP]: "Re: Need Max date?"
- Previous message: Tibor Karaszi: "Re: Restore Database problem"
- In reply to: Erik Knudsen: "Re: deadlocks when fetching"
- Next in thread: Uri Dimant: "Re: deadlocks when fetching"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|