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
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 restore date

Author  Topic 

richard102
Starting Member

25 Posts

Posted - 2010-12-03 : 05:05:59
Hi Y'all

I've a job that restores a database over the old one. How can I tell if it's worked?

The job-step says it worked, but when I look at the database properties its got an old date for 'date created'.

I've assured myself by entering some text in an empty table and manually running the job (and the text has gone). But there's nothing in the database properties to back this up.



thanks

richard102

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2010-12-03 : 05:13:14
Have a look in the sql server log.
Also the database files should have the datestamp as they were recreated by the restore.

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

richard102
Starting Member

25 Posts

Posted - 2010-12-03 : 05:21:30
Thanks nigelrivett

also to answer my own question ...
USE MSDB
GO

SELECT TOP 1 restore_date
FROM RESTOREHISTORY WITH (nolock)
WHERE (DESTINATION_DATABASE_NAME = 'adventureworks')
ORDER BY RESTORE_DATE DESC

thanks

richard102
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2010-12-03 : 07:05:18
Slightly more detailed report, if you need it, here:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=54300#268882
Go to Top of Page
   

- Advertisement -