Skip to content

Commit 4c1ec7d

Browse files
Merge pull request #36742 from WilliamDAssafMSFT/20260302-backup-maxtransfersize
20260302 maxtransfersize detail
2 parents 1ddc414 + 07b6e09 commit 4c1ec7d

1 file changed

Lines changed: 23 additions & 12 deletions

File tree

docs/t-sql/statements/backup-transact-sql.md

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: BACKUP (Transact-SQL) backs up a SQL database.
44
author: MikeRayMSFT
55
ms.author: mikeray
66
ms.reviewer: dinethi, wiassaf, randolphwest
7-
ms.date: 08/15/2025
7+
ms.date: 03/02/2026
88
ms.service: sql
99
ms.subservice: t-sql
1010
ms.topic: reference
@@ -489,11 +489,11 @@ The ZSTD compression algorithm is available starting with [!INCLUDE [sssql25-md]
489489

490490
| Backup statement | Outcome |
491491
| --- | --- |
492-
| **BACKUP DATABASE *database_name* TO {DISK | TAPE | URL} WITH NO_COMPRESSION** | Backup without any compression |
493-
| **BACKUP DATABASE *database_name* TO {DISK | TAPE | URL} WITH COMPRESSION** | Backup with compression using the algorithm specified by the server option `backup compression algorithm` (default `MS_XPRESS`) |
494-
| **BACKUP DATABASE *database_name* TO {DISK | TAPE | URL} WITH COMPRESSION (ALGORITHM = MS_XPRESS)** | Backup with compression using `MS_XPRESS` algorithm |
495-
| **BACKUP DATABASE *database_name* TO {DISK | TAPE | URL} WITH COMPRESSION (ALGORITHM = ZSTD)** | Backup with compression using ZSTD algorithm. |
496-
| **BACKUP DATABASE *database_name* TO {DISK | TAPE | URL} WITH COMPRESSION (ALGORITHM = ZSTD, LEVEL = HIGH)** | Backup with compression using ZSTD algorithm with compression level `HIGH`. |
492+
| `BACKUP DATABASE *database_name* TO {DISK | TAPE | URL} WITH NO_COMPRESSION` | Backup without any compression |
493+
| `BACKUP DATABASE *database_name* TO {DISK | TAPE | URL} WITH COMPRESSION` | Backup with compression using the algorithm specified by the server option `backup compression algorithm` (default `MS_XPRESS`) |
494+
| `BACKUP DATABASE *database_name* TO {DISK | TAPE | URL} WITH COMPRESSION (ALGORITHM = MS_XPRESS)` | Backup with compression using `MS_XPRESS` algorithm |
495+
| `BACKUP DATABASE *database_name* TO {DISK | TAPE | URL} WITH COMPRESSION (ALGORITHM = ZSTD)` | Backup with compression using ZSTD algorithm. |
496+
| `BACKUP DATABASE *database_name* TO {DISK | TAPE | URL} WITH COMPRESSION (ALGORITHM = ZSTD, LEVEL = HIGH)` | Backup with compression using ZSTD algorithm with compression level `HIGH`. |
497497

498498
#### DESCRIPTION = { '*text*' | *@text_variable* }
499499

@@ -639,6 +639,13 @@ Specifies the largest unit of transfer in bytes to be used between [!INCLUDE [ss
639639

640640
When creating backups by using the SQL Writer Service, if the database has configured [FILESTREAM (SQL Server)](../../relational-databases/blob/filestream-sql-server.md), or includes [memory optimized filegroups](../../relational-databases/in-memory-oltp/the-memory-optimized-filegroup.md), then the `MAXTRANSFERSIZE` at the time of a restore should be greater than or equal to the `MAXTRANSFERSIZE` that was used when the backup was created.
641641

642+
| Command | SQL Server 2022 and later versions |
643+
|:--|:--|:--|:--|
644+
| BACKUP TO URL - Azure | Default 1 MB, Max 20 MB |
645+
| BACKUP TO URL - S3 | Default 10 MB, Max 20 MB |
646+
| BACKUP TO DISK | Default is 1 MB, Max 4 MB |
647+
| BACKUP TO TAPE/VDI | Default 64 KB, Max 4 MB |
648+
642649
For [Transparent data encryption (TDE)](../../relational-databases/security/encryption/transparent-data-encryption.md) enabled databases with a single data file, the default `MAXTRANSFERSIZE` is 65536 (64 KB). For non-TDE encrypted databases, the default `MAXTRANSFERSIZE` is 1048576 (1 MB) when using backup to `DISK`, and 65536 (64 KB) when using VDI or `TAPE`. For more information about using backup compression with TDE encrypted databases, see the [Remarks](#remarks) section.
643650

644651
### Error management options
@@ -755,7 +762,7 @@ Specifies that the transaction log shouldn't be not truncated and causes the [!I
755762

756763
The `NO_TRUNCATE` option of `BACKUP LOG` is equivalent to specifying both `COPY_ONLY` and `CONTINUE_AFTER_ERROR`.
757764

758-
Without the `NO_TRUNCATE` option, the database must be in the `ONLINE` state. If the database is in the SUSPENDED state, you might be able to create a backup by specifying `NO_TRUNCATE`. But if the database is in the `OFFLINE` or `EMERGENCY` state, `BACKUP` isn't allowed even with `NO_TRUNCATE`. For information about database states, see [Database States](../../relational-databases/databases/database-states.md).
765+
Without the `NO_TRUNCATE` option, the database must be in the `ONLINE` state. If the database is in the SUSPENDED state, you might be able to create a backup by specifying `NO_TRUNCATE`. But if the database is in the `OFFLINE` or `EMERGENCY` state, `BACKUP` isn't allowed even with `NO_TRUNCATE`. For information about database states, see [Database states](../../relational-databases/databases/database-states.md).
759766

760767
## About working with SQL Server backups
761768

@@ -1365,7 +1372,11 @@ The total space used by the buffers is determined by: `BUFFERCOUNT * MAXTRANSFER
13651372

13661373
Specifies the largest unit of transfer in bytes to be used between [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] and the backup media. The possible values are multiples of 65536 bytes (64 KB) ranging up to 4,194,304 bytes (4 MB).
13671374

1368-
For [Transparent data encryption (TDE)](../../relational-databases/security/encryption/transparent-data-encryption.md) enabled databases with a single data file, the default `MAXTRANSFERSIZE` is 65536 (64 KB). For non-TDE encrypted databases the default `MAXTRANSFERSIZE` is 1048576 (1 MB) when using backup to `DISK`, and 65536 (64 KB) when using VDI or `TAPE`.
1375+
| Command | Azure SQL Managed Instance<BR><BR>SQL Server 2022 or SQL Server 2025 update policy | Azure SQL Managed Instance<BR><BR>Always-up-to-date policy |
1376+
|:--|:--|:--|:--|
1377+
| BACKUP TO URL - Azure | Dynamic, chosen by the service for automatic backups.<br><br>For COPY_ONLY backups: Default 1 MB, Max 100 MB | Dynamic, chosen by the service for automatic backups.<br><br>For COPY_ONLY backups: Default 1 MB, Max 100 MB|
1378+
1379+
For databases with [Transparent data encryption (TDE)](../../relational-databases/security/encryption/transparent-data-encryption.md) enabled with a single data file, the default `MAXTRANSFERSIZE` is 65536 (64 KB). For non-TDE encrypted databases the default `MAXTRANSFERSIZE` is 1048576 (1 MB) when using backup to `DISK`, and 65536 (64 KB) when using VDI or `TAPE`.
13691380

13701381
> [!NOTE]
13711382
> `MAXTRANSFERSIZE` specifies the largest unit of transfer, and doesn't guarantee that every write operation transfers the specified largest size.
@@ -1456,7 +1467,7 @@ WITH COPY_ONLY;
14561467

14571468
## Related content
14581469

1459-
- [RESTORE DATABASE](restore-statements-transact-sql.md)
1470+
- [RESTORE Statements (Transact-SQL)](restore-statements-transact-sql.md)
14601471

14611472
::: moniker-end
14621473
::: moniker range=">=aps-pdw-2016"
@@ -1566,12 +1577,12 @@ For more information about managing credentials in [!INCLUDE [ssPDW](../../inclu
15661577
- The database doesn't exist.
15671578
- The target directory already exists on the network share.
15681579
- The target network share isn't available.
1569-
- The target network share doesn't have enough space for the backup. The `BACKUP DATABASE` command doesn't confirm that sufficient disk space exists prior to initiating the backup, making it possible to generate an out-of-disk-space error while running `BACKUP DATABASE`. When insufficient disk space occurs, [!INCLUDE [ssPDW](../../includes/sspdw-md.md)] rolls back the `BACKUP DATABASE` command. To decrease the size of your database, run [DBCC SHRINKLOG](../database-console-commands/dbcc-shrinklog-azure-sql-data-warehouse.md)
1580+
- The target network share doesn't have enough space for the backup. The `BACKUP DATABASE` command doesn't confirm that sufficient disk space exists prior to initiating the backup, making it possible to generate an out-of-disk-space error while running `BACKUP DATABASE`. When insufficient disk space occurs, [!INCLUDE [ssPDW](../../includes/sspdw-md.md)] rolls back the `BACKUP DATABASE` command. To decrease the size of your database, run [DBCC SHRINKLOG - Analytics Platform System (PDW)](../database-console-commands/dbcc-shrinklog-azure-sql-data-warehouse.md)
15701581
- Attempt to start a backup within a transaction.
15711582

15721583
## Remarks
15731584

1574-
Before you perform a database backup, use [DBCC SHRINKLOG](../database-console-commands/dbcc-shrinklog-azure-sql-data-warehouse.md) to decrease the size of your database.
1585+
Before you perform a database backup, use [DBCC SHRINKLOG - Analytics Platform System (PDW)](../database-console-commands/dbcc-shrinklog-azure-sql-data-warehouse.md) to decrease the size of your database.
15751586

15761587
A [!INCLUDE [ssPDW](../../includes/sspdw-md.md)] backup is stored as a set of multiple files within the same directory.
15771588

@@ -1705,6 +1716,6 @@ WITH (
17051716

17061717
## Related content
17071718

1708-
- [RESTORE DATABASE](restore-statements-transact-sql.md)
1719+
- [RESTORE Statements (Transact-SQL)](restore-statements-transact-sql.md)
17091720

17101721
::: moniker-end

0 commit comments

Comments
 (0)