Skip to main content

Notifications

Announcements

No record found.

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

  • 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/

  • 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?

  • 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

  • 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)

  • 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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

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

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,575 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,493 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans