What are the advantages / disadvantages of using TransactionScope compared to IDbTransaction? I give some suggestions - please correct / complete the list
Profit from a transaction: Transaction loss: feature very - especially when wrapping this code Which can be used for you can not control (since the code you typed will automatically be received by default). This means that you can keep pre-existing libraries using the server In the display minor is killed, but note that in many cases you can use the light transaction manager DTC will use - this means that you do not pay the full DTC costs. Another disadvantage is that nested transactions can not be brought back; any rollback immediately External transaction rolls back privately I like this approach; If things get sick - stop them from doing ASAP. Repeat your query in 3 points; You can choose / close the number of connections within the scope of the transaction, without affecting the behavior, except you can get (depends on the circumstances) that your transaction is DTC If you talk to many transaction-aware servers, it gives a lot of guarantee. Another difference: Different timeouts apply, especially if DTC is included that makes sense: A long-running distributed transaction is poison, and it is a cross-server deadlock Can indicate. Deadlocks are usually found on the single server, but it is impossible to automatically spot when delivered, therefore a difficult time is required.
Comments
Post a Comment