Skip to main content

Data Migration To NAV 2013 R2 - Error in Step 2.

Hi All,

It's been a while that i haven't blogged anything.

Today i would like to discuss an issue raised to me by most of the Readers that they face during Data Migration in Upgrade Activity. The Error message occurs before step two after opening database in NAV 2013 R2.

When we open our database in NAV 2013 R2 and import customized objects and then try to Run the NAV 2013 R2 Client, it behaves in an unexpected manner. Instead of opening the client it says -

The operation could not complete because a record in the <<>> table was locked by another user. Please retry the activity.
OR
A connection to the server has been established. preparing your work space.
OR
Fields cannot be found in Marketing setup..


REASON -

Due to introduction of Multitenancy in NAV 2013 R2 there is a slight change in Process of Updating the metadata(structure) of Table in SQL Server.

Till NAV 2013, when we add/remove/modify a field in table it used to directly connect to server and update the metadata in SQL.

With NAV 2013 R2 now when we change an objects in NAV it connect to Service and service then update to SQL Server. For this we also need to make sure that the value in service for Field SQL Command Timeout is SET to 24:00:00 as shown below.



How to Resolve -

Actually its not an issue its just the time that SQL Required to update the metadata of the tables. So here what we should do -

1. After importing merged objects in NAV 2013 R2 Run Sync-Tenant.
2. Once the Sync-Tenant is completed run below query on SQL.

---------------------------------------------------------------------------
-- Author: Saurav Dhyani
-- Create date: 12-11-2014
-- Description: Query to Check Operation in a Database
-- Change the <<Database Name>> with actual database name

select spid,cmd,waittime,lastwaittype,cpu,physical_io,login_time,last_batch,status,hostname,program_name,nt_username, nt_domain
from master.dbo.sysprocesses where dbid = db_id('<<Database Name>>')
---------------------------------------------------------------------------

The query will show you multiple rows with same or different program_name as shown below -


SQL is still in process of updating the metadata until you see cmd for all rows as AWAITING COMMAND.

Once completed we are good to go and start Navision Client.

Good to Have - 
1. During Data Migration Always keep a Backup after Completion of Step 1 & After conversion to NAV 2013.

Stay tuned for more.

Regards,
Saurav Dhyani
www.sauravdhyani.com

Comments

Popular posts from this blog

BC 21 and Higher - PowerShell Cmdlet (Replacement of Business Central Administration).

Hi Readers, As discussed in last article about deprecating of Business Central Administration, there are few common actions that we use in administration till Business Central 20. For our on-prem customers, we will still require doing activities. As Microsoft suggest we need to start using PowerShell cmdlet.    Let's see how to do those via PowerShell, or Administration Shell. I will be keep adding commands as you comment to this article.

Send Mail with Attachment From Navision.

Hi all, We have seen how to save a report into PDF and how to send mail to a customer. Let's link these two post in one i.e. Mailing statement to a customer into PDF Format. This article is part of the Series. Please Refer  Table of Content here . If you have the old objects set let me brief you what I will be changing - 

MSDYN365BC - Data Upgrade To Microsoft Dynamics 365 Business Central on premises.

Hi Readers, We have already talked about the number of steps for upgrading to Business Central on Premises from different NAV versions. After that article, I received multiple requests for an article which list down steps for Data Migration. In this article, we will discuss steps of data migration to MSDYN365BC (on-Prem) from NAV 2017. For this article, I am considering a Cronus Demo Database without any customization. For an actual upgrade project, we will have to complete object merge using compare and Merge process. After the Merge Process, the next step is data migration. Let's discuss those steps. Direct Upgrade to Microsoft Dynamics 365 Business Central (on-Prem) is from following versions - 1. NAV 2015. 2. NAV 2016. 3. NAV 2017. 4. NAV 2018.