Distributed transaction timeout problem

  • 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 a certain instance while performing a huge transaction (when our application updates some 9000+ records) we are getting the following error:

    [font="Courier New"] at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)

    at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)

    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)

    at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)

    at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)

    at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)

    at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)

    at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)

    at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()

    *** Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction. ---[/font]

    The application is basically running on Windows 2003 SBS. This problem has started coming only after all the systems were upgraded to Service pack 2 (without this SP there is no problem). The moment the user uninstalls this service pack, the process is getting completed without any problem.

    I understood that this problem is something to do with MS DTC and accordingly updated the Timeout to 600 sec (10 Min) but the problem is not resolved.

    Have you faced this problem and found a solution please let me know immediately. I am waiting anxiously for your answer.

    Regards

    Ayan

    Please consider environment before printing this message 🙂

  • Can you provide the code that is performing the update, both .NET and SQL?

    Have you tried running the update outside the .NET application?

    Have you tried running Profiler when doing this update to see what is happening?

    Please see the links in my signature to see how to post to get better answers.

  • Dear Jack,

    We are making use of System.EnterpriseServices for distributed transaction. We have an assembly which perfroms this task. We have a class inside this assembly which is marked as

    [font="Courier New"]Transaction(TransactionOption.Required, Timeout:=0)[/font]

    This calls the functions of DAL to do actual postings in the database.

    The method inside this assembly, which calls the DAL is marked as

    [font="Courier New"]AutoComplete(True)[/font]

    Our DAL layer opens a connection, does the transaction and finally closes it.

    I have not checked the execution in profiler, however I know that we are calling an SP which simply takes the field values as parameter and inserts it in the table.

    Few more observations:

    1) The exactly same piece of process is running without any problem in Windows 2000 server SP3. But the process with (exactly identical deployment) is giving this error both in Windows 2003 SBS SP2 and Windows XP (all SPs).

    2) If I attempt to run the same process for inserting lesser than 5000 records the process is getting completed without any problem even in Wind2003 and XP.

    Regards

    Ayan

    Please consider environment before printing this message 🙂

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply