gpt4 book ai didi

ssis - 将退出代码从 SSIS 包返回到外部调度程序

转载 作者:行者123 更新时间:2023-12-04 00:48:50 24 4
gpt4 key购买 nike

我正在使用 dtexec 从外部调度程序 (Control-M) 运行 SSIS 包。我想根据包的哪一部分失败向调度程序提供不同的错误代码。有什么方法可以设置 dtexec 包失败时的返回码吗?

如果没有,有没有人知道另一种将状态反馈给调度程序的方法?

谢谢

最佳答案

似乎 DTEXEC 有一个特定的退出代码列表,不能从包内以编程方式设置。此信息来自http://msdn.microsoft.com/en-us/library/ms162810.aspx

Exit codes returned from dtexec utility

When a package runs, dtexec can return an exit code. The exit code is used to populate the ERRORLEVEL variable, the value of which can then be tested in conditional statements or branching logic within a batch file. The following table lists the values that the dtexec utility can set when exiting.

Value Description
0 The package executed successfully.
1 The package failed.
3 The package was canceled by the user.
4 The utility was unable to locate the requested package. The package could not be found.
5 The utility was unable to load the requested package. The package could not be loaded.
6 The utility encountered an internal error of syntactic or semantic errors in the command line.

我建议在您的包中使用多种类型的 SSIS 错误记录中的一种,然后使用另一个进程检查日志以防出现故障以确定包中的错误位置。

关于ssis - 将退出代码从 SSIS 包返回到外部调度程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2540119/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com