![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi there People, I was looking at a really good thread earlier which was dealing with the details of porting DTS packages from Dev to Prod and renaming connections programatically. This changed the name of the server in the dest connections. I have used this process and I think it works really elegantly, however it does not reflect in the transformations. The dest table is left with the naming of [dev_server].[dbo].[dest_table] rather than picking up the new connection name of [prod_server].[dbo].[dest_table]. I tried to look through the task object but could not for the life of me work out how to read that value, and change it. Am I going about this all wrong or is there something I have missed? Any help would be greatly appreciated - I am really not looking forward to going through and remapping 500+ transformations Thanks in advance JPO |
#3
| |||
| |||
|
|
The property you are looking for is DestinationObjectName -- ---------------------------- Allan Mitchell (Microsoft SQL Server MVP) MCSE,MCDBA www.SQLDTS.com I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "JPO" <justin.parry-okeden (AT) ge (DOT) com> wrote in message news:15b3f20b.0309092031.6a5575f0 (AT) posting (DOT) google.com... Hi there People, I was looking at a really good thread earlier which was dealing with the details of porting DTS packages from Dev to Prod and renaming connections programatically. This changed the name of the server in the dest connections. I have used this process and I think it works really elegantly, however it does not reflect in the transformations. The dest table is left with the naming of [dev_server].[dbo].[dest_table] rather than picking up the new connection name of [prod_server].[dbo].[dest_table]. I tried to look through the task object but could not for the life of me work out how to read that value, and change it. Am I going about this all wrong or is there something I have missed? Any help would be greatly appreciated - I am really not looking forward to going through and remapping 500+ transformations Thanks in advance JPO |
#4
| |||
| |||
|
|
Thanks Allan, I had actually looked at the DestinationObjectName, which is a property of the CustomTask Object. All the articles and examples I find are about creating a CutomTask object and setting the DestinationObjectName before adding the task as following:- Set oTask = goPackage.Tasks.New("DTSDataPumpTask") Set oCustomTask2 = oTask.CustomTask oCustomTask2.Name = "DTSTask_DTSDataPumpTask_1" oCustomTask2.DestinationObjectName = "[pubs].[dbo].[authors1]" goPackage.Tasks.Add oTask What I can't work out is how to reference this from within an ActiveX script to change the property. I can obtain a reference to the Task Object from the Tasks collection, but from there I cannot obtain a reference to the oCustomTask2 object or the DestinationObjectName property. Any help would be very much appreciated. Thanks in advance JPO "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote The property you are looking for is DestinationObjectName -- ---------------------------- Allan Mitchell (Microsoft SQL Server MVP) MCSE,MCDBA www.SQLDTS.com I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "JPO" <justin.parry-okeden (AT) ge (DOT) com> wrote in message news:15b3f20b.0309092031.6a5575f0 (AT) posting (DOT) google.com... Hi there People, I was looking at a really good thread earlier which was dealing with the details of porting DTS packages from Dev to Prod and renaming connections programatically. This changed the name of the server in the dest connections. I have used this process and I think it works really elegantly, however it does not reflect in the transformations. The dest table is left with the naming of [dev_server].[dbo].[dest_table] rather than picking up the new connection name of [prod_server].[dbo].[dest_table]. I tried to look through the task object but could not for the life of me work out how to read that value, and change it. Am I going about this all wrong or is there something I have missed? Any help would be greatly appreciated - I am really not looking forward to going through and remapping 500+ transformations Thanks in advance JPO |
#5
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |