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
 Transact-SQL (2005)
 Get max date from file directoryQuestion

Author  Topic 

sqlpal2007
Posting Yak Master

200 Posts

Posted - 2011-08-19 : 11:52:31
I have to restore the latest backup (from the 4 days backup files) to dev server. How do I get the latest backup file from the file directory to be able to restore?

I was thinking a code in the SQL job and automate it to restore. But i don't know how to get the latest backup file?

This has to be a weekliy automated job and there are 5 different databases which need to be restored.

Can I write any dos cmd in T-SQL. I never tried this before.

Please help!

Thanks

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2011-08-20 : 08:04:50
maybe this is your solution?
http://www.nigelrivett.net/SQLAdmin/s_RestoreLatestBackup.html


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page
   

- Advertisement -