Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

I want to check the 7 Days backup status... Expand / Collapse
Author
Message
Posted Monday, July 28, 2014 4:20 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Yesterday @ 7:12 AM
Points: 134, Visits: 388
Hi All,
If I want to check the 7 Days backup status means how can i check?

Regards
Jagadeesh...


Regards
Chowdary...
Post #1596746
Posted Monday, July 28, 2014 9:24 AM This worked for the OP Answer marked as solution


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Yesterday @ 9:12 AM
Points: 3,926, Visits: 7,158
You can query the BackupSet and BackupMediaFamily tables in the msdb database:
SELECT  
CONVERT(CHAR(100), SERVERPROPERTY('Servername')) AS Server,
bu.database_name,
bu.backup_start_date,
bu.backup_finish_date,
bu.expiration_date,
CASE bu.type
WHEN 'D' THEN 'Full'
WHEN 'L' THEN 'Log'
WHEN 'I' THEN 'Diff'
ELSE bu.type
END AS backup_type,
bu.backup_size,
bm.logical_device_name,
bm.physical_device_name,
bu.name AS backupset_name,
bu.description
FROM msdb.dbo.backupmediafamily AS bm
INNER JOIN msdb.dbo.backupset AS bu ON bm.media_set_id = bu.media_set_id
WHERE (CONVERT(datetime,bu.backup_start_date, 102) >= GETDATE() - 7)
AND bu.type <> 'L'
ORDER BY
bu.database_name,
bu.backup_finish_date



______________________________________________________________________________
"Never argue with an idiot; They'll drag you down to their level and beat you with experience"
Post #1596919
Posted Monday, July 28, 2014 10:28 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Today @ 12:38 PM
Points: 265, Visits: 849
Thanks MyDoggieJessie, I hope this answered Chowdary's question. I found the information handy.
Post #1596959
Posted Tuesday, July 29, 2014 5:22 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Yesterday @ 7:12 AM
Points: 134, Visits: 388
Thank you so much dear MyDoggieJessie....

Regards
Chowdary...
Post #1597225
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse