DTS package, how will optimizer treats the transactions?
With the SQL Server 2000 DTS has very good capability of treating the huge processes as transactions, let's assume these parameters:
- DTS Package with "Use Transactions" and "Commit on successful package completion" boxes checked.
- No transaction related boxes checked in the Workflow Properties of each Package step.
So the question is given these parameters, will SQL Server still treat the package as a single transaction, or will each qualified step (Execute SQL Task, etc.) be executed as its own autonomous transation?
By design the SQL Server engine treats transactions within DTS packages to serve the same purpose as in other SQL Server based operations - they provide the set of features described collectively using the term ACID, which is an acronym derived from four transactional characteristics - atomicity, consistency, isolation and durability.
So when you execute the package, it is treated as a big transaction, as per the policies & options individual tasks/steps can join the transaction and follow the rules you specify i.e if one task fails then everybody else in the transaction fails as well, this is where you specify the workflow properties. Here comes the package properties with the existing global settings that affect transaction behavior across the entire package. Step properties operate at the level of the individual task. If the option within 'join to transaction' is cleared, no package transaction is created, and requests by steps to join the transaction are ignored hence updates are carried out one at a time, as they are requested.
For more information on transactions refer to this DBJournal article too.
**__________________________________**
SQL Server MVP, Sr. DBA & industry expert.
-
Knowledge is of two kinds. We know a subject ourselves or we know where we can find information on it. It is also a power and you will gain by sharing it.