Opening a DTS package file from command promt

Opening a DTS package file from command promt

Post by Per Schjetn » Wed, 31 Jul 2002 16:50:01



Is there a way to open a File-DTS package from the command prompt? This
command opens the SQL MMC console, but no package...

C:\WINDOWS\system32\mmc.exe /s "C:\Program Files\Microsoft SQL
Server\80\Tools\BINN\SQL Server Enterprise Manager.MSC" c:\temp\Test.DTS

 
 
 

Opening a DTS package file from command promt

Post by Michal Raat » Wed, 31 Jul 2002 16:57:22


try
Program Files\Microsoft SQL Server\80\Tools\Binn\DtsRUN.exe

to generate correst syntax i suggest
Program Files\Microsoft SQL Server\80\Tools\Binn\DTSRunUI.exe utitity



Quote:> Is there a way to open a File-DTS package from the command prompt? This
> command opens the SQL MMC console, but no package...

> C:\WINDOWS\system32\mmc.exe /s "C:\Program Files\Microsoft SQL
> Server\80\Tools\BINN\SQL Server Enterprise Manager.MSC" c:\temp\Test.DTS


 
 
 

Opening a DTS package file from command promt

Post by Per Schjetn » Wed, 31 Jul 2002 17:08:19


I don't want to run the package, just open it for editing. Sorry about not
expressing myself clearly. I have a .NET project with all stored procedures,
documentation etc and I want to have my DTS packages there as well so I can
include it all in sourcesafe.


> try
> Program Files\Microsoft SQL Server\80\Tools\Binn\DtsRUN.exe

> to generate correst syntax i suggest
> Program Files\Microsoft SQL Server\80\Tools\Binn\DTSRunUI.exe utitity



> > Is there a way to open a File-DTS package from the command prompt? This
> > command opens the SQL MMC console, but no package...

> > C:\WINDOWS\system32\mmc.exe /s "C:\Program Files\Microsoft SQL
> > Server\80\Tools\BINN\SQL Server Enterprise Manager.MSC" c:\temp\Test.DTS

 
 
 

Opening a DTS package file from command promt

Post by Allan Mitche » Thu, 01 Aug 2002 04:12:23


If your intention is to spring open the GUI designer and edit the
package then No.  I have asked at sqlwish for that in the future.

What about the package do you want to edit and why is your method of
opening the cmdline ?

Allan
www.SQLDTS.com

On Tue, 30 Jul 2002 09:50:01 +0200, "Per Schjetne"


>Is there a way to open a File-DTS package from the command prompt? This
>command opens the SQL MMC console, but no package...

>C:\WINDOWS\system32\mmc.exe /s "C:\Program Files\Microsoft SQL
>Server\80\Tools\BINN\SQL Server Enterprise Manager.MSC" c:\temp\Test.DTS

Allan Mitchell
www.SQLDTS.com
 
 
 

Opening a DTS package file from command promt

Post by Per Schjetn » Thu, 01 Aug 2002 16:16:49


Well, my primary goal is to have all my sourcecode, documentation etc etc in
one project. I have made a .NET database project and included it in
sourcesafe. Now all my Stored Procedures, Tables, Viso-flowcharts,
Word-document etc is all in one project and I can just doubleclick these
documents in .NET to open them. The world would have been perfect if I just
could save my DTS packages as files and include them as well. I can do that
but I can't open them by just doubleclicking them.

Per :-)


> If your intention is to spring open the GUI designer and edit the
> package then No.  I have asked at sqlwish for that in the future.

> What about the package do you want to edit and why is your method of
> opening the cmdline ?

> Allan
> www.SQLDTS.com

> On Tue, 30 Jul 2002 09:50:01 +0200, "Per Schjetne"

> >Is there a way to open a File-DTS package from the command prompt? This
> >command opens the SQL MMC console, but no package...

> >C:\WINDOWS\system32\mmc.exe /s "C:\Program Files\Microsoft SQL
> >Server\80\Tools\BINN\SQL Server Enterprise Manager.MSC" c:\temp\Test.DTS

> Allan Mitchell
> www.SQLDTS.com

 
 
 

1. DTS package to Promt user for file name

Mark

You can create a VB Script task and execute the InputBox() function from
there, and also, change the source text file's data source.
On success, continue to the next task that transforms the data from your
source text file (at first, create a sample text file in the same structure)
to your destination:

Function Main()

  dim oPackage
  dim oConn
  dim FileName

  FileName = InputBox("What is the file name?")

  'get package's object handle
  set oPackage = DTSGlobalVariables.parent
  'connection 1 is the source file
  set oConn = oPackage.connections(1)
  oConn.datasource = FileName

  set oPackage = nothing
  set oConn = nothing

  Main = DTSTaskExecResult_Success

End Function

--
Itzik Ben-Gan
SQL Server MVP
Hi-Tech College, Israel

http://www.mcse.org.il/isql



2. Random thoughts - Unit testing a datamodel

3. Cannot edit DTS package/DTS package opens, but window is blank

4. Closing Comm Control from Executable

5. DTS packages to open files only for reading

6. Learning Client SQL

7. Open Text files into a recordset in VBScript in a DTS Package

8. Concurrent access lock

9. DTS File Package open errors

10. Login to osql at command promt

11. run bcp in command promt and query analyzer **

12. Import a DTS Package from a DTS file

13. DTS error migrating dts saved to file packages.