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.
*This post is locked for comments
And believe me when I say this bloke has good gut :-) Nice job Tim!
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.
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.
Hi Jeffrey,
I checked the DB owner for all GP databases and they all have DYNSA as the DB owner. Thanks for the suggestion
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.
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.
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.
André Arnaud de Cal...
291,965
Super User 2025 Season 1
Martin Dráb
230,836
Most Valuable Professional
nmaenpaa
101,156