Troubleshooting Guide: SQL Server Error 3236 – S3 Object Storage Part Limit Reached
Why This Error Happens
This error occurs when SQL Server 2025 writes a backup or data file to S3-compatible object storage and the underlying multipart upload exceeds the maximum number of parts allowed by the storage provider (typically 10,000 parts per object). This usually happens when the configured part size is too small relative to the total backup size, causing SQL Server to fragment the file into more segments than the S3 API permits. It can also occur if MAXTRANSFERSIZE is left at a default or low value during backup operations targeting very large databases.
Step-by-Step Resolution Guide
Step 1: Recalculate Required Part Size
- Determine total backup size (e.g., 2 TB) and divide by 10,000 (max parts) to find the minimum safe part size.
- Example: a 2 TB backup requires a part size of at least ~210 MB to stay under the part limit.
- Document this value before modifying any backup scripts.
Step 2: Increase MAXTRANSFERSIZE in Backup Command
- Modify your
BACKUP DATABASET-SQL statement to explicitly set a larger transfer size:
BACKUP DATABASE [YourDB]
TO URL = 'https://s3endpoint.example.com/backups/YourDB.bak'
WITH MAXTRANSFERSIZE = 2097152, FORMAT, COMPRESSION;
- Use a value in bytes (e.g.,
2097152= 2 MB per part, adjust upward depending on total size) that keeps total part count under 10,000. - Avoid using the default transfer size for databases larger than 500 GB.
Step 3: Update Credential and Endpoint Configuration
- Open SQL Server Configuration Manager or use T-SQL to verify the
CREDENTIALobject tied to your S3 endpoint has correct access keys. - Run the following to confirm credential mapping:
SELECT * FROM sys.credentials WHERE name = 'S3BackupCredential';
- Ensure the S3 bucket policy allows
s3:PutObjectands3:AbortMultipartUploadpermissions, as failed cleanups can also trigger part-limit errors on retries.
Step 4: Split Backups Using Multiple Files
- If a single object still exceeds part limits even after increasing
MAXTRANSFERSIZE, split the backup across multiple URL targets:
BACKUP DATABASE [YourDB]
TO URL = 'https://s3endpoint.example.com/backups/YourDB_1.bak',
URL = 'https://s3endpoint.example.com/backups/YourDB_2.bak'
WITH MAXTRANSFERSIZE = 2097152, FORMAT;
- This distributes parts across multiple objects, each with its own 10,000-part allowance.
Step 5: Clear Incomplete Multipart Uploads
- On the S3 storage console or via CLI, list and abort any stalled multipart uploads tied to the failed backup object:
aws s3api list-multipart-uploads --bucket your-bucket-name
aws s3api abort-multipart-upload --bucket your-bucket-name --key YourDB.bak --upload-id <ID>
- Clearing these prevents residual part-count accumulation on retry attempts.
Alternative or Verification Steps
- Re-run the backup job and monitor SQL Server Error Log and Windows Event Viewer (Application log) to confirm Error 3236 no longer appears.
- If the issue persists, consider enabling backup compression (
WITH COMPRESSION) to reduce total data size and naturally lower the required part count.