Jobs Ran beween specific time frame?? urgent | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Jobs Ran beween specific time frame?? urgent

Hi,
How to find, total how many jobs ran between 6:00 PM to 6:00 AM
I wrote query below, How to add particular time frame in it? (do we use beween operator? if yes then how?)select
name, run_date, run_time, run_duration,last_outcome_message from dbo.sysjobsjoin
dbo.sysjobhistoryon
sysjobs.job_id = sysjobhistory.job_idjoin
sysjobservers on
sysjobs.job_id = sysjobservers.job_idorder
by run_date desc,run_time desc
Please advice,
Thanks in advance,
apat

Hi,
Not sure if it will help you? (i think only last finish time is available against a job) SELECT
name,
run_date
FROM
msdb..sysjobhistory jh
INNER JOIN
msdb..sysjobs j
ON
j.job_id = jh.job_id
where
run_time between 60000 and 180000

]]>

Software Reviews | Book Reviews | FAQs | Tips | Articles | Performance Tuning | Audit | BI | Clustering | Developer | Reporting | DBA | ASP.NET Ado | Views tips | | Developer FAQs | Replication Tips | OS Tips | Misc Tips | Index Tuning Tips | Hints Tips | High Availability Tips | Hardware Tips | ETL Tips | Components Tips | Configuration Tips | App Dev Tips | OLAP Tips | Admin Tips | Software Reviews | Error | Clustering FAQs | Performance Tuning FAQs | DBA FAQs |