Summary
This article provides database scripts for determining the number of instances and log messages contained in the adTempus job history database tables.
Database Scripts
The scripts below can be run against the adTempus database to determine the count of instances and log messages for each job in the adTempus database.
See article K00000385 for instructions on how to query the database.
Note: Beginning with adTempus version 4.2, these scripts are built in to the adTempus Database Utility and can be found on the "Snippets" menu.
Determine the total number of job instances in the database:
select count(*) as TotalInstances from ExecutionHistoryItem;
Determine the number of job instances for each job:
select j.oid as JobOID,g.name as GroupName,j.Name as JobName,count(*) as InstanceCount from job j join jobgroup g on j.jobgroupoid=g.oid join executionhistoryitem ehi on j.oid=ehi.joboid group by j.oid,g.name,j.name order by count(*) desc;
Determine the total number of log messages in the database:
select count(*) as TotalLogMessages from LogMessage;
Determine the number of log messages for each job:
select j.oid as JobOID,g.name as GroupName,j.Name as JobName,count(*) as MessageCount from job j join jobgroup g on j.jobgroupoid=g.oid join logmessage lm on j.oid=lm.joboid group by j.oid,g.name,j.name order by count(*) desc;