cancel
Showing results for 
Search instead for 
Did you mean: 

SQL Query for EV Databases Backup Status

AndrewB
Moderator
Moderator
Partner    VIP    Accredited

does anyone have a SQL query that will return the backup warning data from the "Status" section of the VAC such as:

Directory database log backup

Vault Store fingerprint database log backup

Vault Store transaction log backup

etc?

1 ACCEPTED SOLUTION

Accepted Solutions

JesusWept3
Level 6
Partner Accredited Certified

The following retrieves the database name and last backup of the Databases

SELECT database_name, MAX(backup_finish_date) "Last Database Backup"
FROM msdb.dbo.backupset
WHERE database_name IN ('EnterpriseVaultAudit', 'EnterpriseVaultDirectory', 'EnterpriseVaultMonitoring', 'EVVSGDefaultUpgradeGroup_1_1', 'yourVaultDB')
AND type = 'd'
GROUP BY database_name


The following retrieves the database name and last backup of the Log files

SELECT database_name, MAX(backup_finish_date) "Last Log File Backup"
FROM msdb.dbo.backupset
WHERE database_name IN ('EnterpriseVaultAudit', 'EnterpriseVaultDirectory', 'EnterpriseVaultMonitoring', 'EVVSGDefaultUpgradeGroup_1_1', 'yourVaultDB')
AND type = 'l'
GROUP BY database_name

https://www.linkedin.com/in/alex-allen-turl-07370146

View solution in original post

3 REPLIES 3

Wayne_Humphrey
Level 6
Partner Accredited Certified

Turn on SQL profiler, and run an "update on the vac" and you will see what its doing.

JesusWept3
Level 6
Partner Accredited Certified

The following retrieves the database name and last backup of the Databases

SELECT database_name, MAX(backup_finish_date) "Last Database Backup"
FROM msdb.dbo.backupset
WHERE database_name IN ('EnterpriseVaultAudit', 'EnterpriseVaultDirectory', 'EnterpriseVaultMonitoring', 'EVVSGDefaultUpgradeGroup_1_1', 'yourVaultDB')
AND type = 'd'
GROUP BY database_name


The following retrieves the database name and last backup of the Log files

SELECT database_name, MAX(backup_finish_date) "Last Log File Backup"
FROM msdb.dbo.backupset
WHERE database_name IN ('EnterpriseVaultAudit', 'EnterpriseVaultDirectory', 'EnterpriseVaultMonitoring', 'EVVSGDefaultUpgradeGroup_1_1', 'yourVaultDB')
AND type = 'l'
GROUP BY database_name

https://www.linkedin.com/in/alex-allen-turl-07370146

AndrewB
Moderator
Moderator
Partner    VIP    Accredited

+1 for wayne for the cool tip about running profiler to see what's going on

solution goes to JW this time.