cancel
Showing results for 
Search instead for 
Did you mean: 

Custom SQL Report

Hi I'm looking to run a custom SQL Report that list all the servers being backed up, their shedule name and retention policy for auditting purposes.

1 Reply

Re: Custom SQL Report

select DISTINCT TOP 100 START AT 1 domain_Client.id as "domain_Client.id",domain_JobArchive.scheduleName as "domain_JobArchive.scheduleName",domain_JobArchive.scheduleType as "domain_JobArchive.scheduleType",nb_JobArchive.retentionLevel as "nb_JobArchive.retentionLevel",(SELECT nb_RetentionLevel.period || ';' || nb_RetentionLevel.unit FROM nb_RetentionLevel WHERE nb_RetentionLevel.id = nb_JobArchive.retentionlevel AND nb_RetentionLevel.masterserverid = nb_JobArchive.masterserverid) as "jobRetentionLevel" from domain_JobArchive , domain_MasterServer , domain_Client , nb_JobArchive where domain_Client.masterServerId = domain_JobArchive.masterServerId and domain_Client.name = domain_JobArchive.clientName and domain_MasterServer.id = domain_Client.masterServerId and domain_Client.masterServerId = domain_JobArchive.masterServerId and domain_Client.name = domain_JobArchive.clientName AND domain_JobArchive.masterServerId = nb_JobArchive.masterServerId and domain_JobArchive.clientName = nb_JobArchive.clientName and domain_JobArchive.id = nb_JobArchive.id and domain_MasterServer.id = domain_JobArchive.masterServerId and domain_MasterServer.id = domain_JobArchive.masterServerId AND domain_JobArchive.masterServerId = nb_JobArchive.masterServerId and domain_JobArchive.clientName = nb_JobArchive.clientName and domain_JobArchive.id = nb_JobArchive.id and ( ( (domain_JobArchive.endTime BETWEEN '134368104460070000' AND '137523432460070000') ) AND ( (domain_MasterServer.id IN (your master server ID#)) ) AND ( (domain_JobArchive.scheduleId NOT IN (-2147483633 )) ) AND ( (domain_JobArchive.isValid = '1') ) AND ( ( (domain_MasterServer.id IN (your master server ID# )) ) ) )

Let me know if this is what you were looking for. You can get your master server ID number by running a custom report with your master server selected then click show report query after you've seen the preview output.