user1254579
user1254579

Reputation: 4009

How to implement the failure notification for each and every steps in sql agent

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

Answers (1)

David Rushton
David Rushton

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

  1. In Object Explorer, expand SQL Server Agent, and then expand Jobs.
  2. Right-click the job you want to edit, and then click Properties.
  3. Select the Steps page, click a step, and then click Edit.
  4. In the Job Step Properties dialog box, select the Advanced page.
  5. In the On success actionlist, click the action to perform if the job step completes successfully.
  6. 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.
  7. In the On failure action list, click the action to perform if the job step fails.

Upvotes: 1

Related Questions