Leo Matter
2005-07-16 13:48:48 UTC
Hi
I am trying to copy DTS packages between servers using vbscript, and
absolutely want to keep the text annotations, design, etc....
as documented here, this does not work:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q249901
and I do not understand the workaround.
it should possible to do it, since with Enterprise Manager you can do it,
since service pack 2 or 3. save to storage file, reopen it, and still looks
wonderful.
here is my code so far:
Dim fso: Set fso = CreateObject("Scripting.FileSystemObject")
Dim CurrentFolder: Set CurrentFolder = fso.GetFolder(".")
Dim Files: Set Files = CurrentFolder.Files
Dim File
For Each File In Files
if UCase(right(File.Name, 3)) = "DTS" then
dim oPkg
set oPkg = createobject("dts.package")
opkg.LoadFromStorageFile file.path, ""
'msgbox(opkg.Name)
'I rename the package intentionally to the file name - with SaveToSqlServer
it does not work either
opkg.SaveToSQLServerAs file.name, servername,sa_user,
sa_pw,DTSSQLStgFlag_Default,"","",,nothing,0
end if
Next
does anybody have a solution?
i probably could also do it with BCP and sp_add_dtspackage - but it is not
documented so probably should not do it.
Kind Regards
Leo Matter
I am trying to copy DTS packages between servers using vbscript, and
absolutely want to keep the text annotations, design, etc....
as documented here, this does not work:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q249901
and I do not understand the workaround.
it should possible to do it, since with Enterprise Manager you can do it,
since service pack 2 or 3. save to storage file, reopen it, and still looks
wonderful.
here is my code so far:
Dim fso: Set fso = CreateObject("Scripting.FileSystemObject")
Dim CurrentFolder: Set CurrentFolder = fso.GetFolder(".")
Dim Files: Set Files = CurrentFolder.Files
Dim File
For Each File In Files
if UCase(right(File.Name, 3)) = "DTS" then
dim oPkg
set oPkg = createobject("dts.package")
opkg.LoadFromStorageFile file.path, ""
'msgbox(opkg.Name)
'I rename the package intentionally to the file name - with SaveToSqlServer
it does not work either
opkg.SaveToSQLServerAs file.name, servername,sa_user,
sa_pw,DTSSQLStgFlag_Default,"","",,nothing,0
end if
Next
does anybody have a solution?
i probably could also do it with BCP and sp_add_dtspackage - but it is not
documented so probably should not do it.
Kind Regards
Leo Matter