dbTalk Databases Forums  

VersionID in Structured File

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


Discuss VersionID in Structured File in the microsoft.public.sqlserver.dts forum.



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

Default VersionID in Structured File - 11-12-2003 , 03:20 AM






I am using a VBScript ActiveX task to load in a structured file and
then save said package to either the local server or the repository.
This works fine except that the spectre of multiple versions rears
it's head, that is the LoadFromStorageFile call will only be happy if
there is VersionID referenced as a parameter. As you can see, I do not
reference the package name or version:

:
oPkg.LoadFromStorageFile sFileName, ""
oPkg.SaveToSQLServer sServer, "", "", 256
:

So, what I would like to do is be able to always load the latest
version of the package, regardless of how many there are or when they
were created. At the point when I load the file neither do I know nor
care what the versions are.

Has anyone found an efficient way of doing this or even enumerating
the versions to establish the latest?

Thanks

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

Default Re: VersionID in Structured File - 11-12-2003 , 08:48 AM






What hapens with

oPkg.LoadFromStorageFile sFileName

--

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


"Neil" <neil.pennock (AT) rebusgroup (DOT) com> wrote

Quote:
I am using a VBScript ActiveX task to load in a structured file and
then save said package to either the local server or the repository.
This works fine except that the spectre of multiple versions rears
it's head, that is the LoadFromStorageFile call will only be happy if
there is VersionID referenced as a parameter. As you can see, I do not
reference the package name or version:

:
oPkg.LoadFromStorageFile sFileName, ""
oPkg.SaveToSQLServer sServer, "", "", 256
:

So, what I would like to do is be able to always load the latest
version of the package, regardless of how many there are or when they
were created. At the point when I load the file neither do I know nor
care what the versions are.

Has anyone found an efficient way of doing this or even enumerating
the versions to establish the latest?

Thanks



Reply With Quote
  #3  
Old   
Neil Pennock
 
Posts: n/a

Default Re: VersionID in Structured File - 11-12-2003 , 10:31 AM



The DTS package returns the following error if there is more than one
version:

The specified Storage File contains multiple packages; Loading requires
a Name or GUID

I know that this issue can be circumnavigated if the package is saved as
a Structured Storage file from fresh, in which case it saves only on
version and the load call does not have a problem. I do not really want
to have to save each of the several hundred packages that I have already
created and which have multiple versions!

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

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

Default Re: VersionID in Structured File - 11-12-2003 , 03:24 PM



The DTS package returns the following error if there is more than one
version:

The specified Storage File contains multiple packages; Loading requires
a Name or GUID

I know that this issue can be circumnavigated if the package is saved as
a Structured Storage file from fresh, in which case it saves only one
version and the load call does not have a problem. I do not really want
to have to save each of the several hundred packages that I have already
created and which have multiple versions!

Reply With Quote
  #5  
Old   
rhino
 
Posts: n/a

Default Re: VersionID in Structured File - 11-20-2003 , 06:15 PM




Neil - this is a BIG problem - been fighting it for years!

My needs are even simpler - I frequently use a simple 'Master' dts
package that call dtsrun and reference a package in each task.
Whether you reference a SQL Server based package or a Structured
Storage File, you get the same version problems. Perfect example of
the cure being worse than the ailment!!
Please let me know if you find a solution!
Jmiller
jmiller6587 (AT) hotmail (DOT) com
GOOD LUCK!!!




On 12 Nov 2003 13:24:13 -0800, neil.pennock (AT) rebusgroup (DOT) com (Neil)
wrote:

Quote:
The DTS package returns the following error if there is more than one
version:

The specified Storage File contains multiple packages; Loading requires
a Name or GUID

I know that this issue can be circumnavigated if the package is saved as
a Structured Storage file from fresh, in which case it saves only one
version and the load call does not have a problem. I do not really want
to have to save each of the several hundred packages that I have already
created and which have multiple versions!


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

Default Re: VersionID in Structured File - 11-25-2003 , 02:51 PM



In article <q2mqrv8fr1gnnp8s19ukt90tn7a7v4rv80 (AT) 4ax (DOT) com>, rhino
<rhino (AT) airmail (DOT) net> writes
Quote:
Neil - this is a BIG problem - been fighting it for years!

My needs are even simpler - I frequently use a simple 'Master' dts
package that call dtsrun and reference a package in each task.
Whether you reference a SQL Server based package or a Structured
Storage File, you get the same version problems. Perfect example of
the cure being worse than the ailment!!
Please let me know if you find a solution!
snip
The DTS package returns the following error if there is more than one
version:

The specified Storage File contains multiple packages; Loading requires
a Name or GUID

I know that this issue can be circumnavigated if the package is saved as
a Structured Storage file from fresh, in which case it saves only one
version and the load call does not have a problem. I do not really want
to have to save each of the several hundred packages that I have already
created and which have multiple versions!

With both SQL Server and Structured storage files you can load the
latest "version" by specifying the name only.

The problem occurs when using a structured storage file that has
multiple packages in it. This is not the same as having multiple
versions of the same package. Packages are differentiated by the package
GUID. Name is often a good indicator, but is not guaranteed to be unique
or even enforced for that matter except in some areas of the UI.
--
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.