A good data-protection plan involves two core activities: backup and restore. In this article, I cover basic full-backup restore. Before jumping into the T-SQL RESTORE commands, I should point out that similar to SQL Server 2005, SQL Server Express supports multiple types of backup and restore options including full, differential, and log backups.
As with the SQL Server Express database backup options, you can restore a database by using either SSMSE or T-SQL commands from SQLCMD or Query Editor. I'll show you how to use the T-SQL RESTORE commands in this text. The following code restores the MediaCollection database from a previous full-database-backup disk file named MediaBackup.bak: RESTORE DATABASE MediaCollection FROM DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\BACKUP\ MediaBackup.bak'
As you can see, the RESTORE command for a full backup is straightforward. You provide the name of the database you want to restore after the RESTORE DATABASE command, the name of the disk backup file, followed by the FROM DISK = clause. It's that simple.