“The selected company is not configured as a company of the current Microsoft Dynamics GP system database” Error

Microsoft Dynamics GPWe been doing a lot of work with a client recently to split their US and UK based systems. The original scope involved implementing Microsoft Dynamics GP for a new company based in the UK; the databases were originally created on the US system and then split off by copying the company database and the system database onto a UK based SQL Server.

Along with the client, we did some tidying up of the system, such as removing US users and also ran the clear company script to remove all references to the databases which weren’t being brought across.

A few months later after the new company had gone live, we needed to migrate the other UK databases across to the UK server. We did this by creating new companies, entering the company settings (which are stored in the system database) and restoring the databases from the US server over the top of the blank ones.

When logging into Dynamics GP and selecting one of the companies being migrated over, the following error was produced:

Error message

Microsoft Dynamics GP

The selected company is not configured as a company of the current Microsoft Dynamics GP system database. You must resolve the database configuration to log into the company.

The issue lay with the System Database Name (SY00100) table which has two key columns; DBNAME which stores the name of the system database and is usually the cause of problems with this table when someone runs an old copy of the live to test copy script and the CMPANYID column which stores the id of the company; this is a sequential number unique to each company and assigned when it is created.

We had deleted the original references to the companies on the new server and created new ones, which meant a new CMPANYID had been assigned in the SY001500 table. Once SY00100 was updated, we were able to log in and use the company without further problem.