dbTalk Databases Forums  

parent/child packages transfer to production

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


Discuss parent/child packages transfer to production in the microsoft.public.sqlserver.dts forum.



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

Default parent/child packages transfer to production - 08-29-2005 , 08:00 AM






I have a parent DTS from which in call several child packages.
When adding an Execute Package task I get asked for the SQL server name in
order to browse the packages. I then select the appropriate package name.

My question is about copying the packages to the production server. I see a
parent DTS uses a package ID to reference a child package and I assume this
ID will be copied and the packages will run fine.

Should I have any concerns about the hierarchy when transferring to
production? I am assuming everything will work fine and the SQL Server name
is asked only in order to browse to the package. Right?

Thanks

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

Default Re: parent/child packages transfer to production - 08-29-2005 , 08:12 AM






You probably want to do this instead.

Make the Execute Package Task name dependent only
(http://www.sqldts.com/default.aspx?216)




"fleo" <fleo (AT) discussions (DOT) microsoft.com> wrote

Quote:
I have a parent DTS from which in call several child packages.
When adding an Execute Package task I get asked for the SQL server name in
order to browse the packages. I then select the appropriate package name.

My question is about copying the packages to the production server. I see
a
parent DTS uses a package ID to reference a child package and I assume
this
ID will be copied and the packages will run fine.

Should I have any concerns about the hierarchy when transferring to
production? I am assuming everything will work fine and the SQL Server
name
is asked only in order to browse to the package. Right?

Thanks



Reply With Quote
  #3  
Old   
fleo
 
Posts: n/a

Default Re: parent/child packages transfer to production - 08-30-2005 , 08:51 AM



Thanks Allan.
I also found I had to set the Server name of the Execute Package Step
property:
http://www.sqlservercentral.com/colu...sexecution.asp

"Allan Mitchell" a écrit :

Quote:
You probably want to do this instead.

Make the Execute Package Task name dependent only
(http://www.sqldts.com/default.aspx?216)




"fleo" <fleo (AT) discussions (DOT) microsoft.com> wrote in message
news:A2D4198C-1399-41A5-8814-263E1FC06FDE (AT) microsoft (DOT) com...
I have a parent DTS from which in call several child packages.
When adding an Execute Package task I get asked for the SQL server name in
order to browse the packages. I then select the appropriate package name.

My question is about copying the packages to the production server. I see
a
parent DTS uses a package ID to reference a child package and I assume
this
ID will be copied and the packages will run fine.

Should I have any concerns about the hierarchy when transferring to
production? I am assuming everything will work fine and the SQL Server
name
is asked only in order to browse to the package. Right?

Thanks




Reply With Quote
  #4  
Old   
fleo
 
Posts: n/a

Default Re: parent/child packages transfer to production - 08-30-2005 , 03:49 PM



Can I create an ActiveX script task that would modify .PackageID and
..ServerName programmatically?

Something like
For each Task where TaskType = 'Execute Package Task'
PackageID = DTSGlobalVariables("gv_NULL").Value
ServerName = DTSGlobalVariables("gv_ServerName").Value

Thanks

"fleo" a écrit :

Quote:
Thanks Allan.
I also found I had to set the Server name of the Execute Package Step
property:
http://www.sqlservercentral.com/colu...sexecution.asp

"Allan Mitchell" a écrit :

You probably want to do this instead.

Make the Execute Package Task name dependent only
(http://www.sqldts.com/default.aspx?216)




"fleo" <fleo (AT) discussions (DOT) microsoft.com> wrote in message
news:A2D4198C-1399-41A5-8814-263E1FC06FDE (AT) microsoft (DOT) com...
I have a parent DTS from which in call several child packages.
When adding an Execute Package task I get asked for the SQL server name in
order to browse the packages. I then select the appropriate package name.

My question is about copying the packages to the production server. I see
a
parent DTS uses a package ID to reference a child package and I assume
this
ID will be copied and the packages will run fine.

Should I have any concerns about the hierarchy when transferring to
production? I am assuming everything will work fine and the SQL Server
name
is asked only in order to browse to the package. Right?

Thanks




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

Default Re: parent/child packages transfer to production - 08-30-2005 , 04:23 PM



Yep

you could certainly loop through the tasks and change properties of the task when you find
one of the right type.

Allan

On Tue, 30 Aug 2005 13:49:09 -0700, "fleo" <fleo (AT) discussions (DOT) microsoft.com> wrote:

Quote:
Can I create an ActiveX script task that would modify .PackageID and
.ServerName programmatically?

Something like
For each Task where TaskType = 'Execute Package Task'
PackageID = DTSGlobalVariables("gv_NULL").Value
ServerName = DTSGlobalVariables("gv_ServerName").Value

Thanks

"fleo" a écrit :

Thanks Allan.
I also found I had to set the Server name of the Execute Package Step
property:
http://www.sqlservercentral.com/colu...sexecution.asp

"Allan Mitchell" a écrit :

You probably want to do this instead.

Make the Execute Package Task name dependent only
(http://www.sqldts.com/default.aspx?216)




"fleo" <fleo (AT) discussions (DOT) microsoft.com> wrote in message
news:A2D4198C-1399-41A5-8814-263E1FC06FDE (AT) microsoft (DOT) com...
I have a parent DTS from which in call several child packages.
When adding an Execute Package task I get asked for the SQL server name in
order to browse the packages. I then select the appropriate package name.

My question is about copying the packages to the production server. I see
a
parent DTS uses a package ID to reference a child package and I assume
this
ID will be copied and the packages will run fine.

Should I have any concerns about the hierarchy when transferring to
production? I am assuming everything will work fine and the SQL Server
name
is asked only in order to browse to the package. Right?

Thanks




Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know


Reply With Quote
  #6  
Old   
fleo
 
Posts: n/a

Default Re: parent/child packages transfer to production - 09-01-2005 , 07:41 AM



Ok I got it. Thanks for your help.
Here's the code, maybe it could help someone in the future:
Function Main()

' Declare Variables
Dim oPkg
Dim oTask

' Get Package Object
Set oPkg = DTSGlobalVariables.Parent

' Examine Tasks
For Each oTask in oPkg.Tasks
If oTask.CustomTaskID = "DTSExecutePackageTask" Then
oTask.CustomTask.ServerName =
DTSGlobalVariables("gv_ServerSQL").Value
oTask.CustomTask.PackageID = DTSGlobalVariables("gv_NULL").Value
End if
Next

' Clear Up
Set oPKG = Nothing

Main = DTSTaskExecResult_Success

End Function

Reply With Quote
  #7  
Old   
fleo
 
Posts: n/a

Default Re: parent/child packages transfer to production - 09-02-2005 , 10:02 AM



Hey...
I just realized when you set the PackageID to NULL you can't access the
inner global variables!


"Allan Mitchell" a écrit :

Quote:
You probably want to do this instead.

Make the Execute Package Task name dependent only
(http://www.sqldts.com/default.aspx?216)




"fleo" <fleo (AT) discussions (DOT) microsoft.com> wrote in message
news:A2D4198C-1399-41A5-8814-263E1FC06FDE (AT) microsoft (DOT) com...
I have a parent DTS from which in call several child packages.
When adding an Execute Package task I get asked for the SQL server name in
order to browse the packages. I then select the appropriate package name.

My question is about copying the packages to the production server. I see
a
parent DTS uses a package ID to reference a child package and I assume
this
ID will be copied and the packages will run fine.

Should I have any concerns about the hierarchy when transferring to
production? I am assuming everything will work fine and the SQL Server
name
is asked only in order to browse to the package. Right?

Thanks




Reply With Quote
  #8  
Old   
fleo
 
Posts: n/a

Default RE: parent/child packages transfer to production - 09-02-2005 , 10:59 AM



I use the following logic instead:

I check for any "Execute Package Task". When I find one, I get its name and
use it to load it from the SQL server into a DTS.Package object.

I then use the loaded DTS.Package to get the PackageID which I reassign to
the Execute Package Task Package ID.


So the code looks like the following:
Set oPkg = DTSGlobalVariables.Parent

For Each oTask in oPkg.Tasks
If TaskType is "Execute Package"
sPkgName = oTask.CustomTask.PackageName
Set oChildPkg = CreateObject("DTS.Package")
oChildPkg.LoadFromSQLServer sServer, sUID, sPWD, iSecurity, sPkgPWD, "", "",
sPkgName
oTask.CustomTask.PackageID = oChildPkg.PackageID
Endif


"fleo" a écrit :

Quote:
I have a parent DTS from which in call several child packages.
When adding an Execute Package task I get asked for the SQL server name in
order to browse the packages. I then select the appropriate package name.

My question is about copying the packages to the production server. I see a
parent DTS uses a package ID to reference a child package and I assume this
ID will be copied and the packages will run fine.

Should I have any concerns about the hierarchy when transferring to
production? I am assuming everything will work fine and the SQL Server name
is asked only in order to browse to the package. Right?

Thanks

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.