Hi Experts
We have a requirement to create a report which shows sql server databases are not backed up in last 48hrs.
Can you help me to build one?
thanks
How are you monitoring your databases?
Assuming AppInsight On SQL
SELECT N.Caption, N.Ip_Address, app.DatabaseName,app.LastBackup
FROM [APM_SqlBbDatabaseAlertsData] App
JOIN dbo.nodes n on app.NodeID = n.nodeid
WHERE
(DATEDIFF(hh, app.LastBackup, GETDATE()) > 48)
or app.LastBackup IS NULL
Order BY app.DatabaseSize DESC