OLE DB Blows Out BEGIN TRAN

OLE DB Blows Out BEGIN TRAN

Post by Steve Mille » Fri, 20 Sep 2002 03:10:28



Looking at Profiler, we are looking at

    Audit Login
    BEGIN TRAN
    Audit Logout
    Error: Commit doesn't have a corresponding Begin Tran.

The logout (session/connection disconnect) apparently

We have looked long and hard at how to keep SQL Server
from automatically logging us in and out of a session like
that. We're trying a couple of solutions, but any hints
would be welcome.

Steve

 
 
 

OLE DB Blows Out BEGIN TRAN

Post by TS » Sat, 21 Sep 2002 03:25:09


What does your code that handles the transaction look
like?  It may be doing something to cause the audit logout.

>-----Original Message-----
>Looking at Profiler, we are looking at

>    Audit Login
>    BEGIN TRAN
>    Audit Logout
>    Error: Commit doesn't have a corresponding Begin Tran.

>The logout (session/connection disconnect) apparently

>We have looked long and hard at how to keep SQL Server
>from automatically logging us in and out of a session
like
>that. We're trying a couple of solutions, but any hints
>would be welcome.

>Steve
>.


 
 
 

OLE DB Blows Out BEGIN TRAN

Post by Steve Mille » Sat, 21 Sep 2002 23:11:51


The code is C. Trying to get all the files together to
post would take some work. We've done a couple days of
tests, and we're pretty sure the problem on the front end.

The problems we're seeing look much like the bug reported
in KB Q191268. ms-
help://MS.VSCC/MS.MSDNVS/kboledb/Source/oledb/q191268.htm  
I went through all our code yesterday looking for open
cursors. Found four. Closing and deallocating them didn't
have any affect on this bug. <sigh>

SQL Server starts isolating SQL code in their own
connections after one particular stored procedure is
fired. One connection after another is opened and closed.
I'm going to start looking at it this morning.

Steve

>-----Original Message-----
>What does your code that handles the transaction look
>like?  It may be doing something to cause the audit
logout.

>>-----Original Message-----
>>Looking at Profiler, we are looking at

>>    Audit Login
>>    BEGIN TRAN
>>    Audit Logout
>>    Error: Commit doesn't have a corresponding Begin
Tran.

>>The logout (session/connection disconnect) apparently

>>We have looked long and hard at how to keep SQL Server
>>from automatically logging us in and out of a session
>like
>>that. We're trying a couple of solutions, but any hints
>>would be welcome.

>>Steve

 
 
 

OLE DB Blows Out BEGIN TRAN

Post by Steve Mille » Tue, 24 Sep 2002 22:32:04


The problem was in the C++ code! Ha!

Steve

>-----Original Message-----
>Looking at Profiler, we are looking at

>    Audit Login
>    BEGIN TRAN
>    Audit Logout
>    Error: Commit doesn't have a corresponding Begin Tran.

>The logout (session/connection disconnect) apparently

>We have looked long and hard at how to keep SQL Server
>from automatically logging us in and out of a session
like
>that. We're trying a couple of solutions, but any hints
>would be welcome.

>Steve
>.

 
 
 

1. Help: simultaneous calls of a SP containing BEGIN TRAN....COMMIT TRAN

Hi,

I have a stored procedure sp_A that contains BEGIN TRAN....COMMIT TRAN.

What I understand is that the tables inside the BEGIN TRAN....COMMIT TRAN
block will be locked completely during the execution of sp_A (my
understanding could be wrong).
That means no other process can write to those tables used in this block
until sp_A
finishes.

In such case, if there are multiple processes call sp_A during
simultaneously, what
will happen? Since sp_A can only run for one process at a time, will the
others calls
be put in a queue in SQL Server or get a error message?

Plus, will the following process lock a single row or the whole table?
   UPDATE Book
   SET bookName='SQL Server Programming'
   WHERE bookID=123
And, will it be rollback automatically if it fails?

Thank you

hb

2. Gemstone OODB Info Sought

3. Begin Tran-Commit Tran

4. Restore Problem

5. BEGIN TRAN and COMMIT TRAN from a three tier system

6. JDBC/OCI8 driver on Linux

7. begin tran / commit tran

8. JDBC Blob

9. begin tran and commit tran

10. Begin, Commit tran - tran count not matched

11. Help: multiple calls and BEGIN TRAN....COMMIT TRAN

12. begin/end begin tran/commit in while

13. Begin Tran error on NT WS but OK on 95/98