Dan's code show you how to load file packages, you might want to look
at the other LoadFrom.... methods in Books Online.
There is a sample sp to execute packages from T-SQL, on my site, kindly
borrowed from Neil's FAQ.
As for the command prompt idea have a look for DTSRUN in Books Online.
>Shawn, the VB Script below may get you started. Note that you will need to
>add code if you want to replace an existing package of the same name.
>Option Explicit
>Const ServerName = "ServerName"
>Const PackageFileName = "c:\temp\PackageFileName.dts"
>Const DTSSQLStgFlag_UseTrustedConnection = 256
>Dim DTSPk
>Set DTSPk = CreateObject("dts.package")
>DTSPk.LoadFromStorageFile PackageFileName, ""
>DTSPk.SaveToSQLServer ServerName, , , DTSSQLStgFlag_UseTrustedConnection
>MsgBox "Package " & DTSPk.Name " added to SQL Server " & ServerName
>Set DTSPk = Nothing
>Hope this helps.
>> Hi fellow DBAs,
>> I am in need of getting some sort of script that I can run at a
>> command prompt or transact-sql to load a local dts packages.
>> Surely there has to be a way to load these things without having to
>> go through that blasted GUI.
>> The way I would prefer is to have something like Load_DTS.exe
>> ServerName PackageName
>> Has anybody ever done this before?
>> Shawn Nesser
>> DBA
>> Intertech Management Group
>> 636-237-2336
>> Sent via Deja.com http://www.deja.com/
>> Before you buy.
--
Darren Green
SQL/DTS - http://www.swynk.com/friends/green/