Skip to main content

Notifications

Announcements

No record found.

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)

  • Community Member Profile Picture
    Community Member Microsoft Employee 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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,711 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans