dts run utility

  • Hi All

    anybody can help me how to run dts package save  in MSDB database automatically using SQL script??

    Let say, my database name is DBServer, database name 'Injury', user MMC/Administrator, password '12345' and the DTS Package name is QuestionMigration

    pls help

    Regards,

    Julie

     

     

     

  • Easiest way is to setup the DTS Package to run in a scheduled job.

    Use the DTSRUNUI program to generate the command line for you, this way you won't have an encrypted command line. With DTSRUNUI you specify all the connection properties to access the server, then select your package from the drop-down list. If your package needs to be supplied with global variables, you can assign these using the 'Advanced Button'

    Once you've put everything in, don't click the 'Schedule...' button, click the 'Advanced' button instead. At the bottom right of the dialog you'll see a 'Generate...'. Click this and the command line will be generated int he textbox to the left of the button. Copy and paste the command-line to notepad or some other text editor. The reason you do this is because you want to remove the /G parameter that specifies the package GUID. By removing the /G parameter and the GUID, the DTSRUN program will look for and load the package by name only.

    Once you have copied the command line you can cancel out of all the dialogs for DTSRUNUI. Then create a scheduled job in the normal manner using Enterprise Manager and copy in the altered DTSRUN command-line.

     

    --------------------
    Colt 45 - the original point and click interface

  • Phil, just wondering, it is possible to create a xp_proc and call a batch file that contains all your command lines?

  • Anythings possible, but the real question is, why would you want to??

    Can't think of any reason you'd go to all the trouble of calling a batch file when it's much easier to run a scheduled job via sp_start_job.

     

    --------------------
    Colt 45 - the original point and click interface

  • We have a stored proc which calls xp_cmdshell and takes a package name as a parameter.  Have to setup a proxy account or run it as admin.  Its easier to create it as a job though as Phil said.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply