如何在 SQL Server 2014 Standard 环境中运行 2008R2 SSIS 包? [英] How to run 2008R2 SSIS packages on SQL Server 2014 Standard environment?

查看:51
本文介绍了如何在 SQL Server 2014 Standard 环境中运行 2008R2 SSIS 包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前,我有一个 .NET 应用程序正在执行 2008R2 SSIS 包,并且该应用程序在 win server 2008r2(64 位)上运行.这些包是在 BIDS 2008 中构建的.之后,我将我的数据库服务器从 SQL2008R2 升级到 SQL2014 Standard(在 Win server 2012R2 上运行)并将 .NET 应用程序部署到新环境.

In current, I have a .NET application which is executing 2008R2 SSIS packages and the application are running on win server 2008r2 (64bit). 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.

现在,我遇到了从 .NET 应用程序调用包的问题.消息错误是错误:无法加载文件或程序集Microsoft.SqlServer.Dts.DTSRuntimeWrap.dll,版本=10.0.0.0,文化=中性,公钥=..."或其依赖项之一.试图加载格式不正确的程序.

An now, I'm encountering the issues with calling package from .NET application. 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. An attempt was made to load program with an incorrect format.

第 1 步:创建一个 .NET 简单应用程序来调用包 (SSIS 2008).我还添加了 2 个 .dll 版本 (10.0.0.0) 以供参考Microsoft.SQLServer.DTSRuntimeWrap 和 Microsoft.SQLServer.ManagedDTS 分配在 C:\Program Files (x86)\Microsoft SQL Server\100\SDK\Assemblies

Step 1: create a .NET simple app to call package (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

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);
}
}

第 2 步:将此应用程序(包括 2 个 .dll,包)部署到新环境并执行它.结果是上面的错误信息.

Step 2: deploy this app (included 2 .dll, the package) to new environment and execute it. The result is error message as above.

在新环境中,2 .dll 是版本 12.0.2000.8 分配在 C:\Program Files (x86)\Microsoft SQL Server\120\SDK\Assemblies 中.而且我猜,每当执行包时,它也需要旧 .dll 版本 10.0.0.0 的一些功能来执行它们的组件(执行 SQL 任务、任务脚本...)但是这些 .dll 在新环境中不存在,它导致错误.

In new environment, 2 .dll is version 12.0.2000.8 allocate in 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.

那么,除了将 SSIS 包升级到 2014 或任何建议之外,我该如何解决这个问题?

So, how can I resolve the issue except upgrading SSIS packages to 2014 or any suggestions?

非常感谢,

推荐答案

您的 2008R2 软件包需要升级到 2014,因为您升级了服务器,而不是并行安装.所以我能想到的有两种可能性:

Your 2008R2 packages need to be upgraded to 2014 since you did an upgrade of the server, rather than a side-by-side install. So there are two possibilities that I can think of:

  1. 将所有包升级到2014,这可能就像打开一样简单将它们放在 SSDT-BI 2014 中并保存它们(不在项目模型中但作为独立的包).任何代码都值得怀疑从 R2 到 2014 年,有许多增强功能,而不是根本性的变化.
  2. 或者再次在您的服务器上安装 SSIS 2008R2并让您的 .NET 应用程序从正确的文件夹中调用 DTEXEC.即在我的机器上它在 C:\Program Files\Microsoft SQL服务器\100\DTS\Binn\DTExec.exe.您也可以更改路径变量以确保 2008 dtexec 位于 2014 之上.

这篇关于如何在 SQL Server 2014 Standard 环境中运行 2008R2 SSIS 包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆