June 10, 2003 at 7:41 am
I am asking, if anybody know how to import DTS pakage with T-SQL script? I wouldn't like to use Enterprise manager for this job.
June 12, 2003 at 10:33 am
Hi,
You need to use DTSRUN utility, check BOL for more information.
This can be called from within T-SQL using the xp_cmdshell extended stored procedure.
Regards.
JFB
June 13, 2003 at 12:58 am
With DTSRUN utility, I think, it is not possible to import DTS package from structured storage file to SQL Server. I have read BOL about DTSRUN utility and there is just explanation how to save package from SQL server to structured storage file.
My task is to prepare import packages from structored storage file to SQL server without using EM.
Regargds.
June 13, 2003 at 9:00 am
Hi,
Yes you can execute structured storage file with DTSRUN utility.
dtsrun /Ffilename /Npackage_name /Mpackage_password
Regards
Johnny
June 13, 2003 at 12:51 pm
Are u the owner of the DTS package?
June 16, 2003 at 6:05 am
Thank for sintax and help.
With suggested code I can excute DTS package from file, but I can't store it into SQL server.
In the BOL under DTS programming topic, I found out the following code which in VB works and solve my problem:
Dim package As New DTS.Package2
package.LoadFromStorageFile "fileName", "", "", "", "PackageName"
package.SaveToSQLServer "sQLServerName", "", "", DTSSQLStgFlag_UseTrustedConnection
For T-SQL solution I used OLE Automation Objects stored procedures to execute this two VB lines.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply