Technical Article

Get the location of the recent Backup

,

Muestra la ubicacion del Backup mas reciente. Backup completo y backup diferencil de todas las BBDD.

Get the location of the recent Backup. Complete Backup and backup diferencil of all the BBDD.

CREATE PROCEDURE check_backups
AS

DECLARE @Days int
SET @Days=2

SELECT  K.backup_finish_date,
K.database_name,
K.name,
K.type,
M.physical_device_name 
FROM msdb..backupset K
jOIN msdb..backupmediafamily M ON M.media_set_id=K.media_set_id 
AND K.backup_finish_date=(SELECT MAX(backup_finish_date)
from msdb..backupset
WHERE database_name = K.database_name
AND type = K.type )
WHEREK.name <> 'tempdb' 


--exec check_backups
--drop procedure check_backups

Rate

4.5 (2)

You rated this post out of 5. Change rating

Share

Share

Rate

4.5 (2)

You rated this post out of 5. Change rating