msdtc

Is Active Directory transaction-aware?

可紊 提交于 2019-12-03 06:00:45
Simple question but I can't find the answer anywhere: is Active Directory transaction-aware? In other words, will the following change be rolled back (since I didn't call scope.Complete() ): using (var scope = new TransactionScope()) { DirectoryEntry entry = ...; entry.Properties["givenName"].Value = "New Given Name"; entry.CommitChanges(); } If not, is it possible to enable this somehow? Right now I have code that performs database updates and corresponding AD updates and I have compensating logic for the AD updates if they somehow fail. This solution is far from optimal. Kind regards, Ronald

MSDTC - how many ports are needed

若如初见. 提交于 2019-12-03 05:41:06
I have a considerably large application that uses MSDTC. How many ports should I open? Is there any way to determine it? EDIT: I know what ports I need to open, I don't know how many I need. I think Migol wants to know how big the range of the RPC dynamic port allocation should be. In the KB they mention a minimum of 100 ports Furthermore, previous experience shows that a minimum of 100 ports should be opened, because several system services rely on these RPC ports to communicate with each other. So I would design a benchmark application to test different values of your dynamic range. When we

How do distributed transactions behave with multiple connections to the same DB in a threaded environment?

落爺英雄遲暮 提交于 2019-12-03 03:33:19
I’m trying to determine the behaviour of multiple database connection in a distributed transaction. I’ve got a long running process which spawns a series of threads and each thread is then responsible for managing its’ DB connections and such. All of this runs inside of the transaction scope and each thread is enlisted in the transaction via a DependentTransaction object. When I went to put this process in parallel I ran into a few issues, namely that there appears to be some sort of block preventing the queries from executing at the same time on the transaction. What I would like to know is

Integrity of my transaction is lost with “TransactionInDoubtException” exception

二次信任 提交于 2019-12-02 13:19:06
问题 I have a code that tries to insert entries scoped in a MSDTC transaction and if there is insert failure then insertion is retried up to a specific threshold. Here is the code: while(!SaveToDb){ ....... Thread.Sleep(TimeSpan.FromMinutes(AppConfiguration.RetryInsertionDuringFailureIntervalInMin)); } private bool SaveToDb() { try { ...... using (var scope = new TransactionScope(TransactionScopeOption.Required, option)) { Context.SaveEmail(_emailInfoList); Context.SaveSyncState(syncState); scope

Integrity of my transaction is lost with “TransactionInDoubtException” exception

╄→гoц情女王★ 提交于 2019-12-02 07:18:44
I have a code that tries to insert entries scoped in a MSDTC transaction and if there is insert failure then insertion is retried up to a specific threshold. Here is the code: while(!SaveToDb){ ....... Thread.Sleep(TimeSpan.FromMinutes(AppConfiguration.RetryInsertionDuringFailureIntervalInMin)); } private bool SaveToDb() { try { ...... using (var scope = new TransactionScope(TransactionScopeOption.Required, option)) { Context.SaveEmail(_emailInfoList); Context.SaveSyncState(syncState); scope.Complete(); return true; } } catch (Exception ex) { ........ return false; } } And there is this

SQL Server and TransactionScope (with MSDTC): Sporadically can't get connection

岁酱吖の 提交于 2019-12-02 03:46:33
问题 I've written some tests for .net code that invokes calls to my SQL Server. It appears that using System.Transactions is an excellent choice for rolling back any modifications to the database that result. I'm aware that some purists would suggest that I might want to mock the database, but I'm not going down that road; this is not strictly pure unit-testing. When I write and run several tests, this works exactly as expected. I simply put the code to initialize and abort .net transactions in

Opening a DbContext connection within an existing SqlConnection

﹥>﹥吖頭↗ 提交于 2019-12-01 21:23:40
问题 I'm interested if opening an Entity Framework's DbContext connection within an existing ADO.NET SqlConnection should be discouraged, provided that they both use the same connection string, i.e. operate on the exactly same database? For example: using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, new System.TimeSpan(0, 30, 0))) { using (SqlConnection connection = new SqlConnection(connectionString)) { connection.Open(); DoStuffWithEF(connectionString); ... } }

How to detect that rollback has occurred?

爷,独闯天下 提交于 2019-12-01 16:12:03
I'm hunting down a bug in a large business application, where business processes are failing but partially persisted to the database. To make things harder to figure out, the process fails only once every few weeks, with hundreds of thousands successfully processed between every failure. The error frequency seems to go up when concurrency/number of worker processes goes up. So far, we've been able to recreate what we're seeing with this program. (.NET 4.7.1 framework) using (var transactionScope = new TransactionScope(TransactionScopeOption.RequiresNew)) { using (var sqlConnection = new

How to detect that rollback has occurred?

寵の児 提交于 2019-12-01 15:04:37
问题 I'm hunting down a bug in a large business application, where business processes are failing but partially persisted to the database. To make things harder to figure out, the process fails only once every few weeks, with hundreds of thousands successfully processed between every failure. The error frequency seems to go up when concurrency/number of worker processes goes up. So far, we've been able to recreate what we're seeing with this program. (.NET 4.7.1 framework) using (var

changing existing COM+ applications identity via vbs script

柔情痞子 提交于 2019-12-01 11:26:24
How to changing existing COM+ applications identity via vbs script. like Authentication level = none and identity to this user via vb scripts. found many posting on add/delete com+ applications but not changing existing one. please help Here's a script that retrieves all of the applications, finds the one with the name you are interested in and sets the Identity, Password and Authentication to Connect. For a full list of Application properties see Applications Collection under COM+ Administration Collections . Const COMAdminAuthenticationDefault = 0 Const COMAdminAuthenticationNone = 1 Const