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 :
Microsoft Dynamics NAV (Archived)

Business Central On-Premises sync-navtenant error: the operation could not complete because a record was locked by another user

(0) ShareShare
ReportReport
Posted on by 47

I've just recently upgraded from CU1 to CU2 of Business Central on-premises and now I can't synchronise the schema via Powershell & the NAV RTC will not run at all. 

The error makes no sense as I've closed all sessions and other than the BC130 service nothing is accessing the database (other than my Powershell command).

The exact error is:

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

At line:1 char:1
+ sync-navtenant bc130
+ ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (0:Int32) [Sync-NAVTenant], NavCommandException
    + FullyQualifiedErrorId : MicrosoftDynamicsNavServer$bc130,Microsoft.Dynamics.Nav.Management.Cmdlets.SyncNavTenant

This worked fine in CU1 but I have to use CU2 so I have the latest objects and application for 'Making Tax Digital'.

In CU2 I can still compile the tables 'with validation' perfectly. 

But attempting to run the RTC produces the following error: 'The system is not accessible'.

This is a very frustrating show-stopper as I have no clue what is causing this & can't get past it.  PLEASE help!?

*This post is locked for comments

I have the same question (0)
  • technique Profile Picture
    47 on at

    SOLVED IT ...

    When you open the old database with the new CU02 client and NAV performs the automatic database upgrade task it is enabling change tracking in SQL on the following tables...

    Add-in

    Object Metadata

    NAV App Object Metadata

    NAV App Tenant App

    NAV App

    NAV App Publish Reference

    Debugger Breakpoint

    By resetting these ie. turning off Change Tracking I have solved the issue.

    This must be a bug with Cumulative Update 2 as this doesn't occur with CU1 and I can't see why MS would make such a (stupid) deal breaking change... !

  • ekeukens Profile Picture
    60 on at

    I have exactly the same problem. Even if I upgrade to CU1 first and then restore the database to CU2 this problem occurs even if there's no database migration between CU1 and CU2.

    You're wright, this must be some bug in CU2.

    Can you tell me what you mean by [Change Tracking]? Do you mean change log functionality within the functionality, or do you mean some property on Nav Server.

  • technique Profile Picture
    47 on at

    It’s within SQL.  If you google it there are scripts that let you view the property & scripts to turn it on or off, using SQL Server Management Studio.  If you can’t find let me know & I will post something here for you.

    I noticed CU3 was released yesterday so I’d be interested to know if this issue is just CU2 or CU2 & beyond...

  • ekeukens Profile Picture
    60 on at

    I found it, but this property seems not to be my problem. Most of my database have this problems, only in 1 database sync runs OK. But in all databases this SQL property is the same.

    I will post it in a yammer group to check/ask MS.

    If I upgrade a database from 10.00 to 13.00 I don't have any problems in CU0/CU1. If I install CU2 I have problems (in migrating 10.00 to 13.00, but also in databases which were upgraded OK using CU1).

    I will download CU3 and test..

  • Community Member Profile Picture
    on at

    Did anyone get an answer from Microsoft or have a solution, because this also happens to me when upgrading from Nav 2018W1 CU6 to Dynamics OnPremise W1 CU2.

    What I read about disabling change tracking on some tables, didn't or can't work because whe using nav-synctenant it fails because it detect that change tracking is disabled.

    So I have to enable change tracking , and I'm back where i started.

  • Community Member Profile Picture
    on at

    I have the same issue in CU3. It's stitll not solved.

  • Community Member Profile Picture
    on at

    I also tried to disable change tracking in the few tables that had it turned on, but Synch Tenant complains that tracking is off for those tables then. I will send MS a support request.

  • Suggested answer
    Community Member Profile Picture
    on at

    Received an answer from microsoft, and got it working again:

    "The way we saw how to work around this, is simply if you can make sure, with a fresh backup of this databse after converting it in the new version, and directly compile and synchronize system tables before doing anything else, sometimes also the sync with force is the ultimate solution here. Once you do this with the system table first, the rest should not be an issue."

    So after converting, compile the system tables with force first before continuing your upgrade script.

    But be aware, when doing the actual upgrade with "Start-NavDataUpgrade -ServerInstance <instancename> " , I received several "a record was locked by another user" errors. I had to resume the Upgrade several times, and also remove all add-in records.

    Check why the upgrade faildes with Get-NavDataUpgrade -ServerInstance <instancename> -ErrorOnly. And also try to resume the upgrade from the developer environment.

  • ekeukens Profile Picture
    60 on at

    Not sure if this is the solution. I'm aware of compiling systems tables. I wonder why they say "sometimes also the sync with force is the ultimate solution here", because we deliver 1 standard upgrade script for all databases/customers. So ther emust be 1 fixed procedure.

    To me it looks there's a difference in CU1 and CU2 (and up). I'm waiting for more comments of MS team on yammer..

  • Community Member Profile Picture
    on at

    I agree. I tried doing force and I still get the errors. I am also waiting for MS support.

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 > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans