Starting with Business Central Cumulative Update 02, we changed the naming schema for tenant default constraints. This change can cause problems when technically upgrading an on-premise, single-tenant deployment (application and data in the same database) to Business Central Cumulative Update 02, 03, 04, or 05. This issue is fixed in later cumulative updates.

What is the issue

If you follow the normal guidelines for a technical upgrade, you might get the following error when you try to synchronize the tenant (database) after converting it to the new platform :

sync-navtenant : The operation could not complete because a record was locked by another user. Please retry the activity.

This error happens because the database conversion changes the default constraints on ndo tables that have an unsupported naming schema. If these constraints are on the Object Metadata table, a lock occurs .

How to detect the issue

To detect whether the database has the conditions that cause this error, run the following SQL query on the database (either before the technical upgrade or after you experience the error):

select * FROM sys.default_constraints dc WHERE dc.name LIKE '$ndodefault$%'


If the query returns any results, this means that the database has default constraints with an unsupported naming schema.

How to fix the issue

Run the following SQL query on the database to ensure that the default constraints for ndo tables have the supported naming schema: 

select 'EXEC sp_rename ' + QUOTENAME(dc.name) + ', [DF__'+ dc.name+']' FROM sys.default_constraints dc WHERE dc.name LIKE '$ndodefault$%'

The database in now ready for synchronization during the technical upgrade.