0% found this document useful (0 votes)
5 views

SQL Media Set Options

SQL Backup media set options
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

SQL Media Set Options

SQL Backup media set options
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Backup Set Options

The following are the few options that operate on the database backup set
that would be created using backup database command

WITH Options

The WITH clause is used with the BACKUP command in case we have
additional backup requirements.

COMPRESSION: This option enables backup compression.


NO_COMPRESSION explicitly disables the backup compression.
Compression is turned off during backups by default.

ENCRYPTION: An encryption algorithm can be specified with BACKUP to


secure the backup files stored offsite. You can specify NO_ENCRYPTION
when you don’t need backup encryption.

Media set Options

FORMAT: This option used to specify whether to overwrite the media


header information. The FORMAT clause will create a new media backup
set, whereas NOFORMAT will preserve all the information.

INIT: INIT is used to create a new backup set; NOINIT is used for
appending the backup to the existing backup set. The NOINIT parameter is
used mostly when you backup the database to a tape device.

NAME: The NAME parameter is used to identify the backup set.

SKIP: The skip parameter is used to skip the expiration check on the
backup set.

NOREWIND: This parameter is used to keep a tape device open and ready
for use

NOUNLOAD: This parameter is used to instruct SQL Server to not unload


the tape from the drive upon completion of the backup operation.

STATS: The STATS option is useful to get the status of the backup
operation at regular stages of its progress.
BACKUP DATABASE Demo TO
DISK = 'D:\PowerSQL\SQLShackDemoATC_1.BAK',
DISK = 'f:\PowerSQL\SQLShackDemoATC_2.BAK',
DISK = 'f:\PowerSQL\SQLShackDemoATC_3.BAK',
DISK = 'f:\PowerSQL\SQLShackDemoATC_4.BAK'
WITH INIT, NAME = 'FULL SQLShackDemoATC backup', STATS = 5

https://docs.microsoft.com/en-us/sql/t-sql/statements/backup-transact-sql?
view=sql-server-ver16

You might also like