【问题标题】:SSIS Execute SQL Task package works in BIDS but fails when Deployed in SQL AgentSSIS 执行 SQL 任务包在 BIDS 中有效,但在 SQL 代理中部署时失败
【发布时间】:2011-08-01 04:52:15
【问题描述】:

我有一个带有执行 SQL 任务的 SSIS 包。 这是代码

declare @vPersonSourceTgt int, @CntFlag int

set @vPersonSourceTgt =  (select count(*) from tbl_ONL_Person)

set @CntFlag = case when @vPersonSourceTgt = ? then  1 else  0 end

select @CntFlag as vTargetCntFlag

我已确保参数映射中的输入参数名称为 0。 在 BIDS 中一切正常,但是当我在 SQL 代理中部署包时。它失败并出现以下错误。

Description: Executing the query "declare @vPersonSourceTgt int, @CntFlag int    set @vPersonSourceTgt =  (select count(*) from tbl_ONL_PALSAccountPerson)    set @CntFlag = case when @vPersonSourceTgt = ? then  1 else  0 end    select @CntFlag as vTargetCntFlag" failed with the following error: "Parameter name is unrecognized.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.  End Error  DTExec: The package execution returned DTSER_FAILURE (1).

任何帮助将不胜感激。 谢谢!

【问题讨论】:

    标签: ssis


    【解决方案1】:

    包在作为作业运行时失败的最常见原因是权限:在 BIDS 中,包是在您帐户的权限下运行的;计划时,它以 SQL 代理权限运行。例如,您是否使用 Windows 身份验证连接到数据库?

    另一个常见问题是您的工作站上有未安装在服务器上的组件,例如第三方 OLE DB 提供程序。但这里的情况似乎不太可能,因为错误通常更具体。

    KB article 提供有关如何对作为作业运行的包进行故障排除和解决问题的一般建议。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-06-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多