How to handle SQL agent job error?

I write an SQL Agent Job to delete rows from Table 1 and Table 2 once a day. SQL Agent Job Step:

  • Delete some specific entries from table 1
  • Delete some specific entries from table 2.

My question is:

  • How to write an error in SQL Agent? Any logs / events that we could use? (so that we can see on which days the SQL agent failed, and why it failed.)
  • I want the SQL job to continue to execute (delete) specific records from table2, even if for some reason the deletion from table 1 failed, any recommendations for its implementation?
+3
source share
1

, Microsoft SQL Server?

, .

  • SQL Agent. "" Windows ( ).
    , , , .

  • . , , , , (, " " " " ).

EDIT:
, - , , ,

SQL Server. .
- "" , . " " " " , . .

+5

Source: https://habr.com/ru/post/1711244/


All Articles