Friday, February 24, 2012

DTS: How to call a sub-package by name only?

(SQL Server 2000, SP3a)
Hello all!
I've got a package that has several "Execute Package Task" elements. I'd like to make the
sub-packages version-independent. I ran across this blurb:
http://www.sqldts.com/default.aspx?216
Which talks about blanking the PackageID. I've done exactly as this has described (both
by blanking the PackageID with "Disconnected Edit" *and* by having a blank Global Variable
that I set the PackageIDs to). However, when I invoke my outer package, I keep getting an
"invalid GUID".
Any help would be greatly appreciated. Thanks!
John PetersonYou could of course simply use an Active Script task and call the package
that way OR an ExecuteProcess task with DTSRUN.
I have just followed the article and it works for me.
--
Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org
"John Peterson" <j0hnp@.comcast.net> wrote in message
news:ObapPeJTEHA.3768@.TK2MSFTNGP11.phx.gbl...
> (SQL Server 2000, SP3a)
> Hello all!
> I've got a package that has several "Execute Package Task" elements. I'd
like to make the
> sub-packages version-independent. I ran across this blurb:
> http://www.sqldts.com/default.aspx?216
> Which talks about blanking the PackageID. I've done exactly as this has
described (both
> by blanking the PackageID with "Disconnected Edit" *and* by having a blank
Global Variable
> that I set the PackageIDs to). However, when I invoke my outer package, I
keep getting an
> "invalid GUID".
> Any help would be greatly appreciated. Thanks!
> John Peterson
>|||Thanks Allan!
I *think* I might be having some issues with the blank global variable being "<not
displayable>". That is, when I use the Global Variable editor to "blank" out my PackageID
GV, everything works. However, if I save my package (as Structured Storage), exit the
package, and re-run it, I consistently get the "Invalid GUID specified" error. If I edit
the PackageID GV to blank it out again, then it works.
I even added a ActiveX task to set the PackageID GV:
' Ensure that the PackageID global variable is blank.
DTSGlobalVariables("PackageID").Value = ""
But upon initial load of the package, it still fails until I manually "dink" that GV.
If you have the time and inclination, could you try that and let me know of your results?
Many regards,
John Peterson
"Allan Mitchell" <allan@.no-spam.sqldts.com> wrote in message
news:eUuOQuJTEHA.2128@.TK2MSFTNGP11.phx.gbl...
> You could of course simply use an Active Script task and call the package
> that way OR an ExecuteProcess task with DTSRUN.
> I have just followed the article and it works for me.
>
> --
> --
> Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
> www.SQLDTS.com - The site for all your DTS needs.
> I support PASS - the definitive, global community
> for SQL Server professionals - http://www.sqlpass.org
>
> "John Peterson" <j0hnp@.comcast.net> wrote in message
> news:ObapPeJTEHA.3768@.TK2MSFTNGP11.phx.gbl...
> > (SQL Server 2000, SP3a)
> >
> > Hello all!
> >
> > I've got a package that has several "Execute Package Task" elements. I'd
> like to make the
> > sub-packages version-independent. I ran across this blurb:
> >
> > http://www.sqldts.com/default.aspx?216
> >
> > Which talks about blanking the PackageID. I've done exactly as this has
> described (both
> > by blanking the PackageID with "Disconnected Edit" *and* by having a blank
> Global Variable
> > that I set the PackageIDs to). However, when I invoke my outer package, I
> keep getting an
> > "invalid GUID".
> >
> > Any help would be greatly appreciated. Thanks!
> >
> > John Peterson
> >
> >
>|||What I think then is happening is that you are saying "" which is not empty.
Why do you have a GV setting the Package GUID in the first place if you do
not want to use it?
I would remove this altogether or if you want to occasionally specify the
GUID and sometimes not then I would do it in an Active Script task where i
could decide to use/or not based on a certain condition
--
--
Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org
"John Peterson" <j0hnp@.comcast.net> wrote in message
news:OsbAS6JTEHA.3548@.TK2MSFTNGP09.phx.gbl...
> Thanks Allan!
> I *think* I might be having some issues with the blank global variable
being "<not
> displayable>". That is, when I use the Global Variable editor to "blank"
out my PackageID
> GV, everything works. However, if I save my package (as Structured
Storage), exit the
> package, and re-run it, I consistently get the "Invalid GUID specified"
error. If I edit
> the PackageID GV to blank it out again, then it works.
> I even added a ActiveX task to set the PackageID GV:
> ' Ensure that the PackageID global variable is blank.
> DTSGlobalVariables("PackageID").Value = ""
> But upon initial load of the package, it still fails until I manually
"dink" that GV.
> If you have the time and inclination, could you try that and let me know
of your results?
> Many regards,
> John Peterson
>
> "Allan Mitchell" <allan@.no-spam.sqldts.com> wrote in message
> news:eUuOQuJTEHA.2128@.TK2MSFTNGP11.phx.gbl...
> > You could of course simply use an Active Script task and call the
package
> > that way OR an ExecuteProcess task with DTSRUN.
> >
> > I have just followed the article and it works for me.
> >
> >
> > --
> >
> > --
> >
> > Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
> > www.SQLDTS.com - The site for all your DTS needs.
> > I support PASS - the definitive, global community
> > for SQL Server professionals - http://www.sqlpass.org
> >
> >
> > "John Peterson" <j0hnp@.comcast.net> wrote in message
> > news:ObapPeJTEHA.3768@.TK2MSFTNGP11.phx.gbl...
> > > (SQL Server 2000, SP3a)
> > >
> > > Hello all!
> > >
> > > I've got a package that has several "Execute Package Task" elements.
I'd
> > like to make the
> > > sub-packages version-independent. I ran across this blurb:
> > >
> > > http://www.sqldts.com/default.aspx?216
> > >
> > > Which talks about blanking the PackageID. I've done exactly as this
has
> > described (both
> > > by blanking the PackageID with "Disconnected Edit" *and* by having a
blank
> > Global Variable
> > > that I set the PackageIDs to). However, when I invoke my outer
package, I
> > keep getting an
> > > "invalid GUID".
> > >
> > > Any help would be greatly appreciated. Thanks!
> > >
> > > John Peterson
> > >
> > >
> >
> >
>|||Sorry, I should have been more clear: I *always* want to call the sub-package by name
only, so I *do* want to use the GV to set the PackageID. The problem is, it seems like
DTS is sometimes replacing the actual string of "<not displayable>" for the PackageID when
I first load the package, which will then generate the "Invalid GUID specified" error. It
seems like I need to manually clear out the GV the first time I run it in the designer.
"Allan Mitchell" <allan@.no-spam.sqldts.com> wrote in message
news:uMVOqBTTEHA.1732@.TK2MSFTNGP09.phx.gbl...
> What I think then is happening is that you are saying "" which is not empty.
> Why do you have a GV setting the Package GUID in the first place if you do
> not want to use it?
> I would remove this altogether or if you want to occasionally specify the
> GUID and sometimes not then I would do it in an Active Script task where i
> could decide to use/or not based on a certain condition
> --
> --
> Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
> www.SQLDTS.com - The site for all your DTS needs.
> I support PASS - the definitive, global community
> for SQL Server professionals - http://www.sqlpass.org
>
> "John Peterson" <j0hnp@.comcast.net> wrote in message
> news:OsbAS6JTEHA.3548@.TK2MSFTNGP09.phx.gbl...
> > Thanks Allan!
> >
> > I *think* I might be having some issues with the blank global variable
> being "<not
> > displayable>". That is, when I use the Global Variable editor to "blank"
> out my PackageID
> > GV, everything works. However, if I save my package (as Structured
> Storage), exit the
> > package, and re-run it, I consistently get the "Invalid GUID specified"
> error. If I edit
> > the PackageID GV to blank it out again, then it works.
> >
> > I even added a ActiveX task to set the PackageID GV:
> >
> > ' Ensure that the PackageID global variable is blank.
> > DTSGlobalVariables("PackageID").Value = ""
> >
> > But upon initial load of the package, it still fails until I manually
> "dink" that GV.
> >
> > If you have the time and inclination, could you try that and let me know
> of your results?
> >
> > Many regards,
> >
> > John Peterson
> >
> >
> >
> > "Allan Mitchell" <allan@.no-spam.sqldts.com> wrote in message
> > news:eUuOQuJTEHA.2128@.TK2MSFTNGP11.phx.gbl...
> > > You could of course simply use an Active Script task and call the
> package
> > > that way OR an ExecuteProcess task with DTSRUN.
> > >
> > > I have just followed the article and it works for me.
> > >
> > >
> > > --
> > >
> > > --
> > >
> > > Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
> > > www.SQLDTS.com - The site for all your DTS needs.
> > > I support PASS - the definitive, global community
> > > for SQL Server professionals - http://www.sqlpass.org
> > >
> > >
> > > "John Peterson" <j0hnp@.comcast.net> wrote in message
> > > news:ObapPeJTEHA.3768@.TK2MSFTNGP11.phx.gbl...
> > > > (SQL Server 2000, SP3a)
> > > >
> > > > Hello all!
> > > >
> > > > I've got a package that has several "Execute Package Task" elements.
> I'd
> > > like to make the
> > > > sub-packages version-independent. I ran across this blurb:
> > > >
> > > > http://www.sqldts.com/default.aspx?216
> > > >
> > > > Which talks about blanking the PackageID. I've done exactly as this
> has
> > > described (both
> > > > by blanking the PackageID with "Disconnected Edit" *and* by having a
> blank
> > > Global Variable
> > > > that I set the PackageIDs to). However, when I invoke my outer
> package, I
> > > keep getting an
> > > > "invalid GUID".
> > > >
> > > > Any help would be greatly appreciated. Thanks!
> > > >
> > > > John Peterson
> > > >
> > > >
> > >
> > >
> >
> >
>|||John
If you never want to load the DTS package using either the Package and
Version GUID, then I'd do as Allan has suggested and put either,
a) Blank out the GUIDs using disconnected edit. They will only come back if
you edit that task in the designer.
b) Write a short ActiveScript task to blank out the GUIDs at the start of
the package.
Here is a script I use to accomplish that,
<-- Start -->
Dim oPkg
Dim colTasks
Dim sTsk
' open DTS package object so we can get the package details
Set oPkg = DTSGlobalVariables.Parent
' open object referring to Tasks collection
Set colTasks = oPkg.Tasks
' for each item in the collection
For Each sTsk in colTasks
' check if the task is an Execute Package task
If InStr(1, sTsk.Name, "DTSExecutePackageTask", vbTextCompare ) > 0 Then
' create object referring to selected task
Set oTsk = oPkg.Tasks(sTsk.Name)
' blank out Package and VersionIDs so package loads by name only
' this will ensure that only the latest version is loaded.
oTsk.Properties("PackageID").Value = ""
oTsk.Properties("VersionID").Value = ""
' release object that was created
Set oTsk = Nothing
End If
Next
Set colTasks = Nothing
Set oPkg = Nothing
<-- End -->
--
Thanks
Phill
"John Peterson" <j0hnp@.comcast.net> wrote in message
news:urAJ4tVTEHA.3548@.TK2MSFTNGP09.phx.gbl...
> Sorry, I should have been more clear: I *always* want to call the
sub-package by name
> only, so I *do* want to use the GV to set the PackageID. The problem is,
it seems like
> DTS is sometimes replacing the actual string of "<not displayable>" for
the PackageID when
> I first load the package, which will then generate the "Invalid GUID
specified" error. It
> seems like I need to manually clear out the GV the first time I run it in
the designer.
>
> "Allan Mitchell" <allan@.no-spam.sqldts.com> wrote in message
> news:uMVOqBTTEHA.1732@.TK2MSFTNGP09.phx.gbl...
> > What I think then is happening is that you are saying "" which is not
empty.
> >
> > Why do you have a GV setting the Package GUID in the first place if you
do
> > not want to use it?
> >
> > I would remove this altogether or if you want to occasionally specify
the
> > GUID and sometimes not then I would do it in an Active Script task where
i
> > could decide to use/or not based on a certain condition
> >
> > --
> >
> > --
> >
> > Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
> > www.SQLDTS.com - The site for all your DTS needs.
> > I support PASS - the definitive, global community
> > for SQL Server professionals - http://www.sqlpass.org
> >
> >
> > "John Peterson" <j0hnp@.comcast.net> wrote in message
> > news:OsbAS6JTEHA.3548@.TK2MSFTNGP09.phx.gbl...
> > > Thanks Allan!
> > >
> > > I *think* I might be having some issues with the blank global variable
> > being "<not
> > > displayable>". That is, when I use the Global Variable editor to
"blank"
> > out my PackageID
> > > GV, everything works. However, if I save my package (as Structured
> > Storage), exit the
> > > package, and re-run it, I consistently get the "Invalid GUID
specified"
> > error. If I edit
> > > the PackageID GV to blank it out again, then it works.
> > >
> > > I even added a ActiveX task to set the PackageID GV:
> > >
> > > ' Ensure that the PackageID global variable is blank.
> > > DTSGlobalVariables("PackageID").Value = ""
> > >
> > > But upon initial load of the package, it still fails until I manually
> > "dink" that GV.
> > >
> > > If you have the time and inclination, could you try that and let me
know
> > of your results?
> > >
> > > Many regards,
> > >
> > > John Peterson
> > >
> > >
> > >
> > > "Allan Mitchell" <allan@.no-spam.sqldts.com> wrote in message
> > > news:eUuOQuJTEHA.2128@.TK2MSFTNGP11.phx.gbl...
> > > > You could of course simply use an Active Script task and call the
> > package
> > > > that way OR an ExecuteProcess task with DTSRUN.
> > > >
> > > > I have just followed the article and it works for me.
> > > >
> > > >
> > > > --
> > > >
> > > > --
> > > >
> > > > Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
> > > > www.SQLDTS.com - The site for all your DTS needs.
> > > > I support PASS - the definitive, global community
> > > > for SQL Server professionals - http://www.sqlpass.org
> > > >
> > > >
> > > > "John Peterson" <j0hnp@.comcast.net> wrote in message
> > > > news:ObapPeJTEHA.3768@.TK2MSFTNGP11.phx.gbl...
> > > > > (SQL Server 2000, SP3a)
> > > > >
> > > > > Hello all!
> > > > >
> > > > > I've got a package that has several "Execute Package Task"
elements.
> > I'd
> > > > like to make the
> > > > > sub-packages version-independent. I ran across this blurb:
> > > > >
> > > > > http://www.sqldts.com/default.aspx?216
> > > > >
> > > > > Which talks about blanking the PackageID. I've done exactly as
this
> > has
> > > > described (both
> > > > > by blanking the PackageID with "Disconnected Edit" *and* by having
a
> > blank
> > > > Global Variable
> > > > > that I set the PackageIDs to). However, when I invoke my outer
> > package, I
> > > > keep getting an
> > > > > "invalid GUID".
> > > > >
> > > > > Any help would be greatly appreciated. Thanks!
> > > > >
> > > > > John Peterson
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>|||Thanks Phil!
Ah -- I thought I might need to constantly set the PackageID to blank (hence the global
variable approach). But it sounds like I really only need to do this *once* with the
Disconnected Edit feature (unless I edit the task again, of course).
Thanks for the sample script!
John Peterson
"Phill Carter" <pcarter@.no-spam.bellpotter.com.au> wrote in message
news:edtCtxaTEHA.204@.TK2MSFTNGP10.phx.gbl...
> John
> If you never want to load the DTS package using either the Package and
> Version GUID, then I'd do as Allan has suggested and put either,
> a) Blank out the GUIDs using disconnected edit. They will only come back if
> you edit that task in the designer.
> b) Write a short ActiveScript task to blank out the GUIDs at the start of
> the package.
> Here is a script I use to accomplish that,
> <-- Start -->
> Dim oPkg
> Dim colTasks
> Dim sTsk
> ' open DTS package object so we can get the package details
> Set oPkg = DTSGlobalVariables.Parent
> ' open object referring to Tasks collection
> Set colTasks = oPkg.Tasks
> ' for each item in the collection
> For Each sTsk in colTasks
> ' check if the task is an Execute Package task
> If InStr(1, sTsk.Name, "DTSExecutePackageTask", vbTextCompare ) > 0 Then
> ' create object referring to selected task
> Set oTsk = oPkg.Tasks(sTsk.Name)
> ' blank out Package and VersionIDs so package loads by name only
> ' this will ensure that only the latest version is loaded.
> oTsk.Properties("PackageID").Value = ""
> oTsk.Properties("VersionID").Value = ""
> ' release object that was created
> Set oTsk = Nothing
> End If
> Next
> Set colTasks = Nothing
> Set oPkg = Nothing
> <-- End -->
> --
> Thanks
> Phill
>
> "John Peterson" <j0hnp@.comcast.net> wrote in message
> news:urAJ4tVTEHA.3548@.TK2MSFTNGP09.phx.gbl...
> > Sorry, I should have been more clear: I *always* want to call the
> sub-package by name
> > only, so I *do* want to use the GV to set the PackageID. The problem is,
> it seems like
> > DTS is sometimes replacing the actual string of "<not displayable>" for
> the PackageID when
> > I first load the package, which will then generate the "Invalid GUID
> specified" error. It
> > seems like I need to manually clear out the GV the first time I run it in
> the designer.
> >
> >
> > "Allan Mitchell" <allan@.no-spam.sqldts.com> wrote in message
> > news:uMVOqBTTEHA.1732@.TK2MSFTNGP09.phx.gbl...
> > > What I think then is happening is that you are saying "" which is not
> empty.
> > >
> > > Why do you have a GV setting the Package GUID in the first place if you
> do
> > > not want to use it?
> > >
> > > I would remove this altogether or if you want to occasionally specify
> the
> > > GUID and sometimes not then I would do it in an Active Script task where
> i
> > > could decide to use/or not based on a certain condition
> > >
> > > --
> > >
> > > --
> > >
> > > Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
> > > www.SQLDTS.com - The site for all your DTS needs.
> > > I support PASS - the definitive, global community
> > > for SQL Server professionals - http://www.sqlpass.org
> > >
> > >
> > > "John Peterson" <j0hnp@.comcast.net> wrote in message
> > > news:OsbAS6JTEHA.3548@.TK2MSFTNGP09.phx.gbl...
> > > > Thanks Allan!
> > > >
> > > > I *think* I might be having some issues with the blank global variable
> > > being "<not
> > > > displayable>". That is, when I use the Global Variable editor to
> "blank"
> > > out my PackageID
> > > > GV, everything works. However, if I save my package (as Structured
> > > Storage), exit the
> > > > package, and re-run it, I consistently get the "Invalid GUID
> specified"
> > > error. If I edit
> > > > the PackageID GV to blank it out again, then it works.
> > > >
> > > > I even added a ActiveX task to set the PackageID GV:
> > > >
> > > > ' Ensure that the PackageID global variable is blank.
> > > > DTSGlobalVariables("PackageID").Value = ""
> > > >
> > > > But upon initial load of the package, it still fails until I manually
> > > "dink" that GV.
> > > >
> > > > If you have the time and inclination, could you try that and let me
> know
> > > of your results?
> > > >
> > > > Many regards,
> > > >
> > > > John Peterson
> > > >
> > > >
> > > >
> > > > "Allan Mitchell" <allan@.no-spam.sqldts.com> wrote in message
> > > > news:eUuOQuJTEHA.2128@.TK2MSFTNGP11.phx.gbl...
> > > > > You could of course simply use an Active Script task and call the
> > > package
> > > > > that way OR an ExecuteProcess task with DTSRUN.
> > > > >
> > > > > I have just followed the article and it works for me.
> > > > >
> > > > >
> > > > > --
> > > > >
> > > > > --
> > > > >
> > > > > Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
> > > > > www.SQLDTS.com - The site for all your DTS needs.
> > > > > I support PASS - the definitive, global community
> > > > > for SQL Server professionals - http://www.sqlpass.org
> > > > >
> > > > >
> > > > > "John Peterson" <j0hnp@.comcast.net> wrote in message
> > > > > news:ObapPeJTEHA.3768@.TK2MSFTNGP11.phx.gbl...
> > > > > > (SQL Server 2000, SP3a)
> > > > > >
> > > > > > Hello all!
> > > > > >
> > > > > > I've got a package that has several "Execute Package Task"
> elements.
> > > I'd
> > > > > like to make the
> > > > > > sub-packages version-independent. I ran across this blurb:
> > > > > >
> > > > > > http://www.sqldts.com/default.aspx?216
> > > > > >
> > > > > > Which talks about blanking the PackageID. I've done exactly as
> this
> > > has
> > > > > described (both
> > > > > > by blanking the PackageID with "Disconnected Edit" *and* by having
> a
> > > blank
> > > > > Global Variable
> > > > > > that I set the PackageIDs to). However, when I invoke my outer
> > > package, I
> > > > > keep getting an
> > > > > > "invalid GUID".
> > > > > >
> > > > > > Any help would be greatly appreciated. Thanks!
> > > > > >
> > > > > > John Peterson
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>|||"...then you can remove the dependency on the PackageID, by blanking out the
PackageID property of the ExecutePackageTask... This can be done as a
one-off exercise with the Disconnected Edit feature..."
"If you regularly migrate packages and do not want to have to worry about
this, you can add a Dynamic Properties task to perform this during package
run-time..."
Is it not clear that you do this once, unless you change things?
Darren Green
http://www.sqldts.com
"John Peterson" <j0hnp@.comcast.net> wrote in message
news:e9rLYwdTEHA.1172@.TK2MSFTNGP11.phx.gbl...
> Thanks Phil!
> Ah -- I thought I might need to constantly set the PackageID to blank
(hence the global
> variable approach). But it sounds like I really only need to do this
*once* with the
> Disconnected Edit feature (unless I edit the task again, of course).
> Thanks for the sample script!
> John Peterson
>
> "Phill Carter" <pcarter@.no-spam.bellpotter.com.au> wrote in message
> news:edtCtxaTEHA.204@.TK2MSFTNGP10.phx.gbl...
> > John
> >
> > If you never want to load the DTS package using either the Package and
> > Version GUID, then I'd do as Allan has suggested and put either,
> > a) Blank out the GUIDs using disconnected edit. They will only come back
if
> > you edit that task in the designer.
> > b) Write a short ActiveScript task to blank out the GUIDs at the start
of
> > the package.
> > Here is a script I use to accomplish that,
> >
> > <-- Start -->
> > Dim oPkg
> > Dim colTasks
> > Dim sTsk
> >
> > ' open DTS package object so we can get the package details
> > Set oPkg = DTSGlobalVariables.Parent
> >
> > ' open object referring to Tasks collection
> > Set colTasks = oPkg.Tasks
> >
> > ' for each item in the collection
> > For Each sTsk in colTasks
> >
> > ' check if the task is an Execute Package task
> > If InStr(1, sTsk.Name, "DTSExecutePackageTask", vbTextCompare ) > 0
Then
> > ' create object referring to selected task
> > Set oTsk = oPkg.Tasks(sTsk.Name)
> >
> > ' blank out Package and VersionIDs so package loads by name only
> > ' this will ensure that only the latest version is loaded.
> > oTsk.Properties("PackageID").Value = ""
> > oTsk.Properties("VersionID").Value = ""
> >
> > ' release object that was created
> > Set oTsk = Nothing
> >
> > End If
> >
> > Next
> >
> > Set colTasks = Nothing
> > Set oPkg = Nothing
> >
> > <-- End -->
> >
> > --
> > Thanks
> > Phill
> >
> >
> > "John Peterson" <j0hnp@.comcast.net> wrote in message
> > news:urAJ4tVTEHA.3548@.TK2MSFTNGP09.phx.gbl...
> > > Sorry, I should have been more clear: I *always* want to call the
> > sub-package by name
> > > only, so I *do* want to use the GV to set the PackageID. The problem
is,
> > it seems like
> > > DTS is sometimes replacing the actual string of "<not displayable>"
for
> > the PackageID when
> > > I first load the package, which will then generate the "Invalid GUID
> > specified" error. It
> > > seems like I need to manually clear out the GV the first time I run it
in
> > the designer.
> > >
> > >
> > > "Allan Mitchell" <allan@.no-spam.sqldts.com> wrote in message
> > > news:uMVOqBTTEHA.1732@.TK2MSFTNGP09.phx.gbl...
> > > > What I think then is happening is that you are saying "" which is
not
> > empty.
> > > >
> > > > Why do you have a GV setting the Package GUID in the first place if
you
> > do
> > > > not want to use it?
> > > >
> > > > I would remove this altogether or if you want to occasionally
specify
> > the
> > > > GUID and sometimes not then I would do it in an Active Script task
where
> > i
> > > > could decide to use/or not based on a certain condition
> > > >
> > > > --
> > > >
> > > > --
> > > >
> > > > Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
> > > > www.SQLDTS.com - The site for all your DTS needs.
> > > > I support PASS - the definitive, global community
> > > > for SQL Server professionals - http://www.sqlpass.org
> > > >
> > > >
> > > > "John Peterson" <j0hnp@.comcast.net> wrote in message
> > > > news:OsbAS6JTEHA.3548@.TK2MSFTNGP09.phx.gbl...
> > > > > Thanks Allan!
> > > > >
> > > > > I *think* I might be having some issues with the blank global
variable
> > > > being "<not
> > > > > displayable>". That is, when I use the Global Variable editor to
> > "blank"
> > > > out my PackageID
> > > > > GV, everything works. However, if I save my package (as
Structured
> > > > Storage), exit the
> > > > > package, and re-run it, I consistently get the "Invalid GUID
> > specified"
> > > > error. If I edit
> > > > > the PackageID GV to blank it out again, then it works.
> > > > >
> > > > > I even added a ActiveX task to set the PackageID GV:
> > > > >
> > > > > ' Ensure that the PackageID global variable is blank.
> > > > > DTSGlobalVariables("PackageID").Value = ""
> > > > >
> > > > > But upon initial load of the package, it still fails until I
manually
> > > > "dink" that GV.
> > > > >
> > > > > If you have the time and inclination, could you try that and let
me
> > know
> > > > of your results?
> > > > >
> > > > > Many regards,
> > > > >
> > > > > John Peterson
> > > > >
> > > > >
> > > > >
> > > > > "Allan Mitchell" <allan@.no-spam.sqldts.com> wrote in message
> > > > > news:eUuOQuJTEHA.2128@.TK2MSFTNGP11.phx.gbl...
> > > > > > You could of course simply use an Active Script task and call
the
> > > > package
> > > > > > that way OR an ExecuteProcess task with DTSRUN.
> > > > > >
> > > > > > I have just followed the article and it works for me.
> > > > > >
> > > > > >
> > > > > > --
> > > > > >
> > > > > > --
> > > > > >
> > > > > > Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
> > > > > > www.SQLDTS.com - The site for all your DTS needs.
> > > > > > I support PASS - the definitive, global community
> > > > > > for SQL Server professionals - http://www.sqlpass.org
> > > > > >
> > > > > >
> > > > > > "John Peterson" <j0hnp@.comcast.net> wrote in message
> > > > > > news:ObapPeJTEHA.3768@.TK2MSFTNGP11.phx.gbl...
> > > > > > > (SQL Server 2000, SP3a)
> > > > > > >
> > > > > > > Hello all!
> > > > > > >
> > > > > > > I've got a package that has several "Execute Package Task"
> > elements.
> > > > I'd
> > > > > > like to make the
> > > > > > > sub-packages version-independent. I ran across this blurb:
> > > > > > >
> > > > > > > http://www.sqldts.com/default.aspx?216
> > > > > > >
> > > > > > > Which talks about blanking the PackageID. I've done exactly
as
> > this
> > > > has
> > > > > > described (both
> > > > > > > by blanking the PackageID with "Disconnected Edit" *and* by
having
> > a
> > > > blank
> > > > > > Global Variable
> > > > > > > that I set the PackageIDs to). However, when I invoke my
outer
> > > > package, I
> > > > > > keep getting an
> > > > > > > "invalid GUID".
> > > > > > >
> > > > > > > Any help would be greatly appreciated. Thanks!
> > > > > > >
> > > > > > > John Peterson
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>|||"Darren Green" <darren.green@.reply-to-newsgroup-sqldts.com> wrote in message
news:eivN0%23fTEHA.3476@.tk2msftngp13.phx.gbl...
> "...then you can remove the dependency on the PackageID, by blanking out the
> PackageID property of the ExecutePackageTask... This can be done as a
> one-off exercise with the Disconnected Edit feature..."
> "If you regularly migrate packages and do not want to have to worry about
> this, you can add a Dynamic Properties task to perform this during package
> run-time..."
> Is it not clear that you do this once, unless you change things?
It wasn't clear to me. Does "migrate packages" mean change them? Or move them from place
to place? Or how do I interpret that?
> --
> Darren Green
> http://www.sqldts.com
>
> "John Peterson" <j0hnp@.comcast.net> wrote in message
> news:e9rLYwdTEHA.1172@.TK2MSFTNGP11.phx.gbl...
> > Thanks Phil!
> >
> > Ah -- I thought I might need to constantly set the PackageID to blank
> (hence the global
> > variable approach). But it sounds like I really only need to do this
> *once* with the
> > Disconnected Edit feature (unless I edit the task again, of course).
> >
> > Thanks for the sample script!
> >
> > John Peterson
> >
> >
> >
> > "Phill Carter" <pcarter@.no-spam.bellpotter.com.au> wrote in message
> > news:edtCtxaTEHA.204@.TK2MSFTNGP10.phx.gbl...
> > > John
> > >
> > > If you never want to load the DTS package using either the Package and
> > > Version GUID, then I'd do as Allan has suggested and put either,
> > > a) Blank out the GUIDs using disconnected edit. They will only come back
> if
> > > you edit that task in the designer.
> > > b) Write a short ActiveScript task to blank out the GUIDs at the start
> of
> > > the package.
> > > Here is a script I use to accomplish that,
> > >
> > > <-- Start -->
> > > Dim oPkg
> > > Dim colTasks
> > > Dim sTsk
> > >
> > > ' open DTS package object so we can get the package details
> > > Set oPkg = DTSGlobalVariables.Parent
> > >
> > > ' open object referring to Tasks collection
> > > Set colTasks = oPkg.Tasks
> > >
> > > ' for each item in the collection
> > > For Each sTsk in colTasks
> > >
> > > ' check if the task is an Execute Package task
> > > If InStr(1, sTsk.Name, "DTSExecutePackageTask", vbTextCompare ) > 0
> Then
> > > ' create object referring to selected task
> > > Set oTsk = oPkg.Tasks(sTsk.Name)
> > >
> > > ' blank out Package and VersionIDs so package loads by name only
> > > ' this will ensure that only the latest version is loaded.
> > > oTsk.Properties("PackageID").Value = ""
> > > oTsk.Properties("VersionID").Value = ""
> > >
> > > ' release object that was created
> > > Set oTsk = Nothing
> > >
> > > End If
> > >
> > > Next
> > >
> > > Set colTasks = Nothing
> > > Set oPkg = Nothing
> > >
> > > <-- End -->
> > >
> > > --
> > > Thanks
> > > Phill
> > >
> > >
> > > "John Peterson" <j0hnp@.comcast.net> wrote in message
> > > news:urAJ4tVTEHA.3548@.TK2MSFTNGP09.phx.gbl...
> > > > Sorry, I should have been more clear: I *always* want to call the
> > > sub-package by name
> > > > only, so I *do* want to use the GV to set the PackageID. The problem
> is,
> > > it seems like
> > > > DTS is sometimes replacing the actual string of "<not displayable>"
> for
> > > the PackageID when
> > > > I first load the package, which will then generate the "Invalid GUID
> > > specified" error. It
> > > > seems like I need to manually clear out the GV the first time I run it
> in
> > > the designer.
> > > >
> > > >
> > > > "Allan Mitchell" <allan@.no-spam.sqldts.com> wrote in message
> > > > news:uMVOqBTTEHA.1732@.TK2MSFTNGP09.phx.gbl...
> > > > > What I think then is happening is that you are saying "" which is
> not
> > > empty.
> > > > >
> > > > > Why do you have a GV setting the Package GUID in the first place if
> you
> > > do
> > > > > not want to use it?
> > > > >
> > > > > I would remove this altogether or if you want to occasionally
> specify
> > > the
> > > > > GUID and sometimes not then I would do it in an Active Script task
> where
> > > i
> > > > > could decide to use/or not based on a certain condition
> > > > >
> > > > > --
> > > > >
> > > > > --
> > > > >
> > > > > Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
> > > > > www.SQLDTS.com - The site for all your DTS needs.
> > > > > I support PASS - the definitive, global community
> > > > > for SQL Server professionals - http://www.sqlpass.org
> > > > >
> > > > >
> > > > > "John Peterson" <j0hnp@.comcast.net> wrote in message
> > > > > news:OsbAS6JTEHA.3548@.TK2MSFTNGP09.phx.gbl...
> > > > > > Thanks Allan!
> > > > > >
> > > > > > I *think* I might be having some issues with the blank global
> variable
> > > > > being "<not
> > > > > > displayable>". That is, when I use the Global Variable editor to
> > > "blank"
> > > > > out my PackageID
> > > > > > GV, everything works. However, if I save my package (as
> Structured
> > > > > Storage), exit the
> > > > > > package, and re-run it, I consistently get the "Invalid GUID
> > > specified"
> > > > > error. If I edit
> > > > > > the PackageID GV to blank it out again, then it works.
> > > > > >
> > > > > > I even added a ActiveX task to set the PackageID GV:
> > > > > >
> > > > > > ' Ensure that the PackageID global variable is blank.
> > > > > > DTSGlobalVariables("PackageID").Value = ""
> > > > > >
> > > > > > But upon initial load of the package, it still fails until I
> manually
> > > > > "dink" that GV.
> > > > > >
> > > > > > If you have the time and inclination, could you try that and let
> me
> > > know
> > > > > of your results?
> > > > > >
> > > > > > Many regards,
> > > > > >
> > > > > > John Peterson
> > > > > >
> > > > > >
> > > > > >
> > > > > > "Allan Mitchell" <allan@.no-spam.sqldts.com> wrote in message
> > > > > > news:eUuOQuJTEHA.2128@.TK2MSFTNGP11.phx.gbl...
> > > > > > > You could of course simply use an Active Script task and call
> the
> > > > > package
> > > > > > > that way OR an ExecuteProcess task with DTSRUN.
> > > > > > >
> > > > > > > I have just followed the article and it works for me.
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > >
> > > > > > > --
> > > > > > >
> > > > > > > Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
> > > > > > > www.SQLDTS.com - The site for all your DTS needs.
> > > > > > > I support PASS - the definitive, global community
> > > > > > > for SQL Server professionals - http://www.sqlpass.org
> > > > > > >
> > > > > > >
> > > > > > > "John Peterson" <j0hnp@.comcast.net> wrote in message
> > > > > > > news:ObapPeJTEHA.3768@.TK2MSFTNGP11.phx.gbl...
> > > > > > > > (SQL Server 2000, SP3a)
> > > > > > > >
> > > > > > > > Hello all!
> > > > > > > >
> > > > > > > > I've got a package that has several "Execute Package Task"
> > > elements.
> > > > > I'd
> > > > > > > like to make the
> > > > > > > > sub-packages version-independent. I ran across this blurb:
> > > > > > > >
> > > > > > > > http://www.sqldts.com/default.aspx?216
> > > > > > > >
> > > > > > > > Which talks about blanking the PackageID. I've done exactly
> as
> > > this
> > > > > has
> > > > > > > described (both
> > > > > > > > by blanking the PackageID with "Disconnected Edit" *and* by
> having
> > > a
> > > > > blank
> > > > > > > Global Variable
> > > > > > > > that I set the PackageIDs to). However, when I invoke my
> outer
> > > > > package, I
> > > > > > > keep getting an
> > > > > > > > "invalid GUID".
> > > > > > > >
> > > > > > > > Any help would be greatly appreciated. Thanks!
> > > > > > > >
> > > > > > > > John Peterson
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>

No comments:

Post a Comment