Need Restoration history of a DB

  • 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!

  • 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]

  • It is a timely help! Thanks and Thanks a ton ! 🙂

  • 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]

  • 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?

  • 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

  • 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.

  • 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