SqlBulkCopy Timeout when used within a WCF Sercive that sets TransactionScopeRequired

c# msmq sqlbulkcopy transactionscope wcf

Question

Situation: TransactionScopeRequired OperationBehavior WCF Service. A process that inserts several rows into a database using SqlBulkCopy is conducted by WCF Service.

SqlBulkCopy successfully inserts records when used without the TransactionScopeRequired behavior, however when this behavior is set to true, not even a modest number of records can be placed.

More details - The MSMQ Endpoint is used by the WCF Service.

1
0
1/23/2014 9:02:37 PM

Accepted Answer

Okay, I apologize for posting this so late. :)

After further research (I'm embarrassed to write this! The Task Processing Library was used to create my service, thus I had numerous processes performing DB requests wrapped inside of a TransactionScope, for example.

-The first process acts on the database. This operation resulted in a database lock and appended a transaction to the transactionscopes transaction.

A second process is subsequently launched, however it is unable to write to the same table since the transaction was not included in the first transaction scope.

The best way to offer improved transaction management is to redesign.

0
1/25/2014 11:58:50 AM


Related Questions





Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow