Execute SSIS package using bat file

  • Hello,

    I am tasked with creating a batch file to execute SSIS packages. To be honest, I do not have a lot of experience creating batch files. Any assistance would be appreciated.

    STG

    The are no problems, only solutions. --John Lennon

  • Hi,

    Code in your batch file would be something like this:

    C:\Program Files\Microsoft SQL Server\100\DTS\Binn\dtexec /f "c:\pkgOne.dtsx" /l "DTS.LogProviderTextFile;c:\log.txt"

    # /f "c:\pkgOne.dtsx" refers to the location of the saved SSIS pacakage.

    # /l "DTS.LogProviderTextFile;c:\log.txt" refers to the location of the logfile which will be used for logging. It is optional. you can just use :

    C:\Program Files\Microsoft SQL Server\100\DTS\Binn\dtexec /f "c:\pkgOne.dtsx"

    If you don't want logging in your scenario.

    Hope it Helps...!!!!

    Regards,
    Shafat Husain
    🙂
    And Your Lord Never Forgets...!! (64:19 -- Quran)

  • This was removed by the editor as SPAM

  • I have to wonder why you need to use a batch file. Do you need to schedule the package with Windows Task Scheduler? I myself prefer the SQL Server Agent manager of Sql Server for running Jobs, if it is available to you.

    For running a SSIS package in a batch file, look up the comman line utility DTExec. You'll do something like

    DTEXEC.exe /DTS "\File System\yourPackageName" /SERVER localhost

    ----------------------------------------------------

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

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