tags:

views:

307

answers:

2

I have a WCF based web service hosted in windows sever 2003 machine. The database is Oracle 10G on solaris. The web service uses transactionscope extensively and ado.net transactions in some places. Most of the transactions involve only one resource (multiple oracle stored proc calls). Some of them are two resources (MSMQ and oracle stored proc). Given this does network DTC has to be enabled on the windows machine. It already has MSDTC service started. There is no transaction flow from web service client to the web service. It seems to work without network DTC enabled but I want to be sure.

The platform is .Net 2.0 SP1 + 3.0 (for WCF). Oracle driver is ODP.Net v11.1.0.6

A: 

If the client transactions are not flowing or if there are no multiple durable resources the transaction manager the transaction will not be promoted to distributed transaction.

You can check the transaction identifiers by accessing the TransactionInformation property of the Transaction class.

This class has DistributedIdentifier property. DistributedIdentifier would be Guid.Empty if the transaction is not promoted to a distributed transaction.

In my case multiple resources are involved. MSMQ and Oracle. I checked that DistributedIdentifier is valid GUID.
Pratik
When you do not enable network DTC access on the server, applications can only use transactions that stay on the local computer. I can think of couple of tests to determine this in your case. Write a service method that involves making a persistent transaction to MSMQ and database in that order and fail the database transaction. Check to see whether MSMQ transaction is rolled backDo another test by reversing the order of operations and fail the MSMQ operation, this time database trasaction should roll back.
I had already done those tests and the transactions rollback in either case (with network DTC turned off). But I just wanted to be sure.
Pratik
A: 

My beleive is that Network DTC doesn't need to be enabled. The only requirement is that both MSDTC and OracleMTSRecoveryService services are started. I can view transactions happening using the DTC component services viewer control panel app.

Pratik