Export Veritas Backup Exec Selection Details using SQL
For a change, here is something different from PowerShell.
Below is SQL script for fetching Veritas backup selection details from Backup Exec.
Note: The backup job names in the backup server are having words “Monthly, weekly and daily” which we are using to in the script to fetch the selection information.
USE BEDB;
SELECT DISTINCT
JobName
, SC.ScriptDescription
, RC.UserDefinedName
, DeviceSelectionName + '\' + [PathName] + [FileName] as [PathName1]
FROM Scripts SC
LEFT JOIN [vwScriptPropertiesBackup] SPB
ON SC.ScriptID = SPB.ScriptID
LEFT JOIN jobs jj
ON SC.ScriptID = jj.ScriptID
LEFT JOIN [vwResourceContainer] RC
ON SPB.ResourceContainerID = RC.RCID
WHERE (
jobname LIKE '%monthly%'
-- OR jobname LIKE '%daily%'
-- OR jobname LIKE '%weekly%'
-- OR jobname LIKE '%yearly%'
)
AND [FileName] NOT LIKE ''
AND jobname NOT LIKE '%Lotus%'
ORDER BY JobName, RC.UserDefinedName
By executing the above SQL script in SSMS, Here comes the output as shown below
The script works with Exec 16. Please test it for other versions of Backup Exec.
Thank you for reading my post. Hope this is helpful to you.
Recent Comments