SSIS Execute SQL Error: " "

SSIS Execute SQL Error: " "

SSIS[=29] 中尝试使用 Execute SQL Task 执行 SQL 文件时出现错误=] (2012).

Execute SQL Task: Executing the query "" failed with the following error: "".

我正在尝试自动执行从 TestRail 导入文件的过程,该文件删除并重新创建表,然后用数据填充它们。

我可以在 SQL Server Management Studio 中打开文件。当我打开文件时,我确实收到 Inconsistent Line Endings 警告,但当我单击“是”或“否”以规范化它们时它会起作用)。它在我第一次创建流程时确实有效,但文件要小得多,因为我们当时没有太多数据。

关于为什么查询可能在 SSIS 中失败但 运行 在 SSMS 中失败的任何想法?我在想这可能是 SSMS 可以识别但 SSIS 不能识别的一些时髦语法。

这是整个错误消息:

SSIS package "\valinor.k-net.com\Users\bs\documents\Visual Studio 2012\TFS\Data Analysts\SSIS PACKAGES\SSIS PACKAGES\TestRailRefresh.dtsx" starting. Error: 0xC002F210 at Execute SQL Task, Execute SQL Task: Executing the query "" failed with the following error: "". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. Task failed: Execute SQL Task Warning: 0x80019002 at TestRailRefresh: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors. SSIS package "\valinor.k-net.com\Users\bs\documents\Visual Studio 2012\TFS\Data Analysts\SSIS PACKAGES\SSIS PACKAGES\TestRailRefresh.dtsx" finished: Failure. The program '[146976] DtsDebugHost.exe: DTS' has exited with code 0 (0x0).

用户反映提交任务的最大大小为32K。我怀疑您提交的字符串比那个长。也许您的插入可以分解为多个执行任务。

在这上面浪费了很多时间之后,事实证明这是 SSIS 预期的愚蠢行为。显然,Microsoft 认为使用 $( 仅用于内部变量,NEVER 不会被某人在实际查询中使用。

这 运行 是 SSMS,但在 SSIS 中失败:

SELECT 'Total: $(1200).' 

我通过使用 REPLACE 在字符之间添加 space 解决了这个问题 - $ (.

https://msdn.microsoft.com/en-us/library/ms188714.aspx

去你的,Javascript。