MS SQL Restore From A Multi Step .Bak File

  • 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.

  • 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.

  • 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.

  • 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