Skip to main content

Notifications

Microsoft Dynamics NAV (Archived)

SQL Server timeout during Sync of data in NAV2009 to NAV2015 upgrade

(0) ShareShare
ReportReport
Posted on by

Hi all,

I'm working on a NAV2009 to NAV2015 upgrade.  If you're familiar with the document "Upgrading from Microsoft Dynamics NAV 2009 R2 or Microsoft Dynamics NAV 2009 SP1 to Microsoft Dynamics NAV 2015" I am on "Task 7" which is running the Schema Synchronization.  I'm running the sync via the Powershell command:

 Sync-NAVTenant -ServerInstance DynamicsNAV80

Our database is fairly large - about 200GB.  When I run the Sync, after about 30 minutes I get an error: 

Sync-NAVTenant : A connection to SQL server is no longer usable.
This could be caused by one of the following reasons:
* The server has been shut down manually or because of an error.
* The SQL server connection settings are not correct.
* A network failure has occurred.
* A hardware failure has occurred on the server or on your computer.
Try to connect again later or contact your system administrator.
At line:1 char:1
+ Sync-NAVTenant -ServerInstance DynamicsNAV80
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (0:Int32) [Sync-NAVTenant], NavCom
mandException
+ FullyQualifiedErrorId : MicrosoftDynamicsNavServer$DynamicsNAV80,Microso
ft.Dynamics.Nav.Management.Cmdlets.SyncNavTenant

 

The application log seems to indicate a timeout error:

Source: .Net SqlClient Data Provider
ErrorCode: -2146232060
Message: A transport-level error has occurred when sending the request to the server. (provider: Session Provider, error: 19 - Physical connection is not usable)
StackTrace:
at System.Data.SqlClient.TdsParser.TdsExecuteRPC(_SqlRPC[] rpcArray, Int32 timeout, Boolean inSchema, SqlNotificationRequest notificationRequest, TdsParserStateObject stateObj, Boolean isCommandProc, Boolean sync, TaskCompletionSource`1 completion, Int32 startRpc, Int32 startParam)

 

SQL Server's Timeout on connections was set to 600 seconds, so I am getting ready to increase that timeout setting.  I'm wondering if anyone has any experiences indicating to what that timeout setting should be set to?  I guess that 10 minutes isn't enough for the Sync process to continue, but I'm wondering when does SQL server communicate back to the sync process indicating it is still running?  Is SQL doing 100% of the synchronization, or is it "starting the clock over" after each table or some group of records?

Thanks in advance to anyone who has seen this.

 

*This post is locked for comments

  • rsaritzky Profile Picture
    rsaritzky on at
    RE: SQL Server timeout during Sync of data in NAV2009 to NAV2015 upgrade

    Thanks Saurav,

    I did change the timeout in the service tier to 10 hours and that solved the problem.  By watching the SQL log, the one query that was causing the problem was running about 45 minutes.  Queries further down the upgrade path may in fact be taking longer, but so far, the process is still running.

    Regards,

    Ron

  • Verified answer
    Saurav.Dhyani Profile Picture
    Saurav.Dhyani 14,178 Super User 2025 Season 1 on at
    RE: SQL Server timeout during Sync of data in NAV2009 to NAV2015 upgrade

    Hi,

    You Can Increase the SQL Command Timeout To 23:50:00 in Service Tier.

    Change This Setting Back to 00:30:00 After Migration is Complete.

    Read It Here -

    https://blogs.msdn.microsoft.com/nav/2015/06/17/best-practices-tips-and-tricks-for-upgrading-to-dynamics-nav-2013-r2-or-dynamics-nav-2015-part-2/

    Search For -

    Go to the configuration of the service and change ‘SQLCommandTimeout’ to a big value such as 10 hours. The default is 30 minutes, which is too small a window.

    Hope it helps

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,965 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,817 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans