Sunday, April 25, 2010

How To Find Find Database Restore History


Here is the script for finding the database restore history in SQL Server.

USE msdb;
GO
Select
DBRestored = destination_database_name,
RestoreDate = restore_date,
SourceDB = b.database_name,
SourceFile = physical_name,
BackupDate = backup_start_date
from RestoreHistory h
inner join BackupSet b
on h.backup_set_id = b.backup_set_id
inner join BackupFile f
on f.backup_set_id = b.backup_set_id
order by RestoreDate
GO

The output would be like below for the above script:

How to find out what when was last transaction log restored. How to find out what when was last transaction log restore happened.  How to find out what when was last transaction log restore done. How to know when was last transaction log backup happened in sql server. in sql server 2008 R2. in sql server 2012. in sql server 2005. in sql server 2000. how to find the time when last backup taken. last backup time in sql server 2008 R2. last backup time in sql server 2012. data base administrator. microsoft database administrator. last restore time in sql server. last restored transaction details in sql server. last restored date and time. sql questions and answers. interview questions for servers. database administrator interview questions. sql dba interview questions and answers. server interview. sql questions for interview. ms sql interview questions with answers. becoming a database administrator.

0 comments:

Post a Comment