Azure database backups

I was unable to find a listing of SQL database backups in the Azure Portal. Eventually I found this helpful DMV.

--AzureDatabaseBackups.sql

SELECT @@SERVERNAME server_name,
       DB_NAME() database_name,
       backup_start_date,
       backup_finish_date,
       CASE backup_type 
	       WHEN 'D' THEN 'Full'
           WHEN 'I' THEN 'Differential'
           WHEN 'L' THEN 'Transaction Log'
           ELSE '' END backup_type
FROM sys.dm_database_backups
WHERE in_retention = 1 /* Available */
ORDER BY backup_start_date DESC;

Leave a comment