Microsoft SQL Server Backup and Restore Database

30% OFF - 9th Anniversary discount on Entity Framework Extensions until December 15 with code: ZZZANNIVERSARY9

Syntax

  • BACKUP DATABASE database TO backup_device [ ,...n ] WITH with_options [ ,...o ]
  • RESTORE DATABASE database FROM backup_device [ ,...n ] WITH with_options [ ,...o ]

Parameters

ParameterDetails
databaseThe name of the database to backup or restore
backup_deviceThe device to backup or restore the database from, Like {DISK or TAPE}. Can be separated by commas ( , )
with_optionsVarious options which can be used while performing the operation. Like formatting the disk where the backup is to be placed or restoring the database with replace option.


Got any Microsoft SQL Server Question?