BACKUP DATABASE |
Copie de sauvegarde de base de données |
---|---|
Microsoft SQL Server |
Syntaxe
BACKUP DATABASE { database_name | @database_name_var } TO backup_device [ ,...n ] [ MIRROR TO clause ] [ next-mirror-to ] [ WITH { DIFFERENTIAL | general_WITH_options [ ,...n ] } ] [;] BACKUP DATABASE { database_name | @database_name_var } file_or_filegroup [ ,...n ] TO backup_device [ ,...n ] [ MIRROR TO clause ] [ next-mirror-to ] [ WITH { DIFFERENTIAL | general_WITH_options [ ,...n ] } ] [;] BACKUP DATABASE { database_name | @database_name_var } READ_WRITE_FILEGROUPS [ , read_only_filegroup [ ,...n ] ] TO backup_device [ ,...n ] [ MIRROR TO clause ] [ next-mirror-to ] [ WITH { DIFFERENTIAL | general_WITH_options [ ,...n ] } ] [;] BACKUP LOG { database_name | @database_name_var } TO backup_device [ ,...n ] [ MIRROR TO clause ] [ next-mirror-to ] [ WITH { general_WITH_options | \log-specific_optionspec } [ ,...n ] ] [;] backup_device::= { { logical_device_name | @logical_device_name_var } | { DISK | TAPE | URL } = { 'physical_device_name' | @physical_device_name_var | 'NUL' } } MIRROR TO clause::= MIRROR TO backup_device [ ,...n ] file_or_filegroup::= { FILE = { logical_file_name | @logical_file_name_var } | FILEGROUP = { logical_filegroup_name | @logical_filegroup_name_var } } read_only_filegroup::= FILEGROUP = { logical_filegroup_name | @logical_filegroup_name_var } general_WITH_options [ ,...n ]::= COPY_ONLY | { COMPRESSION | NO_COMPRESSION } | DESCRIPTION = { 'text' | @text_variable } | NAME = { backup_set_name | @backup_set_name_var } | CREDENTIAL | ENCRYPTION | FILE_SNAPSHOT | { EXPIREDATE = { 'date' | @date_var } | RETAINDAYS = { days | @days_var } } { NOINIT | INIT } | { NOSKIP | SKIP } | { NOFORMAT | FORMAT } | MEDIADESCRIPTION = { 'text' | @text_variable } | MEDIANAME = { media_name | @media_name_variable } | BLOCKSIZE = { blocksize | @blocksize_variable } BUFFERCOUNT = { buffercount | @buffercount_variable } | MAXTRANSFERSIZE = { maxtransfersize | @maxtransfersize_variable } { NO_CHECKSUM | CHECKSUM } | { STOP_ON_ERROR | CONTINUE_AFTER_ERROR } RESTART STATS [ = percentage ] { REWIND | NOREWIND } | { UNLOAD | NOUNLOAD } { NORECOVERY | STANDBY = undo_file_name } | NO_TRUNCATE ENCRYPTION (ALGORITHM = { AES_128 | AES_192 | AES_256 | TRIPLE_DES_3KEY } , encryptor_options ) encryptor_options ::= `SERVER CERTIFICATE` = Encryptor_Name | SERVER ASYMMETRIC KEY = Encryptor_Name |
Description
Cette instruction permet d'effectuer une copie de sauvegarde complète de la base de données SQL Server pour créer une sauvegarde de base de données ou un ou plusieurs fichiers ou groupes de fichiers de la base de données afin de créer une sauvegarde de fichier.
Dernière mise à jour : Vendredi, le 19 Juin 2020