Monday 22 May 2023

DPM Rollup Update Installation Fails - Failed to execute SQL string, error: BACKUP DATABASE is terminating abnormally

Recently we decided to deploy Update Rollup 5 for Data Protection Manager 2019, but were running into issues getting the update to install.

In the installation log we spotted lots of:

MSI (s) (BC!10) [14:34:02:258]: Transforming table Error.

But most importantly we saw:

ExecuteSqlStrings:  Error 0x80040e14: failed to execute SQL string, error: BACKUP DATABASE is terminating abnormally., SQL key: KB5024231_BackupDpmDb.sql.97DDF5B3_3770_4C3E_8673_52BD081E1EFD SQL string: BACKUP DATABASE DPMDB_SERVERNAME080fe81c_748b_403a_b6ca_fa1d3a042da9 TO DISK = 'QFEDPMDB_SERVERNAME080fe81c_748b_403a_b6ca_fa1d3a042da9.bak' WITH COPY_ONLY, INIT

Well why would that be an issue - it usually works...

The answer is annoyingly simple:

If you delete the file:

QFEDPMDB_SERVERNAME080fe81c_748b_403a_b6ca_fa1d3a042da9.bak

(which will be located in your normal backup directory for SQL Databases and named with the guid and machine/database name you actually have rather than the above)

It will work. But why does it care, the file usually exists from the last update rollup.

The answer is in the command - if you run that in SSMS you'll see this error appear:

System.Data.SqlClient.SqlError: Cannot use the backup file because it was originally formatted with sector size 4096 and is now on a device with sector size 512. (Microsoft.SqlServer.Smo)
Ah ha! Indeed - the last update rollup we installed we were indeed using a disk with 4096 sector size, and the new ones are back to 512 for the system volume (long story for another day!)

Deleting the old backup is the easiest fix.