473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

DTC Distributed transaction completed Issue | Multiple updates in

I am performance testing some batch processing engines. These are written in
..NET and SQL Server and are typically concerned with generating XML files out
of data retrieved from the database.

I have two machines one running IIS Server and the other SQL Server.

Problem Description:

One of the engines is failing with the following exception:

Exception: System.Data.SqlClient.SqlException
Message: Distributed transaction completed. Either enlist this session in a
new transaction or the NULL transaction.

Source: .Net SqlClient Data Provider
at System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
This engine does multiple hits in the database during processing. It runs
successfully if the data is not huge. When run on peak data, the engine fails
and gives the above mentioned exception (increase in data increases the
database hits manifold)
Steps Already Taken:

1. Checked that SQL Server 2000 service pack 3 (sql2ksp3.exe) is installed.
(Microsoft site refers to the problem with distributed transactions in SQL
Server 2000 due to which the above mentioned exception comes up and asks to
install service pack 3 to fix it)

2. Found out that it’s not a code defect. This is because if the engine is
run multiple times, each time the exception comes up at different places
(evident from the logs)

3. Checked that the transaction log file is not getting full. Unrestricted
growth option is selected.

I have noticed that it’s the number of updates happening in the same
transaction which is probably causing this issue. The engine is performing
huge number of updates on a couple of tables and most of the times the engine
fails after same number of updates.

Is there any limitation on the number of database hits per transaction? In
the .NET code, we have used the following code to start/end transaction which
is called at the start/end of DB update.

private void StartTransaction()
{
ServiceConfig config = new ServiceConfig();
config.Transaction = TransactionOption.Required;
ServiceDomain.Enter(config);
}

private void AbortTransaction()
{
if(ContextUtil.IsInTransaction)
{
ContextUtil.SetAbort();
}
ServiceDomain.Leave();
}

private void CompleteTransaction()
{
if(ContextUtil.IsInTransaction)
{
ContextUtil.SetComplete();
}
ServiceDomain.Leave();
}

Do you find anything wrong with this?

If anyone has pointers to fix this issue please reply back.

Jul 21 '05 #1
0 1767

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Tim Callaghan | last post by:
We have an inhouse replication process which is causing us headaches when we try to run more than one copy of it against the same target database (we support unlimited remote databases so we may...
7
by: Richard Maher | last post by:
Hi, I am seeking the help of volunteers to test some software that I've developed which facilitates distributed two-phase commit transactions, encompassing any resource manager (e.g. SQL/Server...
2
by: Jo Siffert | last post by:
Hi all, I would like to perform an INSERT INTO LINKEDSVR.dbo.xyz.abc SELECT ... FROM dbo.dfg where LINKEDSVR is a linked server on another machine. Both servers are running SQLServer 2000...
8
by: Alex | last post by:
Hi, I have a test system that is setup the same as a production system and would like to frequently copy the database over. pg_dump takes a few hours and even sometimes hangs. Are there any...
3
by: Ollie Riches | last post by:
"Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction." I am recieving the above error when attempt to access a remote sql server database...
15
by: Zeng | last post by:
Hi, The bigger my C# web-application gets, the more places I need to put in the tedious retrying block of code to make sure operations that can run into database deadlocks are re-run (retried)...
0
by: Manoj Sharma | last post by:
I am performance testing some batch processing engines. These are written in ..NET and SQL Server and are typically concerned with generating XML files out of data retrieved from the database. I...
2
by: Dan Kelley | last post by:
I have 2 services, ServiceA and ServiceB. Certain user driven functions require ServiceA to perform some DB tasks, before sending a request to ServiceB to perform some additional tasks. If ServiceB...
0
ayanmitra2007mindtree
by: ayanmitra2007mindtree | last post by:
Dear Community Members, Ours is a Windows Application where we are using Remoting to connect our application server (running as a Windows Service). We are using SQL Server 2000 SP3 as database. At...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.