Welcome to Sign in | Help

Re: QOD 2006-10-12

  •  10-17-2006, 9:51 AM

    Re: QOD 2006-10-12

    You can filter for a specific database using the following code sample:

    SELECT

    TOP 1

    *

    FROM msdb..restorehistory

    WHERE destination_database_name = N'AdventureWorks'

    AND TYPE = 'D'               

    ORDER BY restore_date DESC

    -- Type D stands for database

    -- Other types: F = File, G = Filegroup, I = Differential

    -- L = Log, V = Verifyonly, R = Revert

     


    Cristian Andrei Lefter, SQL Server MVP
    MCT, MCSA, MCDBA, MCAD, MCSD .NET,
    MCTS, MCITP - Database Administrator SQL Server 2005
    http://sqlserver.ro
View Complete Thread
Powered by Community Server (Commercial Edition), by Telligent Systems