BACKUP DATABASE TO DISK
时间: 2024-02-10 15:00:36 浏览: 87
The command "BACKUP DATABASE TO DISK" is used in SQL Server to create a backup of a database and save it to a disk.
The syntax of the command is as follows:
BACKUP DATABASE database_name
TO DISK = 'backup_file_path'
[WITH options]
Here, "database_name" specifies the name of the database that needs to be backed up. "backup_file_path" specifies the location and name of the backup file where the backup will be saved.
The "WITH options" parameter is optional and can be used to specify various backup options such as compression, verification, checksum, and more.
For example, the following command creates a backup of the "Sales" database and saves it to the "D:\SQLBackups\Sales.bak" file:
BACKUP DATABASE Sales
TO DISK = 'D:\SQLBackups\Sales.bak';
阅读全文