简体   繁体   English

如何在 SQL Server 2014 Standard 环境中运行 2008R2 SSIS 包?

[英]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:所以我能想到的有两种可能:

  1. Upgrade all the packages to 2014, this might be as simple as opening them up in SSDT-BI 2014 and saving them (not in the project model but as stand alone packages).将所有包升级到 2014,这可能就像在 SSDT-BI 2014 中打开它们并保存它们一样简单(不是在项目模型中,而是作为独立包)。 It is doubtful that any code would be broken from R2 to 2014, there were many enhancements as opposed to fundamental changes.从 R2 到 2014 年是否有任何代码会被破坏是值得怀疑的,与根本性更改相反,有许多增强功能。
  2. Or install SSIS 2008R2 on your server again and have your .NET application call DTEXEC from the correct folder.或者再次在您的服务器上安装 SSIS 2008R2,并让您的 .NET 应用程序从正确的文件夹中调用 DTEXEC。 ie on my machine it is in C:\\Program Files\\Microsoft SQL Server\\100\\DTS\\Binn\\DTExec.exe.即在我的机器上它位于 C:\\Program Files\\Microsoft SQL Server\\100\\DTS\\Binn\\DTExec.exe。 You can also change the path variable to make sure that the 2008 dtexec is on top of the 2014.您还可以更改路径变量以确保 2008 dtexec 位于 2014 之上。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从SQL Server 2008R2迁移到SQL Server 2014 - SQL Server 2008R2 migation to SQL Server 2014 SQL SSIS处理内容中的引号 - 2008R2与2014年的区别? - SQL SSIS handling of quotation marks in content - 2008R2 vs. 2014 difference? 如何在SQL Server 2014环境中为SQL Server 2008创建SSIS包? - How can I create a SSIS package for SQL Server 2008 in a SQL Server 2014 environment? 我可以将SQL Server 2008r2 Express升级到SQL Server 2014 Developer Edition吗 - Can i Upgrade SQL server 2008r2 express to sql server 2014 Developer edition 我们可以在SQL Server 2014上恢复SQL Server 2008R2备份吗? - Can we restore SQL Server 2008R2 backup on SQL Server 2014? 如果报表服务器2008R2数据库在SQL Server 2014中还原将丢失 - What will be missed if report server 2008R2 database gets restored in SQL server 2014 报表服务在SQL2014上运行时,将报表服务器数据库从2008R2迁移到2016 - Migrating report server database from 2008R2 to 2016 while reporting service is running on SQL2014 如何在一列中连接值? (SQL Server 2008R2) - How to join values in one column? (SQL Server 2008R2) 如何在SQL Server 2008R2中查找未使用的列 - How to find unused columns in SQL Server 2008R2 如何在Sql server 2008R2中搜索日期时间 - How to Search datetime in Sql server 2008R2
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM