At the moment im imlpementing an import function to import the job setup / latest backup infos etc.. into our CMDB.
The "problem" i had/have is, that i have to suck the DB logic/relations out of my fingers since its all solved outside the DBMS...
There is one thing I would want to include in this view:
The Drive inclusion/exclusion by VM.
Here is the query i got so far(im quite bad in SQL...):
Code: Select all
SELECT DISTINCT dbo.BObjects.object_name AS ServerName, dbo.BJobs.name AS JobName, dbo.[Repl.Topology.BackupServers].display_name AS BackupServer, JobStatus.lastdate AS LastSucBackup, JobStatus.statusLow AS LastBackupState FROM dbo.ObjectsInJobs INNER JOIN dbo.BObjects ON dbo.ObjectsInJobs.object_id = dbo.BObjects.id INNER JOIN dbo.BJobs ON dbo.ObjectsInJobs.job_id = dbo.BJobs.id INNER JOIN dbo.[Repl.Topology.BackupServers] ON dbo.BJobs.db_instance_id = dbo.[Repl.Topology.BackupServers].current_db_id INNER JOIN (SELECT object_id, MIN(status) AS statusLow, MAX(end_time) AS lastdate FROM dbo.[Backup.Model.BackupTaskSessions] WHERE (status = 0) OR (status = 2) GROUP BY object_id) AS JobStatus ON JobStatus.object_id = dbo.BObjects.id
Could you tell me, in what table the Jobconfig is stored?
Is it actually stored in the Enterprise Manager DB?
Generally it would be very nice if you guys could provide some standard views, i think there are many users who would love to query the DB