Running into a strange situation I've never met so far in 12+ years of MR configuration and upgrades...
While attempting to upgrade MR 2012 CU16009 (quite recent build) to CU16013.1 (or even the HF CU16012), MR fails after not even a minute into the process. Checking the log returns a very strange message..
Machine: MYDB
9/18/2023 7:09:06 AM - Current database schema version for ManagementReporter: 2.12.16009; deployment package schema version: 2.12.16012; update required: True
Machine: MYDB
9/18/2023 7:09:06 AM - Beginning database deployment...
Machine: MYDB
9/18/2023 7:09:06 AM - Initializing deployment (Start)
Machine: MYDB
9/18/2023 7:09:19 AM - The table [Reporting].[KeepReports] is being dropped, data loss could occur.
Machine: MYDB
9/18/2023 7:09:19 AM - Initializing deployment (Complete)
Machine: MYDB
9/18/2023 7:09:19 AM - Analyzing deployment plan (Start)
Machine: MYDB
9/18/2023 7:09:19 AM - Analyzing deployment plan (Complete)
Machine: MYDB
9/18/2023 7:09:19 AM - Updating database (Start)
Machine: MYDB
9/18/2023 7:09:19 AM - [2023-09-18 07:09:19.990]Predeployment script starts executing.
Machine: MYDB
9/18/2023 7:09:20 AM - .Net SqlClient Data Provider: Msg 50000, Level 16, State 127, Line 6 Rows were detected. The schema update is terminating because data loss might occur.
Machine: MYDB
9/18/2023 7:09:20 AM - Script execution error. The executed script:
IF EXISTS (SELECT TOP 1 1
FROM [Reporting].[KeepReports])
RAISERROR (N'Rows were detected. The schema update is terminating because data loss might occur.', 16, 127)
WITH NOWAIT;
Machine: MYDB
9/18/2023 7:09:20 AM - An error occurred while the batch was being executed.
Machine: MYDB
9/18/2023 7:09:20 AM - Updating database (Failed)
Machine: MYDB
9/18/2023 7:09:20 AM - The database deployment failed. Additional information: Microsoft.SqlServer.Dac.DacServicesException: Could not deploy package.
Warning SQL72015: The table [Reporting].[KeepReports] is being dropped, data loss could occur.
Error SQL72014: .Net SqlClient Data Provider: Msg 50000, Level 16, State 127, Line 6 Rows were detected. The schema update is terminating because data loss might occur.
Error SQL72045: Script execution error. The executed script:
IF EXISTS (SELECT TOP 1 1
FROM [Reporting].[KeepReports])
RAISERROR (N'Rows were detected. The schema update is terminating because data loss might occur.', 16, 127)
WITH NOWAIT;
That table in the ManagementReporter database holds 168 rows, a single /ID/ field and is simply filled with numbers which correspond to the Report ID's in MR.
I've not checked another MR instance to compare whether that table is supposed to hold data or not, but I've tried to truncate the table after I copied the data into a backup table, and guess what, it fails the same way on both tables.
Machine: MYDB
9/18/2023 7:09:19 AM - The table [Reporting].[KeepReports_bak] is being dropped, data loss could occur.
Which means there is a process that specifically wants to perform something on all the tables of the /Reporting/ schema, but fails to run on that one. Not sure if it happens to be the first in the list, as it doesn't go further after that error.
Any suggestions on how to get around that ?
I know I could simply export all the definitions, but the client does have hundreds of reports, rows and columns definitions, so if that could be avoided, it would be great.
TIA