BEGIN TRAN and COMMIT TRAN from a three tier system

BEGIN TRAN and COMMIT TRAN from a three tier system

Post by Pankaj Kuma » Thu, 06 Feb 2003 17:43:12



Hello All,

We have a three tier application; the back-end being
SQLServer, the front-end being a Java application and the
middle-tier being a web-logic server.

The users enter data via the Java application. Yesterday,
I was going through the profiler when I came across
something. I noticed that for every transaction, it puts
another dummy transaction,ie, in the example shown below,
BEGIN TRAN -- usp_Booking_Insert -- COMMIT TRAN is one and

Now, I dont know why it introduces the second transaction.
I noticed that it consumes about 16ms in the profiler.
Since our application is an OLTP application, I'm worried
because next month we will adding another 100 users.

I would really appreciate some help from others.

Thanks,
rgn

BEGIN TRAN



 
 
 

BEGIN TRAN and COMMIT TRAN from a three tier system

Post by SQL Server Development Team [MSFT » Thu, 06 Feb 2003 20:38:02


Pankaj:

Can you send the script of the transaction run by the application? Is there
any error handling in your application that looks for active transactions,
which is what Profiler could be reporting?

Sunil Agarwal
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.


> Hello All,

> We have a three tier application; the back-end being
> SQLServer, the front-end being a Java application and the
> middle-tier being a web-logic server.

> The users enter data via the Java application. Yesterday,
> I was going through the profiler when I came across
> something. I noticed that for every transaction, it puts
> another dummy transaction,ie, in the example shown below,
> BEGIN TRAN -- usp_Booking_Insert -- COMMIT TRAN is one and

> Now, I dont know why it introduces the second transaction.
> I noticed that it consumes about 16ms in the profiler.
> Since our application is an OLTP application, I'm worried
> because next month we will adding another 100 users.

> I would really appreciate some help from others.

> Thanks,
> rgn

> BEGIN TRAN





 
 
 

BEGIN TRAN and COMMIT TRAN from a three tier system

Post by Gopinath Raje » Thu, 06 Feb 2003 22:12:31


Hello Sunil,

Thanks for asking. Please email me your email id and I
shall send you the trace file itself.

Thanks,

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

 
 
 

BEGIN TRAN and COMMIT TRAN from a three tier system

Post by Ron Talmag » Fri, 07 Feb 2003 07:57:24


Rgn,

Perhaps the driver you're using is sending the extra transaction. Is it
JDBC?

Ron
--
Ron Talmage
SQL Server MVP


> Hello All,

> We have a three tier application; the back-end being
> SQLServer, the front-end being a Java application and the
> middle-tier being a web-logic server.

> The users enter data via the Java application. Yesterday,
> I was going through the profiler when I came across
> something. I noticed that for every transaction, it puts
> another dummy transaction,ie, in the example shown below,
> BEGIN TRAN -- usp_Booking_Insert -- COMMIT TRAN is one and

> Now, I dont know why it introduces the second transaction.
> I noticed that it consumes about 16ms in the profiler.
> Since our application is an OLTP application, I'm worried
> because next month we will adding another 100 users.

> I would really appreciate some help from others.

> Thanks,
> rgn

> BEGIN TRAN




 
 
 

BEGIN TRAN and COMMIT TRAN from a three tier system

Post by Gopinath Raje » Fri, 07 Feb 2003 08:32:06


Hello Ron,

Yes. THe weblogic EJB's are written to connect using
JDBC.

THanks,
rgn

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

 
 
 

1. Help: multiple calls and 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. property Cells[a,b] to DBGrid ?

3. Begin, Commit tran - tran count not matched

4. Securing a Jet database

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

6. DTS - Retaining a Field Value for Each Record

7. Begin Tran-Commit Tran

8. Error 21036: Another Distribution Agent for the subscription(s) is running

9. begin tran / commit tran

10. begin tran and commit tran

11. begin/end begin tran/commit in while

12. Begin Tran / Commit in ASP?

13. Performance realted to begin/commit tran