web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Error when running GP Utilities

(0) ShareShare
ReportReport
Posted on by

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

I have the same question (0)
  • Verified answer
    Tim Wappat Profile Picture
    5,711 on at

    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.

  • Suggested answer
    twelvestrikes Profile Picture
    3,657 on at

    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.

  • Community Member Profile Picture
    on at

    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.

  • Community Member Profile Picture
    on at

    Hi Jeffrey,

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

  • Verified answer
    Community Member Profile Picture
    on at

    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.

  • Tim Wappat Profile Picture
    5,711 on at

    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.

  • MG-16101311-0 Profile Picture
    26,225 on at

    And believe me when I say this bloke has good gut :-) Nice job 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans