执行SSIS包2012有来自外部应用程序脚本组件 [英] Executing SSIS 2012 package that has script components from external application
问题描述
我正在写将执行使用Microsoft.SqlServer.ManagedDTS v 11.0组件的SSIS包2012的应用程序。我想要执行包的设计,并从SSDT 2012年成功执行,并具有处理不正确传输行脚本组件。
I'm writing an application that will execute an SSIS 2012 package using the Microsoft.SqlServer.ManagedDTS v 11.0 assembly. The package that I'm trying to execute was designed and successfully executed from SSDT-2012, and has script components that handle rows that don't transfer correctly.
当我尝试运行我的应用程序得到错误信息为每个我的脚本组件:
When I try to run my application I get the error message for each of my script components:
SSIS.Pipeline:要运行SSIS包SQL Server数据工具外,您必须安装集成服务[脚本组件名称]或更高
SSIS.Pipeline: To run a SSIS package outside of SQL Server Data Tools you must install [Script Component Name] of Integration Services or higher.
配置:建筑应用的x86 Windows上使用以下app.config文件:
Configuration: Building application for x86 on Windows with the following app.config file:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
<supportedRuntime version="v2.0.50727"/>
</startup>
</configuration>
唯一相关的code是:
The only relevant code is:
using System;
using System.Data;
using System.Data.Common;
using System.IO;
using Microsoft.SqlServer.Dts.Runtime;
class MyApp
{
public void ExecutePackage()
{
//Assume I have all the variables I need like packageFile, packageName,
//srcConnectionString, destConnectionString and eventListener etc.
Package pkg;
Application app;
DTSExecResults pkgResults;
app = new Application();
pkg = app.LoadPackage(packageFile, eventListener);
pkg.Variables["SrcConnectionString"].Value = srcConnectionString;
pkg.Variables["DestConnectionString"].Value = destConnectionString;
if (null != srcAssembly || null != destAssembly)
{
foreach (ConnectionManager connection in pkg.Connections)
{
if (null != srcAssembly && connection.Name.Contains("Source"))
{
connection.SetQualifier(srcAssembly);
}
else if (null != destAssembly && connection.Name.Contains("Destination"))
{
connection.SetQualifier(destAssembly);
}
}
}
pkgResults = pkg.Execute(null, null, eventListener, null, null);
}
}
任何想法?
推荐答案
您不必在应用程序运行在机器上安装了SQL Server集成服务业务。
You do not have the SQL Server Integration Services Service installed on the machine the application is running from.
又见<一个href=\"http://dba.stackexchange.com/questions/49786/error-to-run-a-ssis-package-outside-of-sql-server-data-tools-you-must-install\">http://dba.stackexchange.com/questions/49786/error-to-run-a-ssis-package-outside-of-sql-server-data-tools-you-must-install
这篇关于执行SSIS包2012有来自外部应用程序脚本组件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!