Summary
A script and process to diagnose and prevent database constraint violations that might cause a failure to upgrade to FlexNet Manager Suite 2018 R2.
Question
Based on experience with previous upgrades for customers using on-premises implementations of FlexNet Manager Suite, where unexpected data violating database constraints had caused errors in license compliance outcomes, the database migration scripts for this release have been made more rigorous. Database migration now halts (failing the product upgrade) if unexpected data is found in tables of the following FlexNet databases:
- Compliance database (suggested name FNMSCompliance)
- Inventory database (suggested name FNMSInventory)
- Data warehouse database (suggested name FNMSDataWarehouse).
The following process (using the provided script) identifies issues in advance of your upgrade project. This allows you to correct the data first, so that your upgrade can succeed. You require access to the Microsoft SQL Server Management Studio program and access to the FlexNet Manager Suite databases.
Note: This process does not make any changes to the data in your databases, because any such changes (if required) need individual inspection and assessment. However, it does reactivate any database constraints that have been disabled. For this reason, it is strongly recommended that you start with a full backup of all your FlexNet databases. You may run this process on either a test or production environment, and it is not necessary to halt other operations.
Answer
To identify issues with database constraint violations:
- Log into Microsoft SQL Server Studio using an account mapped to users with (at least) Select permissions on all the above databases.
- Recommended: Make full backups of all your existing FlexNet databases:
- Compliance database (suggested name FNMSCompliance)
- Inventory database (suggested name FNMSInventory)
- Data warehouse database (suggested name FNMSDataWarehouse)
- Select the first database to validate (such as FNMSCompliance), copy the following script (see Additional Information) and paste it into the execution window, then select and run it. This script generates SQL statements to test data in tables that database migration will also check. A query is output for each database constraint that appears as 'untrusted' to Microsoft SQL Server and automatically tested.
- Assess the result:
- If there are no errors printed when you run this script, all database constraints not trusted by SQL Server have clean data, and you may loop back and repeat this step for the remaining databases in turn. If no errors are created for all of the three databases under test, this process is complete.
- If an error occurs like the following statement as an example (of course the table names and column names vary according to each case), please document the error and from which database and continue to the next databases.
- You may choose to check details of the tableName and FK_Name in the FlexNet Manager Suite Schema Reference PDF, available through the title page of online help. However, identifying and cleaning up the problematic data is likely to require specialized insight and expertise, so that the steps below are recommended.
- Loop back and repeat the process for all three databases in turn until all are completed.
- Ask your registered support contact (a designated person within your enterprise who has access rights and login details) to raise a support case at https://flexeracommunity.force.com/customer/SupportSFCaseInsert, including a clear description of the issue. Be sure to attach the document listing affected tables and foreign keys. A useful title might be something like "Pre-upgrade check of DB constraint violations failed".
Related Documents
This process is repeated in the Prerequisites and Preparations section of the FlexNet Manager Suite 2014 Rx (or later) to 2018 R2 Upgrade Guide, a PDF available through the Flexera Customer Community portal (and another reference copy will also be available through the title page of online help after your upgrade).