May 3, 2023 at 6:35 am
Thank you for breaking things down so well. This is well put. I do recall coming across the ability to email HTML reports from the SQL Server agent in the past, for I have used the sp send mail stored procedure. (There are some security considerations here as I recall).
Nowadays we use a third party tool that is constantly reading logs and part of which is Agent Job outcomes, which then alerts the DBA on call in real time should a step fail or any problem be encountered.
----------------------------------------------------
May 3, 2023 at 2:21 pm
Thank you for posting this solution. However, I ran into an issue and received. this error:
Msg 241, Level 16, State 1, Line 1
Conversion failed when converting date and/or time from character string
The line that caused it was: ,msdb.dbo.agent_datetime(sch.next_run_date, sch.next_run_time) NextRunDate
I replaced it with:
,CASE sch.next_run_date WHEN 0 THEN NULL ELSE msdb.dbo.agent_datetime(sch.next_run_date, sch.next_run_time) END AS NextRunDate
That seemed to fix it. Thanks again.
May 3, 2023 at 3:28 pm
Hi,
I looked through the article and don't see any link to the script? Is it included somewhere or do we put together ourselves? I like the idea and want to try it out.
May 3, 2023 at 6:18 pm
Hi Nisarg
This is a nice all SQL way to create a very useful report, thanks for posting it
October 16, 2025 at 11:46 am
create-an-html-report-on-the-status-of-sql-server-agent-jobs
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
November 3, 2025 at 12:00 am
Comments posted to this topic are about the item Create an HTML Report on the Status of SQL Server Agent Jobs
November 3, 2025 at 2:26 pm
If you want to have the email come across as HTML format instead of plain text, use the
@body_format = 'HTML'
parameter on the sp_send_dbmail call.
Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply