FIX: TDE-enabled database backup with compression causes database corruption in SQL Server

Applies to: Microsoft SQL Server 2016 Service Pack 1SQL Server 2016 DeveloperSQL Server 2016 Enterprise More

Symptoms


Assume that you are using Microsoft SQL Server 2016 and Microsoft SQL Server 2017. You enable Transparent Data Encryption (TDE) on your database, and then you back up the database by using compression.

When you try to restore the database from this backup and verify the backup file by using the RESTORE VERIFYONLY FROM DISK SQL statement, you notice that the backup process corrupts a specific page in the database. Additionally, you may receive an error message.

Similarly, the RESTORE FROM DISK process can fail and generate an error message. However, you can finish this process successfully by using the CONTINUE_AFTER_ERROR option.

Msg 3183, Level 16, State 1,Line LineNumber
RESTORE detected an error on page (PageNumber) in database "DatabaseName" as read from the backup set
Msg 3013, Level 16, State 1
Damage to the backup set was detected

Resolution


This problem is fixed in the following cumulative update for SQL Server:

Cumulative Update 9 for SQL Server 2017     

Cumulative Update 2 for SQL Server 2016 SP2

Cumulative Update 9 for SQL Server 2016 SP1

Status


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

References


Learn about the terminology that Microsoft uses to describe software updates.