May 28, 2008 at 12:16 pm
Hey guys i have a scenario where i want validate my backup files by restore. I just don't know the best way to do this though, i was thinking installing new instance to another box and create a script that will restore all my backup files.
Question is how do i direct this new box to where those backup files (so it can loop through files and restore ) since they were never created by current instance.
or do you guys have any other suggestions?
May 28, 2008 at 10:00 pm
If all of backups are in the same folder, you may consider to use scripting.systemobject, a VBScript library.
May 28, 2008 at 10:11 pm
You can verify the validity of your backup file by using the command,
Restore verifyonly from disk='Path\filename.bak'
If the backup file is valid then it can be restored in any other server or in the same server with different instance name.
[font="Verdana"]- Deepak[/font]
May 29, 2008 at 7:37 am
Or restored to the same server/same instance using a different database name....
-- You can't be late until you show up.
May 29, 2008 at 8:26 am
don't forget to check for pathing issues. I'd get the virtual names and then set the new paths in my restore server for every file using some standard in the script.
May 29, 2008 at 11:25 am
I just submitted a script that will do exactly what you need...it generates a restore script but can easily be modified to execute it instead. You'll need to wait for it to be approved, but it should show up shortly....
Your friendly High-Tech Janitor... 🙂
May 29, 2008 at 8:45 pm
Try to restore the bakup on the same server with different DB name and pass the correct path for the mdf and ldf file name.
MCP, MCTS (GDBA/EDA)
May 30, 2008 at 4:25 am
We did it in a scripted job. Unfortunately, we use Litespeed for our backups, so posting my code wouldn't help you unless you also use Litespeed. Basically, though, as long as the drive with the backup files is shared, you can use the UNC path of the source box as the "where" for your restore SQL.
Just make sure to use a domain account for your SQL Server Agent & SQL Server Service accounts, plus make sure both accounts have Read access to the backup share. Otherwise, no matter what coding you do on this, the job will fail.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply