this situation. Take it out lots of locks to enable the transaction
state to be maintained, can block the the OLTP quite seriously. The less
work you do on the OLTP (source), the less impact. Locks and
transactions are an impact. As ever it is a trade-off.
>I once saw a huge dts package that had routines to backup the
>tables, do transforms, check for existance of trasform error logs, restore db
>if errors. Your method is interesting because I can rollback the
>truncate/insert from the temp table.
>
>
>"Darren Green" wrote:
>
>> In message <BF0C8916-ABD8-499E-98B4-918BDB06429E@microsoft.com>, Chuck P
>> <nospam@crlf.com> writes
>> >I don't mind not using the DTS package transaction.
>> >How do you do it at the T-SQL level?
>>
>> You just write a T-SQL script as you would to run in query analyser, and
>> call through the Exec SQL Script. You can use a transaction in the
>> script, about which DTS neither knows or cares. Nothing special.
>>
>> It depends what you are actually doing, I don't know if this will work
>> for you.
>>
>>
>> You can also design the package so that workflow is used so that changes
>> are only made when appropriate. Rollback is the difficult bit, but is it
>> required?
>>
>> I download data, but do some checks before and after, and compare. I
>> then move data from staging tables to main tables (T-SQL level
>> transaction). If all is then move I delete the data from the source. No
>> need for package transactions, because if my checks fail, then I stop,
>> nothing gained, nothing lost. If the Exec SQL Task fails, same thing.
>> For me the only stage that I cannot repeat, or rollback is the final
>> delete, so that happens when everything else is OK. If the delete fails,
>> you have 24 hours to solve it!
>>
>> --
>> Darren Green (SQL Server MVP)
>> DTS -
http://www.sqldts.com >>
>> PASS - the definitive, global community for SQL Server professionals
>>
http://www.sqlpass.org >>
>>