Skip to main content

Notifications

Microsoft Dynamics GP (Archived)

Error when running GP Utilities

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

I am upgrading GP2013 SP2 to GP2013 R2 and when I am running GP Utilities I get the error message:

The stored procedure GrantAllToTableZDPs() of duSQL Pass Through SQL returned the following results: DBMD: 15151, Microsoft Dynamics GP: 0

Error 15151 is relating to permissions, but as I am logged in as sa, I don't think it is lack of permissions that is the issue. I ran a SQL Trace and found the error is caused when a cursor is cycling through this script:

DECLARE @sqlstring CHAR(255) DECLARE p_cursor CURSOR for    select     'grant execute on [' + o.name + '] to [DYNGRP]' from    sysdepends d, sysobjects o where    d.depid = object_id('AF40201') and d.id = o.id and o.type = 'P' set NOCOUNT on open p_cursor FETCH NEXT FROM p_cursor INTO @sqlstring while(@@fetch_status <> -1) begin if (@@fetch_status <> -2) begin exec (@sqlstring) end FETCH NEXT FROM p_cursor INTO @sqlstring end DEALLOCATE p_cursor

The odd thing is that not all of the 20 databases that are being upgraded receives this error message and when you click OK in the pop window the process continues and completes without any further errors. And when I go back in GP Utilities the companies have been upgraded and have that cheerful green tick next to them. Odd thing number two is that object GrantAllToTableZDPs is nowhere to be found in the either the DYNAMICS database or the company database after the upgrade.

I would appreciate any ideas or suggestions of what it might cause the error.

2017_2D00_12_2D00_20-15_5F00_38_5F00_32_2D00_sdc_2D00_finvrdp03.allocatesoftware.com-_2D00_-Remote-Desktop-Connection.png

*This post is locked for comments

  • Mariano Gomez Profile Picture
    Mariano Gomez 26,225 on at
    RE: Error when running GP Utilities

    And believe me when I say this bloke has good gut :-) Nice job Tim!

  • Tim Wappat Profile Picture
    Tim Wappat 5,701 on at
    RE: Error when running GP Utilities

    When I read it your post my gut was telling me it would be a schema related issue...

    Glad I could help - in time for Christmas too.

    Tim.

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Error when running GP Utilities

    You were right Tim, there was an object in a different schema causing the upgrade script to fail. I completely missed a proc the client created and that is dependent on GL00105. So the solution is to go in to each company and comment out the reference to GL00105 and the db upgrade worked without any errors.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Error when running GP Utilities

    Hi Jeffrey,

    I checked the DB owner for all GP databases and they all have DYNSA as the DB owner. Thanks for the suggestion

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Error when running GP Utilities

    Thanks for the suggestion Tim. I checked a few of the company databases, for those with the error message and with no error message, and the only schema used is dbo.

  • Suggested answer
    twelvestrikes Profile Picture
    twelvestrikes 3,657 on at
    RE: Error when running GP Utilities

    Hi Patrik

    Check the Dynamics GP related databases in SQL Management Studio to ensure that the database owner is DYNSA.

    If the DB owner is anything other than DYNSA then you need to change the database owner.  Then restart your upgrade again.

  • Verified answer
    Tim Wappat Profile Picture
    Tim Wappat 5,701 on at
    RE: Error when running GP Utilities

    Probably not the issue as a long shot, but wonder if there are objects in a schema other than dbo in those databases with the problem?

    Tim.

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

Announcing Our 2025 Season 1 Super Users!

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

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,965 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,836 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans