Forum Discussion

sandrix's avatar
sandrix
Level 3
7 months ago

Creating a SQL Design Report

 

Hi,

I need to create a report to check if my backup jobs are being executed within the backup window, which is from 7PM to 6AM.

In other words, if the report shows any backup job being executed before or after this backup window, this means that we have a problem.

The job summary report shows all the jobs, so I want to schedule it to run every day at 10AM, but it will show all the jobs that were executed from the previous day from 4PM until the day it is executed until 10AM.

Ex: Today is 05-22-25

The report will show from 05-21-25 at 4PM until today 05-22-25 at 10AM.

I want to know how I can configure this here:

SELECT apt_v_job.client_name, apt_v_job.start_date
FROM apt_v_job
WHERE apt_v_job.summary_status = 0
AND apt_v_job.start_date BETWEEN ${startDate} AND ${endDate}

Thanks.

2 Replies

  • I just ran SQL report with your query for last 24 hours (at 10:58 localtime) and you can see the scope is from yesterday 10:58 to today?  Are you not seeing this behaviour sandrix​ 

    What happens when you schedule this report for last 24 hours?  

     

     

    Post your output of your scheduled report scope and we will see if we can figure out what is going on...

  • sandrix​ 

    Sorry, looks like nobody has been here that can give you the answer. Good questions like this truly deserve a good answer. The problem here is, precious few backup admins know much about coding in SQL......I'm one of them.
    So, please allow me to apologize for not answering. If I knew the answer, I would be more than happy to help with this. I too would like to see more answers and code examples to learn from as the community ( or the lack thereof ) post what they are doing or have done already.