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

VIEW SERVER STATE permission on SQL Server?

Hi all, Sometime While trying to Login into a database we face an error message as shown below. --------------------------- Microsoft Dynamics NAV Classic --------------------------- You cannot start Microsoft Dynamics NAV Classic because you do not have the VIEW SERVER STATE permission on SQL Server. Contact your system administrator. --------------------------- OK    ---------------------------

NAV 2013 R2 - Cumulative update 12 Released.

Hi all, Please find below the details of  Cumulative Update 12 released for Microsoft Dynamics NAV 2013 R2. Title - Cumulative Update 12 for Microsoft Dynamics NAV 2013 R2 Build No. - 38053 Release Date - October, 2014 Local Version Included - AU, AT, BE, CH, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, SE, UK, RU Download Link Note: Implementing this cumulative update will require a database conversion unless you have already implemented update rollup 5.

NAV 2013 Upgrade Part III - Data Upgrading.

Hi all, As per agenda we need to discuss the data upgrade in NAV 2013. The process is similar to what used to be till NAV 2009 R2 but with some changes. Let's start the process. Remember -  1) You can only upgrade a database to NAV 2013 from NAV 2009 SP1 / R2 SQL Only. 2) The Synchronization of users with SQL Server is no more required.