Re: SQLEXEC(liHandle, "BEGIN TRANSACTION") makes my apps hang.

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Remus Rusanu (remusronline_at_no.spam)
Date: 09/02/04


Date: Thu, 2 Sep 2004 11:50:26 -0700

BEGIN TRANSACTION should never block.
You can use Query Analyzer to look up why is your statement blocking. sp_who
should tell you if the app connection is blocked behind some other
transaction.

HTH,
~ Remus

"Willianto" <willianto@remove-me.telkom-and-me.net> wrote in message
news:ORS9SGRkEHA.3072@TK2MSFTNGP10.phx.gbl...
> Hi all,
>
> I was in my client today. My apps had this problem that after the user
> delete any payment transaction, the apps would go hang. The apps is
> using SQL Server as the backend database, so it was quite confusing. I
> tried to trace the SQL Server, but the log entry is like French to me.
> Anyway, to make the story short (about two hours shorter), I found out
> that the cause was I implicitly put SQLEXEC(liHandle, "BEGIN
> TRANSACTION") before all the deletion began. OTOH, on the form's init, I
> already give SQLSETPROP(liHandle, "Transactions", 2). This command would
> set the connection such that it will require SQLCOMMIT( ) or
> SQLROLLBACK( ) to handle the transaction. I deleted the BEGIN
> TRANSACTION command, and everything back to normal.
>
> Anybody care to give an insight-behind-the-scene story?
>
> TIA,
> Willianto
>
>



Relevant Pages

  • Re: precise characterization of ext3 atomicity
    ... >>without changing the userspace apps? ... If the app doesn't eventually say "end the transaction", the filesystem might ... but I'm guessing that apps which use this interface depend on ...
    (Linux-Kernel)
  • Re: eternal lock?
    ... Restarting the apps doesn't solve the problem, ... To wit, if a query times out, and there is a transaction in progress, ... query batch, or started within the query batch that timed out. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (comp.databases.ms-sqlserver)
  • SQLEXEC(liHandle, "BEGIN TRANSACTION") makes my apps hang.
    ... the apps would go hang. ... TRANSACTION") before all the deletion began. ... TRANSACTION command, ... Anybody care to give an insight-behind-the-scene story? ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Transaction Isolation Level
    ... This means that while I initiate a transaction selecting all new orders it ... My query is executed on a SQL server 2005. ... the isolation level you should use is snapshot isolation. ...
    (comp.databases.ms-sqlserver)
  • Re: Windows Completely Locks Up!! FREEZE
    ... failing to start/run the Distributed Transaction Coordinator. ... Error Specifics: ... The Business Contact Manager SQL Server Startup Service service terminated ... The service did not respond to the start or control request in a timely ...
    (microsoft.public.windowsxp.general)