[英]How to run 2008R2 SSIS packages on SQL Server 2014 Standard environment?
In current, I have a .NET application which is executing 2008R2 SSIS packages and the application are running on win server 2008r2 (64bit).目前,我有一个 .NET 应用程序,它正在执行 2008R2 SSIS 包,并且该应用程序在 win server 2008r2(64 位)上运行。 These packages were built in BIDS 2008. After that, I upgraded my database server from SQL2008R2 to SQL2014 Standard (running on Win server 2012R2) and deployed .NET app to new environment.
这些包是在 BIDS 2008 中构建的。之后,我将我的数据库服务器从 SQL2008R2 升级到 SQL2014 Standard(在 Win server 2012R2 上运行)并将 .NET 应用程序部署到新环境。
An now, I'm encountering the issues with calling package from .NET application.现在,我遇到了从 .NET 应用程序调用包的问题。 The message error is ERROR: Could not load file or assembly "Microsoft.SqlServer.Dts.DTSRuntimeWrap.dll, Version=10.0.0.0, Culture=neutral, Public Key=..." or one of it's dependencies.
消息错误是错误:无法加载文件或程序集“Microsoft.SqlServer.Dts.DTSRuntimeWrap.dll,Version=10.0.0.0,Culture=neutral,Public Key=...”或其依赖项之一。 An attempt was made to load program with an incorrect format.
试图加载格式不正确的程序。
Step 1: create a .NET simple app to call package (SSIS 2008).步骤 1:创建一个 .NET 简单应用程序来调用包 (SSIS 2008)。 I also add 2 .dll version (10.0.0.0) for reference Microsoft.SQLServer.DTSRuntimeWrap and Microsoft.SQLServer.ManagedDTS allocated in C:\\Program Files (x86)\\Microsoft SQL Server\\100\\SDK\\Assemblies
我还添加了 2 个 .dll 版本 (10.0.0.0) 以供参考 Microsoft.SQLServer.DTSRuntimeWrap 和 Microsoft.SQLServer.ManagedDTS 分配在 C:\\Program Files (x86)\\Microsoft SQL Server\\100\\SDK\\Assemblies
using Microsoft.SqlServer.Dts.Runtime;
using Application = Microsoft.SqlServer.Dts.Runtime.Application;
private void button1_Click(object sender, EventArgs e)
{
try
{
string pkgLocation = @".\Package.dtsx";
Application app = new Application();
Package pkg = app.LoadPackage(pkgLocation, null);
DTSExecResult pkgResults = pkg.Execute();
MessageBox.Show(pkgResults.ToString());
}
catch(Exception ex)
{
MessageBox.Show("ERROR: " + ex.Message);
}
}
Step 2: deploy this app (included 2 .dll, the package) to new environment and execute it.第 2 步:将此应用程序(包括 2 个 .dll,包)部署到新环境并执行它。 The result is error message as above.
结果是上面的错误信息。
In new environment, 2 .dll is version 12.0.2000.8 allocate in C:\\Program Files (x86)\\Microsoft SQL Server\\120\\SDK\\Assemblies.在新环境中,2 .dll 是版本 12.0.2000.8 分配在 C:\\Program Files (x86)\\Microsoft SQL Server\\120\\SDK\\Assemblies 中。 And I guess that whenever the package is executed it also requires some functions of old .dll version 10.0.0.0 to execute their's components (Execute SQL Task, Task Script,...) but these .dll is not existed in new environment and it causes error.
而且我猜,每当执行包时,它也需要旧 .dll 版本 10.0.0.0 的一些功能来执行它们的组件(执行 SQL 任务、任务脚本...),但这些 .dll 在新环境中不存在,它导致错误。
So, how can I resolve the issue except upgrading SSIS packages to 2014 or any suggestions?那么,除了将 SSIS 包升级到 2014 或任何建议之外,我该如何解决这个问题?
Many thanks,非常感谢,
Your 2008R2 packages need to be upgraded to 2014 since you did an upgrade of the server, rather than a side-by-side install.您的 2008R2 软件包需要升级到 2014,因为您升级了服务器,而不是并行安装。 So there are two possibilities that I can think of:
所以我能想到的有两种可能:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.