How to execute dtsx packages through command line

前端 未结 3 1101
没有蜡笔的小新
没有蜡笔的小新 2020-12-03 04:13

when i execute dtsx package through command line i am triggered with the following error saying

1.The connection is not found , the error is thrown by connections co

相关标签:
3条回答
  • 2020-12-03 04:30

    Taking a guess here while I wait on an answer to the comment, generally when a package runs fine in BIDS but doesn't work from the commandline, I find it's related to 64/32 bit incompatibility.

    Are you using Excel, Access or anything else that under the sheets uses the JET driver? That only works in 32 bit mode.

    On a 64 bit OS, by default when you create a new ODBC connection, you'll be creating it in the 64 bit namespace which the 32bit version won't be able to access?

    Are you using Informix or UDB/DB2 drivers? I only ever found 32 versions of those.

    Running a package from the command line

    dtexec is the command line mechanism for running an SSIS package. It comes in 2 flavors for 64 bit OS, both are named dtexec and generally the 32 bit is referenced in the Windows Path environment variable

    On a 64 bit OS, the default path to the 64 bit would be "c:\Program Files\Microsoft SQL Server\100\DTS\Binn\DTExec.exe"

    Still on 64 bit OS, the path to the 32 version would be "c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\DTExec.exe"

    To run a package named FooBar.dtsx that lives in C:\Src\MyProject\MyProject, invocation would be

    "c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\DTExec.exe" /file C:\Src\MyProject\MyProject\FooBar.dtsx
    

    If that package lives on SQL Server (DEVSQL01) in the folder MyProject, this would be the call to run the same package.

    "c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\DTExec.exe" /SQL \MyProject\FooBar /SERVER DEVSQL01
    

    Edit

    To apply a configuration, you need to specify the /CONF option

    "c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\DTExec.exe" /file C:\Src\MyProject\MyProject\FooBar.dtsx /CONF C:\FooBar.dtsConfig
    

    Looking at your comments, the only difference between our usage is you have wrapped everything in double quotes. Try it without the preceding and trailing quote.

    0 讨论(0)
  • 2020-12-03 04:35

    type below text to call SSIS package

    dtexec /f /set \package.variables[Variable]; value

    Example:- dtexec /f E:\test_package\test_package\Package.dtsx /set \package.variables[id];1

    Reference Ways to execute SSIS package

    0 讨论(0)
  • 2020-12-03 04:38

    The /SQL option is for packages deployed to the MSDB -> servername\StoredPackages\MSDB\

    0 讨论(0)
提交回复
热议问题