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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Error Logging Into GP as SA Could Not Find Stored Procedure

(0) ShareShare
ReportReport
Posted on by 10

I recently started receiving error messages when logging into Great Plains as the SA. Here's the exact message Could not find stored procedure 'KCPP.dbo.smGetDbo'  I set that stored procedure in the Dynamics database.

I'm not sure what would've changed to cause this error. Other users are fine.

Has anyone else seen this, know how to fix, or where I can check?

Thanks

John

I have the same question (0)
  • Jagille Profile Picture
    on at

    I've seen this type of issue in the past and it usually occurs when the stored procedure gets corrupted. Unsure how it gets corrupted, but I've used Database Maintenance in the past to re-create it. Since you're using GP2016, DBMaintenance should work for you. Here are the steps:

    1. Have all users log out of Dynamics GP (in all companies)

    2. Make sure you have valid, recent backups of all Dynamics GP databases.

    3. Click on Start > All Programs > Microsoft Dynamics > GP 2016 > Database Maintenance

    4. Enter the ‘sa’ user credentials and select the SQL instance holding the GP databases on the first window. Click Next.

    5. Select the DYNAMICS and Company database, click Next.

    6. Select the 'Functions and Stored Procedures' option and click Next.

    7. Verify that the Utility goes through successfully and if it does, it should've re-created all stored procedures for the database(s). Click Exit to close the utility.

    a. NOTE: Database Maintenance requires exclusive access to both databases. Ensure that you do not have SQL Server Management Studio open with a query against either the DYNAMICS or company database.

    Run the Grant.sql script against the DYNAMICS and all company databases. You can find the Grant script in the GP code folder. GP2016 > SQL > Util

  • Romryan Profile Picture
    on at

    what about if you ran the query below to grant any login to all database objects

    -- SQL SCRIPT TO GRANT ALL USERS UNDER DYNGRP GROUP

    -- ACCESS PRIVILEDGES TO ALL TABLES AND STORED PROCEDURES

    -- RUN THIS SCRIPT UNDER A SELECTED COMPANY DB IN DYNAMICS.

    /*Count : 1 */

    declare @cStatement varchar(255)

    declare G_cursor CURSOR for select 'grant select,update,insert,delete on [' + convert(varchar(64),name) + '] to DYNGRP' from sysobjects

    where (type = 'U' or type = 'V') and uid = 1

    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

    DEALLOCATE G_cursor

    declare G_cursor CURSOR for select 'grant execute on [' + convert(varchar(64),name) + '] to DYNGRP' from sysobjects

    where type = 'P'  

    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

    DEALLOCATE G_cursor

  • jbass62 Profile Picture
    10 on at

    Thanks we tried that as part of running GP database maintenance and still same issue.

  • Suggested answer
    Beat Bucher  GP Geek  GPUG All Star Profile Picture
    28,058 Moderator on at

    Hi John,

    See if that forum post helps: www.gpug.com/.../viewthread

    Is this an original company in GP (i.e. not a copy from another DB) ? Are other users login in from other workstations in this company having the same issue or not? Can 'sa' login into that company from another GP client without any errors ?

    Just trying to proceed by elimination...

  • jbass62 Profile Picture
    10 on at

    This is an original company and not a copy and just recently started happening.  So far, the errors are limited to the SA and DYNSA. I've tried logging in from the SQL server and the citrix servers and have the same issue.  Thank you for helping.

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 592 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 478 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 305 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans