Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Could not find stored procedure 'sp_WHSOnHand'.

Posted on by 1,531

Going to Inventory, got following error:

SQL error description: [Microsoft][SQL Server Native Client 11.0][SQL Server]Could not find stored procedure 'sp_WHSOnHand'.

This is AX 2012 R3 with demo data. Going to SQL studio, under AX db, there is no such SP.

Any hint is greatly appreciated.

River.

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Could not find stored procedure 'sp_WHSOnHand'.

    Could you please send the screen shot of the error,

    this will help visualize the issue

  • Ganriver1 Profile Picture
    Ganriver1 1,531 on at
    RE: Could not find stored procedure 'sp_WHSOnHand'.

    Thanks Guys, We are having sync problem. That's probably why.

  • Suggested answer
    RE: Could not find stored procedure 'sp_WHSOnHand'.

    Before going with the above suggestion, I would simply try to synchronize the database.

    That should automatically trigger the creation of this stored procedure. Unless of course you have changed certain methods in the Application class?

  • Suggested answer
    Anton Venter Profile Picture
    Anton Venter 18,783 Super User 2024 Season 2 on at
    RE: Could not find stored procedure 'sp_WHSOnHand'.

    Hi River, simply recreate the sp_WHSOnHand stored procedure using SQL Server Management Studio. Find another AX database (same version as your AX database with the missing stored procedure) and open the Programmability > Stored Procedures node. Right click and select modify. This will generate a SQL script. In this SQL script, change ALTER PROCEDURE [dbo].[sp_WHSOnHand] to CREATE PROCEDURE [dbo].[sp_WHSOnHand]. Now copy the entire SQL script and execute it on the AX database without this stored procedure. Make sure that the permissions on this store procedure are the same as the others. That's all.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans