Search
Home
Articles
Backup
Books
Certification
FAQ
Products
Replication
Scripts
Seminars
Training
TSQL

MSDN Fourms
Philippine SSUG
Fort Worth SSUG
Oklahoma City SSDG

Resume

MHS Enterprises
BlowFrog Software
FilAm Software
AcrylicAcetate.com
Bargain Humidors
Western Humidor

Backup Overview 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32

The no recovery option specifies that transactions are not rolled back or rolled forward. During the restore process. If multiple restores are needed to bring the database up to date, you are required to use the norecovery option. You would use the recovery option during the final restore to cause all transactions to be rolled back or rolled forward in the transaction logs. The recovery completes the restore operation.

Standby is an extremely useful option to apply during restores. This allows the database to be accessible in a read only mode between transaction log restores. You can then verify the integrity of a database and the existence of data. This option is normally used for standby servers. You would restore backups to the standby server using the standby option. If you would ever need to bring the standby server online, you would simply issue the restore option using the recover option to cause all transactions to roll forward and roll back.

This boils down to the following command:

restore database <database name> from <device> with <options>

Restore from an explicit disk device

restore database pubs from diskbackup

Restore from an undefined network disk device using the second file in the backup and put it in dbo use only mode

restore database pubs from disk = ‘\\myserver\dbbackups\pubs.bak’ with dbo_only, file=2

Restore from a tape device and leave the tape in the drive

restore database pubs from tapebackup with nounload

Restore from a tape device, rename the database, and eject the tape

restore database pubs from tapebackup with unload

Restore from a tape device resuming a restore

restore database pubs from tapebackup with restart

Restore from an explicit disk device and leave the server in a standby mode

restore database pubs from diskbackup with standby

Restore from an explicit disk device and do not recover, because transaction logs will be applied

restore database pubs from diskbackup with norecovery

Restore from a disk device, rename the database, and move to a different location

restore database pubs2 from diskbackup with recovery, move pubs_data to ‘c:\mssql7\data\pubs2_data.mdf’, move pubs_log to ‘c:\mssql7\data\pubs2_log.ldf’

Backup Overview 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32

Michael R. Hotek

All content on this site, except where noted, represents an original work of Michael R. Hotek and is protected by applicable copyright laws. The SQL Server FAQ is the sole work of Neil Pike. No page, portion of a page, or download may be used for commercial purposes in whole or in part without the express, written permission of the applicable author.