Tutorial by Examples

The following command backs up the 'Users' database to 'D:\DB_Backup' file. Its better to not give an extension. BACKUP DATABASE Users TO DISK = 'D:\DB_Backup'
The following command restores the 'Users' database from 'D:\DB_Backup' file. RESTORE DATABASE Users FROM DISK = 'D:\DB_Backup'
When you try to restore database from another server you might get the following error: Error 3154: The backup set holds a backup of a database other than the existing database. In that case you should use WITH REPLACE option to replace database with the database from backup: RESTORE DATABAS...

Page 1 of 1