首页 > 解决方案 > 从命令行运行 SSIS 例程的问题

问题描述

无法从命令行运行 SSIS 包

尝试了机器上 DTExec.exe 的所有位置

我有一个基本的 SSIS 包,可以读取文件并加载到数据库中。(从 SSDT 运行良好)

尝试了以下命令行:

"C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\CommonExtensions\Microsoft\SSIS\150\Binn\DTExec.exe" /File "C:\test_ssis\importStuff.dtsx"

<i belive this is the installation for SSDT, but could be wrong!!>

"C:\Program Files (x86)\Microsoft Visual Studio\2017\SQL\Common7\IDE\CommonExtensions\Microsoft\SSIS\150\Binn\DTExec.exe" /File "C:\test_ssis\importStuff.dtsx"
"C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\DTExec.exe" /File "C:\test_ssis\importStuff.dtsx"                             
"C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\DTExec.exe" /File "C:\test_ssis\importStuff.dtsx"                             
"C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\DTExec.exe" /File "C:\test_ssis\importStuff.dtsx"

对应于我可以在计算机上找到 DTExec 的所有位置

运行第一个命令行给出:

Started:  15:16:56
Error: 2019-09-02 15:16:58.02
   Code: 0xC001F02A
   Source: Load Full PLU Files
   Description: Cannot create a task from XML for task "get header info", type "Microsoft.ScriptTask" due to error 0x80070057 "The parameter is incorrect.".
End Error
Error: 2019-09-02 15:16:58.03
   Code: 0xC0010018
   Source: get header info
   Description: Failed to load task "get header info", type "". The contact information for this task is "".
End Error
Error: 2019-09-02 15:16:58.32
   Code: 0xC0040019
   Source: load full updates load full updates (SSIS.Pipeline)
   Description: Data Flow objects cannot be loaded. Check if Microsoft.SqlServer.PipelineXml.dll is properly registered.
End Error
Error: 2019-09-02 15:16:58.32
   Code: 0xC0010018
   Source: load full updates
   Description: Failed to load task "load full updates", type "SSIS.Pipeline.7". The contact information for this task is "Performs high-performance data extraction, transformation and loading;Microso
ft Corporation; Microsoft SQL Server; (C) Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1".
End Error
Error: 2019-09-02 15:16:58.40
   Code: 0xC0010026
   Source: get header info
   Description: The task has failed to load. The contact information for this task is "".
End Error
Error: 2019-09-02 15:16:58.42
   Code: 0xC0024107
   Source: get header info
   Description: There were errors during task validation.
End Error
Error: 2019-09-02 15:16:58.42
   Code: 0xC0010025
   Source: importHQFullExtract
   Description: The package cannot execute because it contains tasks that failed to load.
End Error
DTExec: The package execution returned DTSER_FAILURE (1).
Started:  15:16:56
Finished: 15:16:58
Elapsed:  1.997 seconds

all the others give somethign like :

Microsoft (R) SQL Server Execute Package Utility
Version 15.0.1301.433 for 32-bit
Copyright (C) 2019 Microsoft. All rights reserved.

Started:  15:53:53
Could not create DTS.Application because of error 0x80040154
Started:  15:53:53
Finished: 15:53:53
Elapsed:  0.016 seconds

我认为一些谷歌搜索暗示这两个似乎都与版本有关?

但我很困惑,因为其中一个肯定符合 SSDT 附带的那个?

当我在 SSDT 行中“帮助”时是正确的吗?

知道我在这里做错了什么吗?

标签: sql-serverssisdtexec

解决方案


确保您的 SQL Server 版本与 Visal Studio 相同。我使用的是 2019 版本,正确的版本是 150。

只需安装文件:Microsoft 页面上可用的 SQL2019-SSEI-Expr 或其他 wchis 适合您的版本。

然后更改:“C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\DTExec.exe”


推荐阅读