December 16, 2008 at 7:57 am
When we back up our SQL database we use one .bak file with sperate steps for each database.
When restoring the database manually from the .bak file we simply select the step that contains the database we wish to restore from enterprise manager.
How could I use a script to select a particular step as part of a restore, for example the .bak file contains the backup of 3 databases, step 1 = database a, Step 2 = database b and step 3 = database c. I wish to script a restore of databse b which is step 2, what would the commands be.
December 16, 2008 at 8:19 am
Unfortunately, EM in SQL Server 2000 doesn't allow you to script the restore command. The best thing I can do at this point is have you read RESTORE in Books Online. The option you are looking for is FILE = 2 for the second file of a multifile backup file.
December 16, 2008 at 11:34 am
I would highly recommend you stop using one file for all your backups. If something happens to that file, a corruption or anything, you lose all backups in there. That's an unnecessary risk when it's trivial to use separate files for each database.
December 19, 2008 at 9:20 am
Many thanks Lynn
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply