当 运行 来自 .NET 应用程序时,SSIS 包失败,日志中只有 OnPreValidate
SSIS package fails with only OnPreValidate in logs when run from a .NET app
我创建了一个 SSIS 包,当从 SQL Server Data Tools 启动时,它 运行 很顺利(我在我的电脑上使用 SSDT 2015 和 SQL Server 2005 Developer Edition) ,但是当我从 .NET 应用程序 运行 它时,日志中只有以下行失败:
Fields: event,computer,operator,source,sourceid,executionid,starttime,endtime,datacode,databytes,message
OnPreValidate,<my_computer>,<my_operator>,Test,{E7D40776-05B7-4D1D-8D78-8C87E722E596},{755AD039-B5B4-42B0-9ECA-E396054DEB2F},28.10.2016 14:44:06,28.10.2016 14:44:06,0,0x,
我使用以下代码从我的 .NET 应用程序调用包(我刚刚从 SSIS 项目复制了 .NET 项目中的 SSIS 包,并指定将其复制到输出目录,以便我可以从文件系统):
public void Execute(string filePath, DateTime period)
{
var pkg = app.LoadPackage(filePath, null);
var variables = pkg.Variables;
variables["Period"].Value = period;
var pkgResults = pkg.Execute(null, variables, null, null, null);
}
我能找到的与我的问题相关的唯一 link 是 https://social.msdn.microsoft.com/Forums/sqlserver/en-US/75e4d6fc-3b6f-4ca1-bf12-e823076325cd/package-fails-after-onprevalidate-but-not-in-bids?forum=sqlintegrationservices
我已经尝试将 程序包保护级别 切换为 DontSaveSensitiveData
,但没有帮助。
我做错了什么?有没有办法至少获得一些关于包失败原因的正确数据?
解决了,问题。结果是:
SSDT 2015 不能用于为 SSIS 2005 开发包(仅适用于 SSIS 2012 及更高版本)。
我的项目(SSIS 2014 的那个)引用了错误的 Microsoft.SqlServer.ManagedDTS
DLL 版本。我已经引用了 SSIS 2005 的 DLL,一切正常。
我创建了一个 SSIS 包,当从 SQL Server Data Tools 启动时,它 运行 很顺利(我在我的电脑上使用 SSDT 2015 和 SQL Server 2005 Developer Edition) ,但是当我从 .NET 应用程序 运行 它时,日志中只有以下行失败:
Fields: event,computer,operator,source,sourceid,executionid,starttime,endtime,datacode,databytes,message
OnPreValidate,<my_computer>,<my_operator>,Test,{E7D40776-05B7-4D1D-8D78-8C87E722E596},{755AD039-B5B4-42B0-9ECA-E396054DEB2F},28.10.2016 14:44:06,28.10.2016 14:44:06,0,0x,
我使用以下代码从我的 .NET 应用程序调用包(我刚刚从 SSIS 项目复制了 .NET 项目中的 SSIS 包,并指定将其复制到输出目录,以便我可以从文件系统):
public void Execute(string filePath, DateTime period)
{
var pkg = app.LoadPackage(filePath, null);
var variables = pkg.Variables;
variables["Period"].Value = period;
var pkgResults = pkg.Execute(null, variables, null, null, null);
}
我能找到的与我的问题相关的唯一 link 是 https://social.msdn.microsoft.com/Forums/sqlserver/en-US/75e4d6fc-3b6f-4ca1-bf12-e823076325cd/package-fails-after-onprevalidate-but-not-in-bids?forum=sqlintegrationservices
我已经尝试将 程序包保护级别 切换为 DontSaveSensitiveData
,但没有帮助。
我做错了什么?有没有办法至少获得一些关于包失败原因的正确数据?
解决了,问题。结果是:
SSDT 2015 不能用于为 SSIS 2005 开发包(仅适用于 SSIS 2012 及更高版本)。
我的项目(SSIS 2014 的那个)引用了错误的
Microsoft.SqlServer.ManagedDTS
DLL 版本。我已经引用了 SSIS 2005 的 DLL,一切正常。