如何为 sql 代理中的每个步骤实现失败通知
How to implement the failure notification for each and every steps in sql agent
如何为 sql agent.Or 中的每个步骤实现失败通知
只能在工作级别
实现工作通知
是的,您可以在步骤级别执行此操作。一种方法是将每个步骤的 On failure action
配置为:Quit the job reporting failure
。这是 Microsoft documentation,其中包含完整说明。
To set job step success or failure flow
- In Object Explorer, expand SQL Server Agent, and then expand Jobs.
- Right-click the job you want to edit, and then click Properties.
- Select the Steps page, click a step, and then click Edit.
- In the Job Step Properties dialog box, select the Advanced page.
- In the On success actionlist, click the action to perform if the job step completes successfully.
- In the Retry attempts box, enter the number of times from 0 through 9999 that the job step should be repeated before it is considered to
have failed. If you entered a value greater than 0 in the Retry
attempts box, enter in the Retry interval (minutes) box the number of
minutes from 1 through 9999 that must pass before the job step is
retried.
- In the On failure action list, click the action to perform if the job step fails.
如何为 sql agent.Or 中的每个步骤实现失败通知 只能在工作级别
实现工作通知是的,您可以在步骤级别执行此操作。一种方法是将每个步骤的 On failure action
配置为:Quit the job reporting failure
。这是 Microsoft documentation,其中包含完整说明。
To set job step success or failure flow
- In Object Explorer, expand SQL Server Agent, and then expand Jobs.
- Right-click the job you want to edit, and then click Properties.
- Select the Steps page, click a step, and then click Edit.
- In the Job Step Properties dialog box, select the Advanced page.
- In the On success actionlist, click the action to perform if the job step completes successfully.
- In the Retry attempts box, enter the number of times from 0 through 9999 that the job step should be repeated before it is considered to have failed. If you entered a value greater than 0 in the Retry attempts box, enter in the Retry interval (minutes) box the number of minutes from 1 through 9999 that must pass before the job step is retried.
- In the On failure action list, click the action to perform if the job step fails.