I like the idea about using your script to restore the database for testing tape backups! There seems to be a strange problem with the code. Copy and paste into SSMS and code looks good, but when saving it the lower half of the code has trailing question mark symbols '???????'. What would cause this and how to correct it?
Thank you for the help, If I am currently backing up from server A to server B, how can I use this code to make it a schedule task to automatically retore the database on servr B each night overwriting the database?