[英]Execute SQL task with T-SQL query and with stored procedure in SSIS
[英]If stored procedure failed then Get output variables values into ssis variables in Execute SQL Task
如果執行 SQL 任務失敗,則不會填充 output 變量。
最好的選擇是更改您的存儲過程並將所有代碼包裝在 try/catch 塊中。 這樣您就可以始終填充變量,如果您收到內部錯誤,請確保 SSIS package 失敗。
如果在存儲過程中使用 RAISERROR,則只有 SSIS 可用的信息是帶有 RAISERROR 語句的錯誤消息。 您可以通過在 SSIS 中創建 OnError 處理程序來檢索此信息,然后它將在系統變量中可用:“System::ErrorDescription”
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.