web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

The table [Reporting].[KeepReports] is being dropped, data loss could occur.

(0) ShareShare
ReportReport
Posted on by 28,058 Moderator
Hi all,
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.. 
Here is the last part of the blog, the first 2/3 being irrelevant. 
 
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
 
 
Categories:
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 565 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 450 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans