dbTalk Databases Forums  

Update transformations after changing target database

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


Discuss Update transformations after changing target database in the microsoft.public.sqlserver.dts forum.



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

Default Update transformations after changing target database - 02-15-2006 , 01:11 AM






Hi all,

I have this problem where I have to frequently change the target
database of my transform data tasks. I've already figured out how to
change the destination tablename through ActiveX script, but I don't
know how I can drop all existing transformations and recreate them
(since they remember old values and don't work) in the same script.
Each of the transformations merely maps a source column to a
destination column. Here are my questions:

1) I've read somewhere that I actually don't need to recreate the
transformations. All I need to do is to dynamically change the source
table as well. Is this correct?

2) If I do have to recreate the transformations one by one, how can I
create them? Do I have to specify all of the properties? Or do I just
do something like DTSDestination("Role") = DTSSource("Role")?

3) What I have currently is I first copy all existing transformations
to an array, delete all existing transformations, then all each of the
transformations in the array back. However, this doesn't work. Does
it have to get this complicated?

All thoughts and comments are helpful!

Thanks for your time in advance.

Regards,

Jada


Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Update transformations after changing target database - 02-19-2006 , 10:45 AM






Hello jada,


1. If the definitions of the transforms change then this is not true. DTS
has no autoremap. So say your transform looks like

Col1 --> Col1

But now you change the source and the destination and it should now look like

Col2 --> Col2


This will not get remapped.

If you mail me privately I can send you an example of how to do this



Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com

Quote:
Hi all,

I have this problem where I have to frequently change the target
database of my transform data tasks. I've already figured out how to
change the destination tablename through ActiveX script, but I don't
know how I can drop all existing transformations and recreate them
(since they remember old values and don't work) in the same script.
Each of the transformations merely maps a source column to a
destination column. Here are my questions:

1) I've read somewhere that I actually don't need to recreate the
transformations. All I need to do is to dynamically change the source
table as well. Is this correct?

2) If I do have to recreate the transformations one by one, how can I
create them? Do I have to specify all of the properties? Or do I
just do something like DTSDestination("Role") = DTSSource("Role")?

3) What I have currently is I first copy all existing transformations
to an array, delete all existing transformations, then all each of the
transformations in the array back. However, this doesn't work. Does
it have to get this complicated?

All thoughts and comments are helpful!

Thanks for your time in advance.

Regards,

Jada




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.