I need to use DbTransactions (on a single db) but I am not sure about how to make sure it will keep working when I deploy to the production environment.
What are the requirements for an application to be able to use SQL DbTransactions? Are they allowed by default in SQLServer (and what’s the deal with MSDTC)?
Yes, transactions are enabled by default–I don’t think this is something you can disable. Each time you run a query, it probably runs as an autocommit, implicit transaction, unless otherwise specified.
MSDTC comes into play if you run distributed transactions. I’d avoid it if you can. That aspect can be disabled. If that’s what you’re using, then, you will need to make sure it’s configured on the destination system.
Just using the DBTransaction object for simple, successive queries or transactions within stored procedures won’t need MSDTC.