Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

GP utility Upgrade screen is on hold

(0) ShareShare
ReportReport
Posted on by 1,185

 Hi

i have created new company through GP utility ,now wen i open GP utility its giving me error on Upgrade These Companies window as blank  its taking much longer time and not allowing me to go ahead also .how to make that run smoothly the GP utility .

*This post is locked for comments

  • Richard Wheeler Profile Picture
    Richard Wheeler 75,788 Moderator on at
    Re: Re: Re: Re: Re: Re: Re: GP utility Upgrade screen is on hold

    You may want to download the ClearCompany.SQL script. This will clear up any companies in the DYNAMICS database that physically do not exist in SQL. It is always best to use GP to delete a company. Tools->Utilities->System->Delete Company.

     

    /* ClearCompanys.sql - Script that will clear out all entrys in the DYNAMICS

    database referencing databases that no longer exist on the SQL Server.

    Requirements:

    Company database you wish to have cleaned out of the tables in the DYNAMICS

    database must be removed from the SQL server before running this script.

    Ensure that all your databases have been restored or they will be erased

    from the DYNAMICS database.

    */

    set nocount on

    /* Remove all references in the company master (SY01500) for databases that

    Do not exist on the SQL Server */

    delete DYNAMICS..SY01500 where INTERID not in

    (select name from master..sysdatabases)

    /* Clear out all tables in DYNAMICS database that have a CMPANYID field

    that no longer matches any Company ID's in the SY01500 */

    USE DYNAMICS

    declare @CMPANYID char(150)

    declare CMPANYID_Cleanup CURSOR for

    select 'delete ' + o.name + ' where CMPANYID not in (0,-32767)'

    + ' and CMPANYID not in (select CMPANYID from DYNAMICS..SY01500)'

    from sysobjects o, syscolumns c

    where o.id = c.id

    and o.type = 'U'

    and c.name = 'CMPANYID'

    and o.name <> 'SY01500' order by o.name

    OPEN CMPANYID_Cleanup

    FETCH NEXT from CMPANYID_Cleanup into @CMPANYID

    while (@@FETCH_STATUS <>-1)

    begin

    exec (@CMPANYID)

    FETCH NEXT from CMPANYID_Cleanup into @CMPANYID

    end

    DEALLOCATE CMPANYID_Cleanup

    go

    /* Clear out all tables in DYNAMICS database that have a companyID field

    that no longer matches any Company ID's in the SY01500 */

    USE DYNAMICS

    declare @companyID char(150)

    declare companyID_Cleanup CURSOR for

    select 'delete ' + o.name + ' where companyID not in (0,-32767)'

    + ' and companyID not in (select CMPANYID from DYNAMICS..SY01500)'

    from sysobjects o, syscolumns c

    where o.id = c.id

    and o.type = 'U'

    and c.name = 'companyID'

    and o.name <> 'SY01500'

    set nocount on

    OPEN companyID_Cleanup

    FETCH NEXT from companyID_Cleanup into @companyID

    while (@@FETCH_STATUS <>-1)

    begin

    exec (@companyID)

    FETCH NEXT from companyID_Cleanup into @companyID

    end

    DEALLOCATE companyID_Cleanup

    go

    /* Clear out all tables in DYNAMICS database that have a db_name field

    that no longer matches any company names (INTERID) in the SY01500 */

    USE DYNAMICS

    declare @db_name char(150)

    declare db_name_Cleanup CURSOR for

    select 'delete ' + o.name + ' where db_name <> ''DYNAMICS'' and db_name <> ''''

    and db_name not in (select INTERID from DYNAMICS..SY01500)'

    from sysobjects o, syscolumns c

    where o.id = c.id

    and o.type = 'U'

    and c.name = 'db_name'

    set nocount on

    OPEN db_name_Cleanup

    FETCH NEXT from db_name_Cleanup into @db_name

    while (@@FETCH_STATUS <>-1)

    begin

    exec (@db_name)

    FETCH NEXT from db_name_Cleanup into @db_name

    end

    DEALLOCATE db_name_Cleanup

    GO

    set nocount on

    /* Clear out all tables in DYNAMICS database that have a dbname field

    that no longer matches any company names (INTERID) in the SY01500 */

    USE DYNAMICS

    declare @dbname char(150)

    declare dbname_Cleanup CURSOR for

    select 'delete ' + o.name + ' where DBNAME <> ''DYNAMICS'' and DBNAME <> ''''

    and DBNAME not in (select INTERID from DYNAMICS..SY01500)'

    from sysobjects o, syscolumns c

    where o.id = c.id

    and o.type = 'U'

    and c.name = 'DBNAME'

    set nocount on

    OPEN dbname_Cleanup

    FETCH NEXT from dbname_Cleanup into @dbname

    while (@@FETCH_STATUS <>-1)

    begin

    exec (@dbname)

    FETCH NEXT from dbname_Cleanup into @dbname

    end

    DEALLOCATE dbname_Cleanup

    GO

    set nocount on

    /* Remove all stranded references from the other Business Alerts table that

    no longer exist in the SY40500 */

    delete SY40502 where BARULEID NOT IN (SELECT BARULEID FROM SY40500)

    delete SY40503 where BARULEID NOT IN (SELECT BARULEID FROM SY40500)

    delete SY40504 where BARULEID NOT IN (SELECT BARULEID FROM SY40500)

    delete SY40505 where BARULEID NOT IN (SELECT BARULEID FROM SY40500)

    delete SY40506 where BARULEID NOT IN (SELECT BARULEID FROM SY40500)

    GO

  • Re: Re: Re: Re: Re: Re: Re: GP utility Upgrade screen is on hold

    Thanks, Omar!

    I had been searching all over for this answer.  There's nothing on this in the Dynamics GP Knowledgebase.  This IS the answer to syed rafeeq's question.  Too bad he did not mark it as answered and did not even thank you.

  • Omar Kloub Profile Picture
    Omar Kloub 350 on at
    Re: Re: Re: Re: Re: Re: Re: GP utility Upgrade screen is on hold

     Hello Syed,

    Delete the records related to already deleted databases from db_update table.

  • syed rafeeq Profile Picture
    syed rafeeq 1,185 on at
    Re: Re: Re: Re: Re: Re: GP utility Upgrade screen is on hold

     i have deleted from MSSQL directly ,from there i dropped the database.how can i resolve this issues brother.

  • Omar Kloub Profile Picture
    Omar Kloub 350 on at
    Re: Re: Re: Re: Re: GP utility Upgrade screen is on hold

     Hello Syed,

    How did you delete the companies ?, what i am thinking about is that those companies were deleted but still there are some records for them in Dynamics database , which leading you to stuck in that screen.

  • Re: Re: Re: Re: Re: GP utility Upgrade screen is on hold

    Hi Syed,

    If you get to the utilities window that details certain companies that need to be upgraded, you can untick all of these companies and click next, you will then get to the window where you can create a new company.

  • syed rafeeq Profile Picture
    syed rafeeq 1,185 on at
    Re: Re: Re: Re: GP utility Upgrade screen is on hold

    Hi Omar

    yes i have deleted some unused company 

  • Omar Kloub Profile Picture
    Omar Kloub 350 on at
    Re: Re: Re: GP utility Upgrade screen is on hold

    Sorry Syed for the late reply

    Did you delete any created company before ?

     

     

  • syed rafeeq Profile Picture
    syed rafeeq 1,185 on at
    Re: Re: GP utility Upgrade screen is on hold

    wen we want to create a new company we will be using Utility for creation in that before going to the creation of new company screen one more screen will appear in that screen it is getting struck and not allowing me to go ahead .hangin for longer time
  • Re: GP utility Upgrade screen is on hold

    Hi Syed, just an observation. If all you did was create a new company, why are you being asked to upgrade?

    Best regards,

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,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans