September 7, 2009 at 1:32 am
Hi,
I have an urgent requirement to produce the restoration history of a Database. Do we have any way to retrieve that in SQL Server. Please help....
Thanks in Advance!
September 7, 2009 at 1:40 am
haichells (9/7/2009)
Hi,I have an urgent requirement to produce the restoration history of a Database. Do we have any way to retrieve that in SQL Server. Please help....
Thanks in Advance!
select * from msdb..restorehistory
or
http://www.sqldba.org/articles/31-view-database-restore-history-in-sql-server.aspx
that should answer your question.
--------------------------------------------------------------------------------------
[highlight]Recommended Articles on How to help us help you and[/highlight]
[highlight]solve commonly asked questions[/highlight]
Forum Etiquette: How to post data/code on a forum to get the best help by Jeff Moden[/url]
Managing Transaction Logs by Gail Shaw[/url]
How to post Performance problems by Gail Shaw[/url]
Help, my database is corrupt. Now what? by Gail Shaw[/url]
September 7, 2009 at 2:14 am
It is a timely help! Thanks and Thanks a ton ! 🙂
September 7, 2009 at 2:18 am
your welcome 😀
--------------------------------------------------------------------------------------
[highlight]Recommended Articles on How to help us help you and[/highlight]
[highlight]solve commonly asked questions[/highlight]
Forum Etiquette: How to post data/code on a forum to get the best help by Jeff Moden[/url]
Managing Transaction Logs by Gail Shaw[/url]
How to post Performance problems by Gail Shaw[/url]
Help, my database is corrupt. Now what? by Gail Shaw[/url]
June 2, 2010 at 7:04 pm
Several times now I've needed to know where the backup file is located (path) that I restored a database from (sanity check). The restorhistory tells you who and when but not what the source file is. Is there anyway to tell the source file?
January 24, 2012 at 11:31 am
Hello
You can use this query to see the history.
USE MSDB
GO
SELECT CONVERT(VARCHAR(59),restore_date,113) AS 'Restore Date'
,destination_database_name AS Restored_DB_Name
,USER_NAME AS 'User'
,restore_type as Restore_Type
,replace as Replace
,destination_phys_name as 'Destination Files'
FROM restorehistory as rh join restorefile as rf ON rf.restore_history_id = rh.restore_history_id
ORDER BY RESTORE_DATE DESC
February 24, 2014 at 2:12 pm
We restore our testing database frequently from Production database. Is there any way we can get details of all previous restores, or may be last 5 restores?
SELECT * FROM dbo.restorehistory
Returns only the recent restore details.
February 24, 2014 at 4:38 pm
I got it. I presumed that restorehistory keeps only the latest restore record. But I came across with restorehistory table that contained multiple records for a database restored periodically. So in my case, I assume that somebody has deleted the earlier records, for whatever reasons best known to him 🙂
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply