dbTalk Databases Forums  

dts transaction without dtc

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss dts transaction without dtc in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Chuck P
 
Posts: n/a

Default dts transaction without dtc - 05-21-2005 , 01:56 PM






I would like to use transactions in dts without using dtc (firewall issues;
no chance of reconfiguring). Is there a way to do this? I am only updating
on one connection on a sql 2k database.

thanks,


Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: dts transaction without dtc - 05-23-2005 , 02:03 AM






No. To use a package transaction, it will require DTS. You may only use one
connection, but DTS will not know that in advance. You have the ability to
span connections, so this requires DTC, and without it DTS cannot allow you
to proceed, otherwise it will be to late.

Can you not design your package in such a way that you do not require a DTS
transaction, and instead rely on transactions at the T-SQL level, for a
single batch in your connection.


--
Darren Green
http://www.sqldts.com
http://www.sqlis.com

"Chuck P" <nospam (AT) crlf (DOT) com> wrote

Quote:
I would like to use transactions in dts without using dtc (firewall
issues;
no chance of reconfiguring). Is there a way to do this? I am only
updating
on one connection on a sql 2k database.

thanks,




Reply With Quote
  #3  
Old   
Chuck P
 
Posts: n/a

Default Re: dts transaction without dtc - 05-23-2005 , 09:09 AM



I don't mind not using the DTS package transaction.
How do you do it at the T-SQL level?
I wasn't sure how to get the connection object.
Do you use ScriptPkg tool or something?
thanks,


"Darren Green" wrote:

Quote:
No. To use a package transaction, it will require DTS. You may only use one
connection, but DTS will not know that in advance. You have the ability to
span connections, so this requires DTC, and without it DTS cannot allow you
to proceed, otherwise it will be to late.

Can you not design your package in such a way that you do not require a DTS
transaction, and instead rely on transactions at the T-SQL level, for a
single batch in your connection.


--
Darren Green
http://www.sqldts.com
http://www.sqlis.com

"Chuck P" <nospam (AT) crlf (DOT) com> wrote in message
news:2767FEC2-E655-4CF3-919B-23953F335CD3 (AT) microsoft (DOT) com...
I would like to use transactions in dts without using dtc (firewall
issues;
no chance of reconfiguring). Is there a way to do this? I am only
updating
on one connection on a sql 2k database.

thanks,





Reply With Quote
  #4  
Old   
Darren Green
 
Posts: n/a

Default Re: dts transaction without dtc - 05-23-2005 , 12:18 PM



In message <BF0C8916-ABD8-499E-98B4-918BDB06429E (AT) microsoft (DOT) com>, Chuck P
<nospam (AT) crlf (DOT) com> writes
Quote:
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



Reply With Quote
  #5  
Old   
Chuck P
 
Posts: n/a

Default Re: dts transaction without dtc - 05-23-2005 , 01:36 PM



I was hoping to put in an active x script to access the packages oledb
connection (I am sure it has one somewhere) and then start a transaction.
Next do several data transforms (inserts from several datasources).
Then another Active X script to commit the transaction if their were no
package errors.

I wanted to keep the tables online 7x24, that's why I was thinking of
transactions. 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:

Quote:
In message <BF0C8916-ABD8-499E-98B4-918BDB06429E (AT) microsoft (DOT) com>, Chuck P
nospam (AT) crlf (DOT) 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



Reply With Quote
  #6  
Old   
Darren Green
 
Posts: n/a

Default Re: dts transaction without dtc - 05-24-2005 , 01:19 AM



In message <9D71797E-57CF-4860-A707-BBF404318A64 (AT) microsoft (DOT) com>, Chuck P
<nospam (AT) crlf (DOT) com> writes
Quote:
I was hoping to put in an active x script to access the packages oledb
connection (I am sure it has one somewhere) and then start a transaction.
Next do several data transforms (inserts from several datasources).
Then another Active X script to commit the transaction if their were no
package errors.

This is not possible.

Quote:
I wanted to keep the tables online 7x24, that's why I was thinking of
transactions.
Personally I think transactions can reduce the availability of tables in
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.

Quote:
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 (AT) microsoft (DOT) com>, Chuck P
nospam (AT) crlf (DOT) 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


--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.