web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Migrate One Company to Another Dynamics Instance - Is a script required to change the system database name referenced?

(0) ShareShare
ReportReport
Posted on by

Scenario:

SQL Instance A has one company and one dynamics database

SQL Instance B has Six companies and One Dynamics Database

Desired Outcome:

All Companies on One Instance with One Dynamics Database so as to obtain consolidated financials.

Hence, I want to migrate the One Company from Instance A to Instance B and allow it to use the Dynamics Database on Instance B.

Question:

When I create the New Company Database on Instance B and copy and restore the database to the Instance B. Do I need to execute any scripts to get the new company to refer to the correct Dynamics database?

*This post is locked for comments

I have the same question (0)
  • Derek Albaugh Profile Picture
    on at
    RE: Migrate One Company to Another Dynamics Instance - Is a script required to change the system database name referenced?

    I would look at the following blog:

    https://blogs.msdn.microsoft.com/developingfordynamicsgp/2012/09/25/using-the-named-system-database-feature-for-microsoft-dynamics-gp-2013/

  • Rennecia Barran Profile Picture
    on at
    RE: Migrate One Company to Another Dynamics Instance - Is a script required to change the system database name referenced?

    Thanks Derek.

    All these are noted. We are reaching out to your company to obtain the quotation for the Reformatter tool.

    My final question now on the migration is - Do i need a script to change the references in the migrated database to say it is now using Dynamics A instead of Dynamics B?

  • Derek Albaugh Profile Picture
    on at
    RE: Migrate One Company to Another Dynamics Instance - Is a script required to change the system database name referenced?

    First, do SQL A and B have the exact same SQL collation/sort order? I.e. run sp_helpdb and compare all the databases. If they don't match identically, you cannot upgrade databases from one environment to another.

    Second, look at the SY003001 and SY00302 tables from both Dynamics GP environments, from within the system database. If these tables are not identical, then you cannot yet combine the two GP environments until that issue is resolved.

    Third, look at the functional currency of the company database(s) you want to migrate over to the other Dynamics GP environment......if that environment doesn't have the functional currency setup the exact same, that is another issue that needs to be addressed.

    Next, the SY00300 table in each company database will show the actual segments used by each company database. Make sure they fall within the account framework maximums as mentioned in the SY003001/SY00302 tables.

    Lastly, the GP environments need to be at the exact same version/build and have the exact same modules installed.

    If any of these is not correct, you cannot consolidate the GP company databases from one environment to another.

    Thanks

  • Rennecia Barran Profile Picture
    on at
    RE: Migrate One Company to Another Dynamics Instance - Is a script required to change the system database name referenced?

    So, there wouldn't be any other references anywhere else to the prior Dynamics database name (which is not 'dynamics' but another name)

  • Community Member Profile Picture
    on at
    RE: Migrate One Company to Another Dynamics Instance - Is a script required to change the system database name referenced?

    One thing you'll likely have to do is update the DYNAMICS..SY00100 table to match the company ID from the DYNAMICS..SY01500 table.

    If instance A has only one company, it will likely be number 1, but when you migrate it to instance B, it will probably be at least 7, so you'll want to make sure that the values are the same.

    The way I do this, is to run the following scripts:

    Select * from DYNAMICS..SY01500

      --This should give you the value in the CMPANYID column

    Select * from (DBNAME)..SY00100

      --This will show what it's currently set to (unlikely to match from different DYNAMICS db)

    Update (DBNAME)..SY00100 SET CMPANYID=*Value from SY01500*

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Community Member Profile Picture

Community Member 2

#1
babubaskaran@outlook.com Profile Picture

babubaskaran@outloo... 2

#1
Yng Lih Profile Picture

Yng Lih 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans