Opscenter/netbackup - SQL query to have a weekly report: Policy with start Time and End Time
Hello,
The goal is to have a gantt diagramm (made with excel) for the last week that show for each policy the start time and the end time.
I found some report on opscenter to have this kind of information but only by client. I would like to have a SQL query that give me these informations on a policy basis.
Exemple:
Policy name | Start Time | End Time (or duration) |
Policy 1 | 27.07.2015 22:00 | 27.07.2015 23:18 |
Policy 2 | 27.07.2015 22:30 | 27.07.2015 23:01 |
Policy 1 | 28.07.2015 22:00 | 28.07.2015 23:19 |
.... |
Do you have any idea on the best/easiest way to do that?
Regards
Jay
Try this
SELECT
domain_JobArchive.policyname as "Policy",
domain_JobArchive.statuscode as "Status",
UTCBigIntToNomTime(domain_JobArchive.startTime) as 'Start Time',
UTCBigIntToNomTime(domain_JobArchive.endTime) as 'End Time'
FROM
domain_jobarchive
WHERE
domain_JobArchive.type in (0) AND (domain_JobArchive.parentjobid = domain_JobArchive.id)
ORDER BY
'Start Time'