Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ssis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在C#错误中运行SSIS包_C#_Ssis - Fatal编程技术网

在C#错误中运行SSIS包

在C#错误中运行SSIS包,c#,ssis,C#,Ssis,尝试在C#中运行SSIS包时收到此错误消息。错误是: Microsoft.SqlServer.Dts.Runtime.TaskHost/SSIS.Pipeline中出错:运行SSIS SQL Server数据工具之外的软件包必须安装Integration Services标准版或更高版本 我检查了开发机器和服务器,都安装了SSDT。目标SQL Server是2012年,我运行了一个报告来检查正在运行的Integration Services版本,它是标准版(11.3.6020.0)。我注意到,当

尝试在C#中运行SSIS包时收到此错误消息。错误是:

Microsoft.SqlServer.Dts.Runtime.TaskHost/SSIS.Pipeline中出错:运行SSIS SQL Server数据工具之外的软件包必须安装Integration Services标准版或更高版本

我检查了开发机器和服务器,都安装了SSDT。目标SQL Server是2012年,我运行了一个报告来检查正在运行的Integration Services版本,它是标准版(11.3.6020.0)。我注意到,当它运行实现某些派生列转换的数据流任务时,会发生错误。关于如何解决这个问题有什么想法吗?谢谢你的帮助

这是我的C#代码:


SSIS包在Visual Studio中执行时是否没有任何错误?我能够在Visual Studio中执行SSIS包,没有错误。在开发包时和部署之前,我能够在Visual Studio中运行包,没有错误和问题。不可复制。您说您正在运行standard edition SSIS服务的服务器上运行此包,而错误说明不是这样。我们无法在没有看到您的服务器的情况下进行故障排除。如果确定正在SSIS服务器上运行包,则应向Microsoft打开一个票证。Integration Services服务本身是否正在运行(或“已停止”)?也可能是您正在使用的程序集用于不同版本的SQL Server-值得检查SSIS包在Visual Studio中执行时没有任何错误吗?我能够在Visual Studio中执行SSIS包,没有错误。在开发包时和部署之前,我能够在Visual Studio中运行该包,没有错误和问题。不可复制。您说您正在运行standard edition SSIS服务的服务器上运行此包,而错误说明不是这样。我们无法在没有看到您的服务器的情况下进行故障排除。如果确定正在SSIS服务器上运行包,则应向Microsoft打开一个票证。Integration Services服务本身是否正在运行(或“已停止”)?也可能是您正在使用的程序集用于不同版本的SQL Server—值得检查
class MyEventListener : DefaultEvents
{
    public override bool OnError(DtsObject source, int errorCode, string subComponent,
      string description, string helpFile, int helpContext, string idofInterfaceWithError)
    {
        // Add application-specific diagnostics here.  
        Console.WriteLine("Error in {0}/{1} : {2}", source, subComponent, description);
        return false;
    }
}

class Program
{
    static void Main(string[] args)
    {
             GetExtractsData();            
    }


    static void GetExtractsData()
    {
        string pkgLocation;
        Package pkg;
        Application app;
        DTSExecResult pkgResults;
        MyEventListener eventListener = new MyEventListener();

        pkgLocation = @"C:\Package.dtsx";
        app = new Application();
        pkg = app.LoadPackage(pkgLocation, null);
        pkg.EnableConfigurations = true;
        Configuration config = pkg.Configurations.Add();

        config.ConfigurationType = DTSConfigurationType.ConfigFile;
        config.ConfigurationString=@"C:\Extracts_Config.dtsConfig";
        pkgResults = pkg.Execute(null, null, eventListener, null, null);

        Console.WriteLine(pkgResults.ToString());

        Console.WriteLine("The Extracts completed downloading at: " + DateTime.Now.ToString());
    }