The Community is now in read-only mode to prepare for the launch of the new Flexera Community. During this time, you will be unable to register, log in, or access customer resources. Click here for more information.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

DB upgrade failed

raghuvaran_ram
By
Level 6

We are encountering an error while upgrading the database from 2020 R1 to 2020 R2.

 

Error message : there was an error while attempting to run cm-migr1600-migpost.sql 

However, we have successfully upgraded the Inventory and warehouse database and facing issue while upgrading compliance DB.

 

Regards

Raghu

 

 

(1) Solution

@mfranz 

I have raised a case and the solution provided was very similar to what you suggested, I was asked to delete only that specific entry that was causing the error, so post that I was able to complete the upgrade successfully.

exec BeaconTargetRemoveByNameInternal 'Known virtual cluster servers', 1
DELETE FROM BeaconTarget_MT WHERE [Name] = 'Known virtual cluster servers'

Thanks to everyone who replied to this query.

View solution in original post

(8) Replies

mfranz
By Level 17 Champion
Level 17 Champion

Looks like the migrations steps would like to insert existing values into the BeaconTarget_MT table. If you remove all entries from this table, the migration script should insert everything with new IDs.

@mfranz 

 

Thanks for your reply,

 

Do you mind helping me in sharing the query to find the table?

mfranz
By Level 17 Champion
Level 17 Champion
USE FNSMCompliance

SELECT *
FROM BeaconTarget_MT

As you're in the middle of a migration, I assume you have database backups 😉

@mfranz 

 

Yes. I'm testing this upgrade in the backup DB. I have deleted the entries in the entire table and retriggered the upgrade and it got completed successfully, but it did not bring back all the items. Attached the screenshot for your reference.

 

I have lost all the custom targets used for rules, I have attached the before and after screenshot for your reference, is there any other option as I need to have all those targets when I do the same activity in production.

mfranz
By Level 17 Champion
Level 17 Champion

I would assume that the scripts target only default tagets. They seem to be marked with "1" in the Internal column.

USE FNSMCompliance

SELECT *
FROM BeaconTarget_MT
WHERE Internal = 1

 Maybe it's enough to remove these.

@mfranz 

 

Thanks once again. I will restore the DB once again and have it tested tomorrow and share the results.

@mfranz 

I have raised a case and the solution provided was very similar to what you suggested, I was asked to delete only that specific entry that was causing the error, so post that I was able to complete the upgrade successfully.

exec BeaconTargetRemoveByNameInternal 'Known virtual cluster servers', 1
DELETE FROM BeaconTarget_MT WHERE [Name] = 'Known virtual cluster servers'

Thanks to everyone who replied to this query.

ChrisG
By Level 20 Flexeran
Level 20 Flexeran

There was a change in the 2020 R2 release to address to the problem discussed in the following thread which was related to the specific record shown in your error message: Any changes on Inventory setting page is throwing error while trying to save. It may be that this change isn't working well in your particular migration scenario.

If you can't work out how to get past the problem then you may wish to raise a case with Flexera Support to dig further.

(Did my reply solve the question? Click "ACCEPT AS SOLUTION" to help others find answers faster. Liked something? Click "KUDO". Anything expressed here is my own view and not necessarily that of my employer, Flexera.)