new stored procedure in SQL 2008

  • I have created a very basic insert stored procedure in SQL 2008.

    When I try to execute it, it keep saying "Could not find stored procedure".

    I can see stored procedure in "Object Explore" but unable to exec it.

    Any idea what i'm missing?

    thank you,

    K

  • Do database and schema name match?

    Try selecting the procedure from object explorer and from context menu choose "Script procedure as" --> "Execute to" -->"New Query editor window"

    -- Gianluca Sartori

  • try:

    USE yourdatabasename

    exec stp_yourspname

    sounds like you are not focused on the correct DB where the proc was created.

    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle

  • I'm with Gianluca, again. If you created the proc without a schema owner, it may have been created under your login. If you then try to execute it without including the schema you can get an error. But then, be sure you're on the right database, on the right server...

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • it was schema issue.

    thx guys for your time.

  • khalid.hussain (5/5/2010)


    it was schema issue.

    thx guys for your time.

    Thanks for posting back with what solved the issue. It's helpful for us and for anyone else that finds this in the future with the same issue. Glad it all worked out.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply