Reputation: 4009
How to implement the failure notification for each and every steps in sql agent.Or is it only possible to implement the job notification in job level
Upvotes: 0
Views: 1117
Reputation: 5030
Yes, you can do this at the step level. One approach is to configure the On failure action
of each step to: Quit the job reporting failure
. Here is the Microsoft documentation, which contains full instructions.
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.
Upvotes: 1