views:

54

answers:

2

I have read a few articles about how to programmatically interacting with Active Directory. One question remains though, is it possible to rollback a transaction of some sort with Active Directory?

I have read that it is not possible in a context which you have several domain controllers as they seem to update each other with an update sequence number (USN) like they know what USN to query when communicating together or something like that, in short. For proper details, please read these articles:

  1. USN Rollback
  2. Considerations when hosting Active Directory domain controller in virtual hosting environments

My requirements are to be able to perform :

  • Create;
  • Update;
  • Delete;
  • Select.

Of OU, and in case something goes wrong, I need to rollback to the start. Well, you all know what a transaction is after all!

So, I wish to see what are my options. Anyone can help?

Thanks!

+2  A: 

No. Active Directory does not support Transactions.

Please see: Is Active Directory transaction-aware?

Mitch Wheat
It seems there are some workarounds. Implementing an interface from the .NET framework so that I might have a client-side transaction, instead of a server-side transaction. This sounds good to me. What do you think?
Will Marcouiller
+1  A: 

You would need to do this in a manual method within code -

Read all changing properties
Update
Something went wrong
Update to original values

There is some obvious danger in this method, but it should be possible

benPearce
+1 This seems to be the only way around, also that is stated within the solution-answer that @Mitch Wheat references to.
Will Marcouiller