In my experience supporting both SharePoint and Microsoft Dynamics GP at The Resource Group, one of the most common issues that is encountered is random disconnects to the SQL server. We are going to take a look at some of the errors, and we will focus on one Windows setting that has resolved the issue the majority of the times I have encountered disconnects.

Sometimes when working with Great Plains, it isn't always obvious when you are facing a disconnect to the SQL server. To verify if you are experiencing a disconnect, you can run a network monitor trace when experiencing the error, and see if there are any resets in the TCP Acknowledgements. The description of the packet will show either an R, or an RST. There are certain errors, however, which can point to a reset occurring while working in GP:

  1. FP: Couldn't Close Table
  2. Invalid Object Name
  3. Couldn't find Stored procedure (Verify if the stored procedure exists in the database)
  4. Timeout period has expired
  5. Cannot find the table

So now that you have determined you are experiencing resets, what can you do to stop them?

Whenever I am experiencing resets in a customer environment, the first thing I do is check to see if TCP Chimney is enabled on the SQL servers Operating System, and if Offload is enabled on the Network Interface Card (NIC).

TCP Chimney Offload is a networking tool in the Windows Operating System that transfers the workload from the CPU to a networking adapter during data transfer. Having this enabled in a database environment can cause the connection from the client to the database to reset, and require a new connection to be established. Programs that require a constant connection to the database for reading and writing to the database, can experience intermittent errors when trying to connect right after a reset.

The Optimizing and Maintaining Performance for Microsoft Dynamics GP White Paper recommends disabling TCP Chimney:
It is recommended to disable TCP Chimney at all servers and workstations for best network performance.  TCP Chimney must be disabled in the following areas:

  • Disable at the operating system level
  • Disable various Offload options at the network interface card (NIC) level

TCP Chimney is designed to offload certain tasks that the CPU typically would handle to the NIC card.  Having these settings enabled may cause database connections to be dropped in turn causing various communications errors, such as "DBMS 12" or "## Object Does Not Exist" in Microsoft Dynamics GP.  It can also show up as performance issues due to network delays such as noted in the following blog article:

“We’ve also identified situations where TCP Chimney has impacted transaction throughput and caused delays between when a statement has been completed by the SQL engine and the time to receive the begin event of the next statement.  This impact can be significant especially in application workloads that have throughput requirements to execute a series of statements within a certain time boundary.”

How do I disable TCP Chimney in the Operating System?

To disable TCP chimney, you can follow the steps in the following articles:

How to Disable TCP Chimney in Windows Server 2008 and Windows 7:

How to Disable TCP Chimney in Windows 2003 Server and Windows Vista:

I recommend disabling it on the SQL server first, and if that does not resolve the issue, I recommend disabling it on the terminal servers, and client workstations.

Simple steps to verify and disable on Server 2008 and server 2012:

1. Run the command prompt by right clicking the command prompt and selecting "Run as Administrator"

2. Verify if TCP Chimney is enabled by typing netsh int tcp show global

3. Since Chimney Offload State is showing automatic, we know it is enabled. To disable it, type netsh int tcp set global chimney=disabled

4. Verify it is disabled by typing netsch int tcp show global

How do I disable offload on the NIC?

  1. Open Device Manager.
  2. Under Network Adapters, double-click the network adapter that you want.
  3. On the Advanced tab, click Disabled for all of the Offload Entries. 


If Disabling TCP Chimney doesn't fix the disconnects, what next?

If you are still experiencing disconnects after disabling TCP Chimney, and offload on the NIC, I would look at the following:

  1. Event viewer on the SQL server, and the client to see if there are any error messages when the disconnects occur. One thing to look for is to see if either machine is having issues connecting or maintaining connection to the Domain Controller.
  2. Verify if it is happening on all clients or just a specific client. If it is only happening on one, try using a new cable, a different NIC, or hookup the computer to the network on a different Ethernet port.
  3. Verify that AV is setup to exclude the databases in SQL, and the appropriate files on the client. 

Virus scanner setup
We recommend the following exclusions.

On the Microsoft Dynamics GP client
Exclude the Dynamics\GP folder. By default, this folder is in the following location: C:\Program Files\Microsoft Dynamics\GP

The following file name extensions should be excluded:

  • .cnk
    These files are used when service packs are installed. These files should not be in a directory for a significant time.
  • .dic and .chm
    These files are the Help files for Microsoft Dynamics GP.
  • .set
    These files are the start files. These files contain information about the products that are installed and where the products are located.
  • .ini
    These files are the configuration files. These files hold information about which user logged on most recently, what data source is used, and the paths.
  • .dat
    These files are ctree .dat files that are used with an SQL database.
  • .idx
    These files are ctree index files that are used with an SQL database.
  • .vba
    These files are used if there are Microsoft Visual Basic for Applications (VBA) modifications for Microsoft Dynamics GP.
  • .log
    These files are used by a Dexsql.log file if you use a Dexsql.log file to troubleshoot an error message.
    On the computer that is running SQL Server
    Exclude the *.ldf database files and the *.mdf database files.

    4. Verify the Switches and routers between the client and the SQL server are working, and that there are no bad ports.
    5. Verify that the DNS records in the domain are correct.

For more information, contact a Microsoft Dynamics partner like The Resource Group.