question

bernsteingreg avatar image
bernsteingreg asked

A successfully failed SQL Agent job?? - The statement has been terminated. Message 3621. The step succeeded.

I have an instance of SQL Server 2017 Enterprise with CU16.

The is a SQL Agent job that has two steps. Occasionally, the first step does not finish and does not complete the stored procedure within it. The SQL Agent Job History reads: "The statement has been terminated. [SQLSTATE 01000] (Message 3621). The step succeeded." But this sure does seem like a failure to me!!!

The settings on this step are On failure action: Quit the job reporting failure. So the step should fail and stop right there and not go on to step 2. But it does.

Does anyone have any experience with this? Any resolution? Am I crazy or is this not bug in SQL Server?

Please also note: I created a Deadlock Extended Event and no deadlock occurred during the procedure. I have looked in SQL Server log files and don't see any messages. I have activated the additionally logging as seen in the image above, and it does not reveal anything. SQL Server did not shut down during the process. The account running the stored procedure is a sysadmin. The stored procedure fails at different points within it. I tried implementing a TRY CATCH block and no errors were raised.

Thanks in advance!

sql agentfailed
error3621.jpg (104.4 KiB)
steperror3621.jpg (63.9 KiB)
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.