从命令行运行SSIS包时出错

时间:2021-11-09 11:33:04

Ultimately, I'm trying to schedule SSIS packages to run on a regular basis using Task Scheduler in an Azure VM (Windows Server 2016 Datacenter). From the command line on my development machine (Windows 10), I'm able to run...

最终,我正在尝试使用Azure VM(Windows Server 2016 Datacenter)中的任务计划程序定期运行SSIS包。从我的开发机器(Windows 10)上的命令行,我可以运行...

dtexec.exe /Project "pathToMy.ispac" /Package "pathToMy.dtsx"

...and it works as expected. However, when I try to do the same from the Azure VM I get the following error:

......它按预期工作。但是,当我尝试从Azure VM执行相同操作时,我收到以下错误:

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

Microsoft(R)SQL Server执行包实用程序版本11.0.6020.0(适用于32位版权所有(C)Microsoft Corporation)。版权所有。

Started: 2:17:46 PM Could not load package "MyPackage.dtsx" because of error 0x80131500. Description: The package failed to load due to error 0xC0011008 "Error loading from XML. No further detailed error information can be specified for this problem because no Events object was passed where detailed error information can be stored.". This occurs when CPackage::LoadFromXML fails. Source: MyPackage Started: 2:17:46 PM Finished: 2:17:47 PM Elapsed: 0.547 seconds

开始于:2:17:46 PM由于错误0x80131500无法加载包“MyPackage.dtsx”。说明:由于错误0xC0011008导致程序包无法加载“从XML加载时出错。无法为此问题指定更详细的错误信息,因为没有事件对象被传递,可以存储详细的错误信息。”当CPackage :: LoadFromXML失败时会发生这种情况。来源:MyPackage开始时间:下午2:17:46完成时间:下午2:17:47经过:0.547秒

On both machines, I have the same version of SQL Server 2016 Developer (w/ SSIS) and Visual Studio 2015 installed. Also, I'm able to run the package fine on the VM from within Visual Studio. It's only from dtexec.exe that I have issues.

在这两台机器上,我安装了相同版本的SQL Server 2016 Developer(w / SSIS)和Visual Studio 2015。此外,我能够在Visual Studio中在VM上运行该程序包。它只是来自dtexec.exe,我有问题。

I've tried every solution on here from other posts getting similar errors and none have helped. Any ideas?

我已经尝试过其他帖子中的每个解决方案都会遇到类似的错误而没有任何帮助。有任何想法吗?

Thanks, Ian

谢谢,伊恩

1 个解决方案

#1


0  

Thanks to @Nick.McDermaid, the answer to this riddle has been found. By running dtexec.exe (with no parameters) on the dev machine and on the VM, I was able to see that the VM version was v11 and the dev version was v13 which explained why I was getting the error and why one worked and another didn't.

感谢@ Nick.McDermaid,找到了这个谜语的答案。通过在开发机器和VM上运行dtexec.exe(没有参数),我能够看到VM版本是v11而开发版本是v13,这解释了为什么我收到错误以及为什么一个工作而另一个工作没有。

I then did a File Explorer search on the VM for dtexec.exe copies and found several. Apparently, the environment path was set to find the older version. I probably could have found the variable causing this problem and changed it. However, out of concern about breaking something else and wanting a quick solution, I chose to execute using the full path to the correct version. For v13, this ended up being...

然后,我在VM上搜索了dtexec.exe副本的文件资源管理器,并找到了几个。显然,环境路径设置为查找旧版本。我可能已经找到导致此问题的变量并更改了它。然而,出于对破坏其他东西并想要快速解决方案的担忧,我选择使用正确版本的完整路径执行。对于第13版,这最终成为......

"C:\Program Files\Microsoft SQL Server\130\DTS\Binn\dtexec.exe"

“C:\ Program Files \ Microsoft SQL Server \ 130 \ DTS \ Binn \ dtexec.exe”

So, for my schedule task I set the following properties for my "Start a program" action.

因此,对于我的计划任务,我为“启动程序”操作设置了以下属性。

Program/Script: "C:\Program Files\Microsoft SQL Server\130\DTS\Binn\dtexec.exe"

程序/脚本:“C:\ Program Files \ Microsoft SQL Server \ 130 \ DTS \ Binn \ dtexec.exe”

Add Arguments: /Project "bin/Development/myProject.ispac" /Package "myPackage.dtsx"

添加参数:/ Project“bin / Development / myProject.ispac”/ Package“myPackage.dtsx”

Start in: c:{path to my .dtsx file}

开始于:c:{我的.dtsx文件的路径}

#1


0  

Thanks to @Nick.McDermaid, the answer to this riddle has been found. By running dtexec.exe (with no parameters) on the dev machine and on the VM, I was able to see that the VM version was v11 and the dev version was v13 which explained why I was getting the error and why one worked and another didn't.

感谢@ Nick.McDermaid,找到了这个谜语的答案。通过在开发机器和VM上运行dtexec.exe(没有参数),我能够看到VM版本是v11而开发版本是v13,这解释了为什么我收到错误以及为什么一个工作而另一个工作没有。

I then did a File Explorer search on the VM for dtexec.exe copies and found several. Apparently, the environment path was set to find the older version. I probably could have found the variable causing this problem and changed it. However, out of concern about breaking something else and wanting a quick solution, I chose to execute using the full path to the correct version. For v13, this ended up being...

然后,我在VM上搜索了dtexec.exe副本的文件资源管理器,并找到了几个。显然,环境路径设置为查找旧版本。我可能已经找到导致此问题的变量并更改了它。然而,出于对破坏其他东西并想要快速解决方案的担忧,我选择使用正确版本的完整路径执行。对于第13版,这最终成为......

"C:\Program Files\Microsoft SQL Server\130\DTS\Binn\dtexec.exe"

“C:\ Program Files \ Microsoft SQL Server \ 130 \ DTS \ Binn \ dtexec.exe”

So, for my schedule task I set the following properties for my "Start a program" action.

因此,对于我的计划任务,我为“启动程序”操作设置了以下属性。

Program/Script: "C:\Program Files\Microsoft SQL Server\130\DTS\Binn\dtexec.exe"

程序/脚本:“C:\ Program Files \ Microsoft SQL Server \ 130 \ DTS \ Binn \ dtexec.exe”

Add Arguments: /Project "bin/Development/myProject.ispac" /Package "myPackage.dtsx"

添加参数:/ Project“bin / Development / myProject.ispac”/ Package“myPackage.dtsx”

Start in: c:{path to my .dtsx file}

开始于:c:{我的.dtsx文件的路径}