Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 "Could not find stored procedure"-Mgmt Studio

Author  Topic 

edyl
Starting Member

35 Posts

Posted - 2011-08-22 : 16:56:35
Hello everyone,

I am using Microsoft SQL Server Management Studio for 2008R2 (vsn: 10.50.2425.0). I created a new procedure using (Create Procedure...). However whenever I type in this new procedure to be executed inside another stored procedure using "exec" statement or in the command window, a red curly line appears under the procedure name and when I hover the mouse pointer on it a message on the tool tip says "Could not find stored procedure 'dbo.....'". Though it executes okay and runs well. I can also see it in the tree structure on the Object Explorer? Is it indicative of some thing wrong or is it the "intellisense" over reacting?

Any suggestions and recommendations greatly appreciated.

Thanks in Advance.

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2011-08-22 : 17:24:54
check the schema of the stored procedure. Perhaps it is not "dbo". One way to see it is with Object Explorer.

Be One with the Optimizer
TG
Go to Top of Page

edyl
Starting Member

35 Posts

Posted - 2011-08-22 : 17:38:08
Yes it is dbo.MyStoredProc. When I created the stored procedure i did some thing like,


USE MyDatabase
GO

CREATE PROCEDURE dbo.MyStoredProc
AS

SET NOCOUNT ON
DECLARE ...
... ... ...

Any Suggestions?
Go to Top of Page

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2011-08-22 : 17:43:45
When you run the stored procedure what security context is it running under? Perhaps that account does not have permission to exec this SP.

Be One with the Optimizer
TG
Go to Top of Page

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2011-08-22 : 17:46:06
Sorry - I re-read your post...Are saying that everything runs ok it is just in dev environment, when looking at the code, it appears that the SP is not valid based on intellisense? What is the dev environment you are using?

Be One with the Optimizer
TG
Go to Top of Page

edyl
Starting Member

35 Posts

Posted - 2011-08-22 : 17:50:09
I think I understand what you are saying but at the same time, I must say I created this Stored Proc not with sa account but some other account, however I can run this stored procedure though. It can be successfully executed from the command window using the same account it created. However now I am worried that if I update an already existing master proc (that runs may other procs in the system) with the execution of this new proc, would it bring that master proc to the an screeching halt?
Go to Top of Page

edyl
Starting Member

35 Posts

Posted - 2011-08-22 : 17:51:47
Oops.. i think we both posted on the same time...

I am developing in SQL Server 2008R2 and the version of the Mgmt Studio is 10.50.2425.0
Go to Top of Page

gwilson67
Starting Member

42 Posts

Posted - 2011-08-23 : 21:21:03
I've gotten that problem a few times. The solution? Just ignore it. The stored procedure will still work. There's just a disconnect with the intelli-sense.


Greg
http://www.freewebstore.org/tsqlcoderepository
Powerful tool for SQL Server development
Go to Top of Page
   

- Advertisement -