SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


I want to check the 7 Days backup status...


I want to check the 7 Days backup status...

Author
Message
Chowdary's
Chowdary's
Mr or Mrs. 500
Mr or Mrs. 500 (592 reputation)Mr or Mrs. 500 (592 reputation)Mr or Mrs. 500 (592 reputation)Mr or Mrs. 500 (592 reputation)Mr or Mrs. 500 (592 reputation)Mr or Mrs. 500 (592 reputation)Mr or Mrs. 500 (592 reputation)Mr or Mrs. 500 (592 reputation)

Group: General Forum Members
Points: 592 Visits: 566
Hi All,
If I want to check the 7 Days backup status means how can i check?

Regards
Jagadeesh...

Regards
Chowdary...
MyDoggieJessie
MyDoggieJessie
SSChampion
SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)

Group: General Forum Members
Points: 12080 Visits: 7444
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" ;-)
Dana
Dana
SSCertifiable
SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)

Group: General Forum Members
Points: 5844 Visits: 3450
Thanks MyDoggieJessie, I hope this answered Chowdary's question. I found the information handy.:-)
Chowdary's
Chowdary's
Mr or Mrs. 500
Mr or Mrs. 500 (592 reputation)Mr or Mrs. 500 (592 reputation)Mr or Mrs. 500 (592 reputation)Mr or Mrs. 500 (592 reputation)Mr or Mrs. 500 (592 reputation)Mr or Mrs. 500 (592 reputation)Mr or Mrs. 500 (592 reputation)Mr or Mrs. 500 (592 reputation)

Group: General Forum Members
Points: 592 Visits: 566
Thank you so much dear MyDoggieJessie....

Regards
Chowdary...
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search