dbTalk Databases Forums  

Duplicate connections when using LoadFromSQLServer and SaveToSQLSe

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


Discuss Duplicate connections when using LoadFromSQLServer and SaveToSQLSe in the microsoft.public.sqlserver.dts forum.



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

Default Duplicate connections when using LoadFromSQLServer and SaveToSQLSe - 09-24-2004 , 09:55 AM






Hello:

I am working on a VB.NET program that allows me to copy whatever DTS package
or packages from one server to another. I am using the following lines of
code to do the actual copying:

For Each strPackageName In arrPackageList
objDTSPackage = New DTS.Package2

'Copy DTS package from source server to destination server

objDTSPackage.LoadFromSQLServer(strSServer, strSUser, strSPassword,
DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_Default , , , , strPackageName)

objDTSPackage.SaveToSQLServerAs(strPackageName, strDServer, strDUser,
strDPassword, DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_Default )

objDTSPackage.UnInitialize()

objDTSPackage = Nothing
Next

Everything seems to work fine, but when I open a package on the destination
server, sometimes it has duplicated connections. For example, if the source
server has two connections originally, on the destination server, the package
shows me four connections. This happens with TEXT FILE connections (OLE DB
connections get copied fine).

I will appreciate any comments of how to explain or solve this behaviour.

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

Default Re: Duplicate connections when using LoadFromSQLServer and SaveToSQLSe - 09-25-2004 , 02:41 AM






You could of course use our tool

Transferring DTS Packages
(http://www.sqldts.com/Default.aspx?204)

--

--

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



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

Quote:
Hello:

I am working on a VB.NET program that allows me to copy whatever DTS
package
or packages from one server to another. I am using the following lines of
code to do the actual copying:

For Each strPackageName In arrPackageList
objDTSPackage = New DTS.Package2

'Copy DTS package from source server to destination server

objDTSPackage.LoadFromSQLServer(strSServer, strSUser, strSPassword,
DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_Default , , , , strPackageName)

objDTSPackage.SaveToSQLServerAs(strPackageName, strDServer, strDUser,
strDPassword, DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_Default )

objDTSPackage.UnInitialize()

objDTSPackage = Nothing
Next

Everything seems to work fine, but when I open a package on the
destination
server, sometimes it has duplicated connections. For example, if the
source
server has two connections originally, on the destination server, the
package
shows me four connections. This happens with TEXT FILE connections (OLE DB
connections get copied fine).

I will appreciate any comments of how to explain or solve this behaviour.



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 - 2013, Jelsoft Enterprises Ltd.