Get the System Database name for Dynamics GP

To get the system database name (used to be known as the DYNAMICS database) from any GP company, use the following SQL:


When issued in the context of a company database, this will tell you the name of the system database that manages it. Typically this statement will return


Note: In  a multi-tennant environment this may not be the standard DYNAMICS.


Prefix “B:” in Dynamics GP script logs

When logging operations to script log in GP, sometimes I see “B:” prefixing sections of the script log. Out of curiosity I asked the community what the B: represents. David Musgrave kindly let me know. It turns out to mean that those parts of the script are running on the background script processing queue.

The background script processing queue is used by GP to offload data-intensive operations into a background “thread” that allows the user to continue to use the workstation whilst it is running. 

Below shows a snippet of the log for a process showing the B: indicating these are running on the background queue.

13:35:32 B: 'SQL_FormatStrings()', "", "1-A3261A"
13:35:32 B: 'SQL_FormatStrings()', "", "1-A3261A"
13:35:32 B: 'SQL_FormatStrings()', "", "01-SE"
13:35:32 B: 'SQL_FormatStrings()', "", "01-SE"
13:35:32 B: 'SQL_FormatStrings()', "", ""
13:35:32 B: 'Get() of form ivItemSiteBinMstr', 0, 1-, 11, 0

Determining when inventory reconcile is running in Dynamics GP

If like me you find yourself writing a lot of integrations with Dynamics GP, then you will know that you really should not be messing with data related to inventory whilst the inventory reconcile is processing. Inventory reconcile is responsible for checking that everything tallies up, on summary records. Changing data under its feet, whilst it is trying to total and reference everything is a no-no as reconcile will come to the wrong conclusions! The problem when writing an integration is, how do you know a reconcile is in progress and processing? Well, somewhere on the network there will be a client machine with this this screen showing but that doesn't really help us, so what do we do..?


Answer is to run the following, if a row is returned, then inventory reconcile is running.

AND TRXSOURC = 'Reconcile'
AND CMPNYNAM = @CompanyName


Note: The company name parameter is found from from the company master table.

Using eConnect
if for the integration you are using eConnect (as you mostly should), directly or indirectly (many of the integration products for GP use eConnect under the covers), then the following error will occur. This is just the same thing, where eConnect has performed the same check and concluded it can't make any changes due to a reconcile in progress.
Error Number = 2246  Stored Procedure= taCreateUpdateBatchHeaderRcd  Error Description = Inventory Reconcile is currently running, you can not enter IV Transactions or Transfers until it is completed

Reconcile Dynamics GP inventory -at the speed of light*

*well almost

Reconcile routines in Dynamics GP check that related data in the system is kept in sync. They total up summary and related information and check all the numbers are correct over all the tables. If the GP application crashes, say due to network connectivity issues, then data can get out of sync. For example inventory items may show allocations for orders that have since been cancelled. Thus is it a good idea to run the reconcile routines for the various module in GP on a regular basis. As this requires users to be out of the system, there are limited chances to run these maintenance routines during a work week. When the GP install has many items. Inventory reconciles can take well over twenty four hours to complete (for one of the GP companies I look after). This is a big problem because a run of check links (another type of maintenance routine) and then reconcile takes too much of the weekend to run -often running into Monday morning when it has be forced to stop.

There is an alternative way to run inventory reconcile, by using the reconcile that is part of the Professional Services Tools Library. The PSTL is a free extra module that can be installed into GP, it adds some extra features and functionalities that have either not yet made it into the core product for one reason or another. After installing the PSTL open the main window, where under inventory tools lies the “item reconciler”. Select this option and click next.


PSTL Main Window with item reconcile highlighted

The user interface of the PSTL is terse and succinct as can be seen by the reconcile window screenshot below, the features in the PSTL are not polished for public consumption as the core product is.

Item Reconciler window

Select the check box and then click reconcile.

GP will become unresponsive for about ten mins as GP looks for items requiring reconciling, then the reconcile processing windows will pop up showing each item’s progress as it is reconciled. At the end on closing the Item Reconciler window, a report of work done will be produced.

The great thing about this reconcile vs the standard version is that it only attempts to reconcile items that are actually out of balance. This makes a radical difference to the processing time, It took only ten mins to complete the whole process last time I ran it – light speed, almost!

I measured the times for a full inventory reconcile (inc. history) vs PSTL reconcile and found the following results:

Measured processing times
Standard GP reconcile: 12 hours
PSTL reconcile: 10 mins


The issues

Unfortunately the PSTL Item reconcile also has problems, the first phase where it looks for items that require reconciling is not as comprehensive as the full reconcile. It will miss some issues, and the example I found is where the quantity of stock back ordered, on sales orders, does not match the quantity shown on the stock level window as the back ordered quantity. The reconcile seems to be blind to this error and thus will not correct the issue. I think perhaps that there are other inventory problems it may not detect vs the full reconcile.

It is claimed that PSTL reconciler runs the same procedures as the full on reconciler, but I’m not convinced as if you run it again, there will be items that will occur again for reconcile that have not been corrected from previous run, these items can only be fixed up by running the big brother, full reconciler. This indicates the two have differences somewhere.