{"id":505,"date":"2014-04-29T14:30:07","date_gmt":"2014-04-29T19:30:07","guid":{"rendered":"https:\/\/mkncreations.com\/site\/?p=505"},"modified":"2015-09-15T20:13:16","modified_gmt":"2015-09-16T01:13:16","slug":"tsql-find-database-restore-source-and-backup-date","status":"publish","type":"post","link":"https:\/\/mkncreations.com\/site\/2014\/04\/tsql-find-database-restore-source-and-backup-date\/","title":{"rendered":"TSQL -Find Database Restore, Source and Backup Date"},"content":{"rendered":"<p>If you would like to find out a Database restore, source and backup date you will need to execute the below script:<\/p>\n<blockquote><p>\nSELECT [rs].[destination_database_name],<br \/>\n[rs].[restore_date],<br \/>\n[bs].[backup_start_date],<br \/>\n[bs].[backup_finish_date],<br \/>\n[bs].[database_name] as [source_database_name],<br \/>\n[bmf].[physical_device_name] as [backup_file_used_for_restore]<\/p>\n<p>FROM msdb..restorehistory rs<br \/>\nINNER JOIN msdb..backupset bs ON [rs].[backup_set_id] = [bs].[backup_set_id]<br \/>\nINNER JOIN msdb..backupmediafamily bmf ON [bs].[media_set_id] = [bmf].[media_set_id]<br \/>\nORDER BY [rs].[restore_date] DESC\n<\/p><\/blockquote>\n<p>Source: <a href=\"http:\/\/www.mssqltips.com\/sqlservertip\/1860\/identify-when-a-sql-server-database-was-restored-the-source-and-backup-date\/\" title=\"http:\/\/www.mssqltips.com\/sqlservertip\/1860\/identify-when-a-sql-server-database-was-restored-the-source-and-backup-date\/\">http:\/\/www.mssqltips.com\/sqlservertip\/1860\/identify-when-a-sql-server-database-was-restored-the-source-and-backup-date\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you would like to find out a Database restore, source and backup date you will need to execute the below script: SELECT [rs].[destination_database_name], [rs].[restore_date],&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[128,102,44,79,21,126,127,50,78,49],"class_list":["post-505","post","type-post","status-publish","format-standard","hentry","category-sql","tag-backup","tag-database","tag-date","tag-microsoft","tag-ms","tag-restore","tag-source","tag-sql-2","tag-sql2008","tag-tsql"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/mkncreations.com\/site\/wp-json\/wp\/v2\/posts\/505"}],"collection":[{"href":"https:\/\/mkncreations.com\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mkncreations.com\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mkncreations.com\/site\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mkncreations.com\/site\/wp-json\/wp\/v2\/comments?post=505"}],"version-history":[{"count":5,"href":"https:\/\/mkncreations.com\/site\/wp-json\/wp\/v2\/posts\/505\/revisions"}],"predecessor-version":[{"id":276458,"href":"https:\/\/mkncreations.com\/site\/wp-json\/wp\/v2\/posts\/505\/revisions\/276458"}],"wp:attachment":[{"href":"https:\/\/mkncreations.com\/site\/wp-json\/wp\/v2\/media?parent=505"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mkncreations.com\/site\/wp-json\/wp\/v2\/categories?post=505"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mkncreations.com\/site\/wp-json\/wp\/v2\/tags?post=505"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}