SQL実行タスクを含むSSISパッケージがあります。ここ は、私が入力パラメータ名がパラメータマッピングでは0であることを確認してきたコードSSIS Execute SQLタスクパッケージはBIDSで動作しますが、SQLエージェントにデプロイされると失敗します
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
です。 BIDSではすべてがうまく動作しますが、SQL Agentにパッケージをデプロイするとうまくいきます。次のエラーで失敗します。
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).
ご協力いただければ幸いです。 ありがとう!