Welcome to Sign in | Help
in Search

QOD 2006-10-12

Last post 11-06-2006, 8:24 PM by xmldeveloper. 4 replies.
Sort Posts: Previous Next
  •  10-12-2006, 2:35 PM 335

    QOD 2006-10-12

    How can you see the last restore (NOT backup) date of your database ?

    (At this kind of question in a day I answer in other day you answer, today is a day when you can answer) 


    Gheorghe Ciubuc,SQL Server Influencer, MCP(SQL 2000), MCTS (SQL Server 2005) , OCA(Oracle 9i), Sybase(Brainbench)
    Filed under:
  •  10-16-2006, 10:11 PM 400 in reply to 335

    Re: QOD 2006-10-12

    The answer is :

    select * from msdb..restorehistory

    select * from msdb..restorehistory


    Gheorghe Ciubuc,SQL Server Influencer, MCP(SQL 2000), MCTS (SQL Server 2005) , OCA(Oracle 9i), Sybase(Brainbench)
  •  10-17-2006, 9:51 AM 407 in reply to 400

    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
  •  11-06-2006, 7:16 PM 774 in reply to 407

    Re: QOD 2006-10-12

    Imi puteti spune va rog care e semnificatia "N" din dreapta =?

    Multumesc


    Secolul XXI ori va fi religios ori nu va fi deloc
  •  11-06-2006, 8:24 PM 779 in reply to 774

    Re: QOD 2006-10-12

    Specificatia N este folosita pentru a specifica faptul ca sirul care urmeaza este UNICODE.
    Cristian Andrei Lefter, SQL Server MVP
    MCT, MCSA, MCDBA, MCAD, MCSD .NET,
    MCTS, MCITP - Database Administrator SQL Server 2005
    http://sqlserver.ro
View as RSS news feed in XML
Powered by Community Server (Commercial Edition), by Telligent Systems