Skip to main content

Notifications

Microsoft Dynamics GP (Archived)

Sample Company Data restore error in GP 2013

Posted on by 485

In GP 2013, I have creaded a sample company with DB name TWO1 and then created another company, Sample Company 2 with DB name TWO2. In order to have some data in Sample Company 2, I have restored TWO1 over TWO2. Now I get following error in logon window:

" 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 in to the company"

I appreciate your help.

Thanks.

Mahbubur Bhuiyan

 

*This post is locked for comments

  • ikertz Profile Picture
    ikertz 5 on at
    RE: Sample Company Data restore error in GP 2013

    Thank you Bill this worked for me.

  • RE: Sample Company Data restore error in GP 2013

    Good thought: community.dynamics.com/.../154041.aspx

  • RE: Sample Company Data restore error in GP 2013

    I need to clarify:  If you're running Nolan IC, you'll need to clear the tables referenced above and then review any additional tables that throw an error.  In our case it was the NCIC5004 table which is the table that holds old IC bank transfers.  Since per Nolan support, the data in this table is also recorded in the GL and CM tables as well, we determined that we don't need that data and can safely clear it in the new test company.

  • Bill Campbell Profile Picture
    Bill Campbell 22,647 on at
    RE: Sample Company Data restore error in GP 2013

    Dawn thanks for that update - it would make a great post all on its own.

    Title: How to make TEST company with Nolan Intercompany

    Always it is the 3rd parties that make our day work better but sometimes make the support a bit more difficult.

    Again great information.

  • RE: Sample Company Data restore error in GP 2013

    We also had to clear the NCIC5004.  Have a great day!

  • RE: Sample Company Data restore error in GP 2013

    Bill thank you for the response - in this scenario, I was unable to run the MS script due to triggers Nolan has on their mapping tables.  In case anyone else has run into this issue:  we just need to add a step to clear those tables prior to running the MS script.  Here is the response to Nolan support:

    "We have triggers set  up on the NCIC0003, NCIC1500, and NCIC3005 tables in the company database that prevent the MS script from updating those tables, which store the ICP trigger accounts, the templates, and the alternate accounts respectively.  We do this to encourage people to clear out those tables when they're copying live data into a test system so that we're not accidentally posting test transactions back into a live database."

  • Bill Campbell Profile Picture
    Bill Campbell 22,647 on at
    RE: Sample Company Data restore error in GP 2013

    Should also ask, why this script is a problem for Nolan Intercompany?  

    What is it that it affects?

  • Suggested answer
    Bill Campbell Profile Picture
    Bill Campbell 22,647 on at
    RE: Sample Company Data restore error in GP 2013

    Dawn, we have found the key to this problem as noted above is the content of the SY00100 table.

    When the TEST database is created in Utilities it is assigned that Company ID in the Dynamics.SY01500 table.

    What we have done is simply edit the SY00100 table and make sure the Company ID's agree.

  • RE: Sample Company Data restore error in GP 2013

    Hi Frank!  That script can't be run for companies using Nolan intercompany - do you know of a script to handle that?

  • Suggested answer
    Frank Hamelly | MVP, MCP, CSA Profile Picture
    Frank Hamelly | MVP... 4,029 Super User 2024 Season 2 on at
    RE: Sample Company Data restore error in GP 2013

    Run this script after any restore in GP2013.  This will correct the issue.

    USE XXXX (database)

    if exists (select 1 from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME = 'SY00100') begin

     declare @Statement varchar(850)

     select @Statement = 'declare @cStatement varchar(255)

    declare G_cursor CURSOR for

    select case when UPPER(a.COLUMN_NAME) in (''COMPANYID'',''CMPANYID'')

     then ''update ''+a.TABLE_NAME+'' set ''+a.COLUMN_NAME+'' = ''+ cast(b.CMPANYID as char(3))

     else ''update ''+a.TABLE_NAME+'' set ''+a.COLUMN_NAME+'' = ''''''+ db_name()+'''''''' end

    from INFORMATION_SCHEMA.COLUMNS a, '+rtrim(DBNAME)+'.dbo.SY01500 b

     where UPPER(a.COLUMN_NAME) in (''COMPANYID'',''CMPANYID'',''INTERID'',''DB_NAME'',''DBNAME'')

       and b.INTERID = db_name() and COLUMN_DEFAULT is not null

    and rtrim(a.TABLE_NAME)+''-''+rtrim(a.COLUMN_NAME) <> ''SY00100-DBNAME''

     order by a.TABLE_NAME

    set nocount on

    OPEN G_cursor

    FETCH NEXT FROM G_cursor INTO @cStatement

    WHILE (@@FETCH_STATUS <> -1)

    begin

     exec (@cStatement)

     FETCH NEXT FROM G_cursor INTO @cStatement

    end

    close G_cursor

    DEALLOCATE G_cursor

    set nocount off'

     from SY00100

     exec (@Statement)

    end

    else begin

     declare @cStatement varchar(255)

     declare G_cursor CURSOR for

     select case when UPPER(a.COLUMN_NAME) in ('COMPANYID','CMPANYID')

       then 'update '+a.TABLE_NAME+' set '+a.COLUMN_NAME+' = '+ cast(b.CMPANYID as char(3))

       else 'update '+a.TABLE_NAME+' set '+a.COLUMN_NAME+' = '''+ db_name()+'''' end

     from INFORMATION_SCHEMA.COLUMNS a, DYNAMICS.dbo.SY01500 b

       where UPPER(a.COLUMN_NAME) in ('COMPANYID','CMPANYID','INTERID','DB_NAME','DBNAME')

         and b.INTERID = db_name() and COLUMN_DEFAULT is not null

       order by a.TABLE_NAME

     set nocount on

     OPEN G_cursor

     FETCH NEXT FROM G_cursor INTO @cStatement

     WHILE (@@FETCH_STATUS <> -1)

     begin

       exec (@cStatement)

       FETCH NEXT FROM G_cursor INTO @cStatement

     end

     close G_cursor

     DEALLOCATE G_cursor

     set nocount off

    end

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans