Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Backup and restore events

Author  Topic 

sbalaji
Starting Member

48 Posts

Posted - 2009-04-07 : 13:26:45
Hi,

I need to know,the last successful restore operation data and time.

In SQL Server management studio 2005,if i select a database and check for Backup and restore events reports.

For successful restore operations,its not displaying any results.

Is there any other way?

regards
balaji.S

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-04-07 : 13:28:07
SELECT MAX(restore_date) AS restore_date
FROM msdb.dbo.restorehistory
WHERE destination_database_name = 'dbName'

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

sbalaji
Starting Member

48 Posts

Posted - 2009-04-07 : 13:40:06
Thanks,

regards
balaji,s

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-04-07 : 13:41:34
You're welcome.

And just to close the loop since you mention backup information in the topic's subject, backup information can be found in the msdb.dbo.backupset table.

SELECT MAX(backup_start_date) AS backup_date
FROM msdb.dbo.backupset
WHERE database_name = 'dbName' -- AND type = 'D' (if you are interested in only full backups)

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page
   

- Advertisement -