June 2015
Intermediate to advanced
1800 pages
70h 6m
English
The command to restore a database in SQL Server is aptly named RESTORE. The RESTORE command is similar to the BACKUP command in that it can be used to restore a database, part of a database, or a transaction log. You restore an entire database or part of a database by using the RESTORE DATABASE syntax. You do transaction log restores by using the RESTORE TRANSACTION syntax.
Listing 11.6 shows the full syntax for RESTORE DATABASE.
LISTING 11.6 RESTORE DATABASE Syntax
--To Restore an Entire Database from a Full database backup(a Complete Restore):RESTORE DATABASE { database_name | @database_name_var }[ FROM <backup_device> [ ,...n ] ][ WITH [ { CHECKSUM | NO_CHECKSUM ...
Read now
Unlock full access