0

I have an instance with almost 1000 jobs.

We have a deletion occurring in one of our tables that shouldn’t be happening. (I have a trigger in-place).

AFTER DELETE
AS 

      INSERT INTO myTableHistory (DeletedDate, DeletedBy) 
      SELECT GETDATE(), USER_ID() FROM Deleted 
      exec msdb.dbo.sp_send_dbmail @recipients = 'me@me.com', @body = 'trigger exec', @Subject = 'trigger exec'

I set this up on Friday night; and I received emails:

6:39am on Saturday

6:35am on Sunday

6:35am today (Monday)

(meaning, deletions occurred at that time and day).

So, I would need to do a very specific search (which I don’t know how to do it).

I would need to find a step from any job… such step started between 5.35am and 6.35am (Monday), and the step finished between 6.35amd 7.35am (Monday).

Or look the same on Sunday…

Chicago1988
  • 970
  • 3
  • 14
  • 35

1 Answers1

0

This site has the answer, by step and by job, great! https://www.mssqltips.com/sqlservertip/2850/querying-sql-server-agent-job-history-data/

Chicago1988
  • 970
  • 3
  • 14
  • 35