Came across a great script from Ken Kaufman on copying backups using xp_cmdshell. Thought I'd contribute a script I wrote that builds on that to restore the latest production backup to a testing or development server.
In this case I routinely create all my production backups to a network share and then use that source to restore the database in on my beta server. this way I ensure all the data as well as the schema are exact mirrors. Last step I do is to update permissions between the two copies.
If anyone has any comments or suggestions please let me know. Scripting it this way proved to be a blessing since it was just about impossible to keep the changes to schema objects in sync on my development server, and manually determining which backup to restore was always a manual process.
I Need a Backup and I Need It Now
Have you ever wished that creating a backup on the fly was easier and quicker? Whether you do it with the GUI or with T-SQL, you still have to open up Management Studio, connect to the database, and go through the steps. You have to figure out ...
2009-04-29
4,263 reads