Could not find stored procedure - but works on second attempt


A

Avi

Hi all,



I have a sp that fails to execute the first attempt after it is created.
After the first attempt all other attempts succeed. I'm using sql server
2005. I do not know if it is related or not, but the sp that fails the
first time is dropping and creating other stored procedurs.





The error message:



Msg 2812, Level 16, State 1, Procedure sp_NMS_SyncNMStoMP, Line 39

Could not find stored procedure 'MP.dbo.sp_aaa'


Thanks,
Avi
 
Ad

Advertisements

M

Mark Rae [MVP]

I have a sp that fails to execute the first attempt after it is created.
After the first attempt all other attempts succeed. I'm using sql server
2005. I do not know if it is related or not, but the sp that fails the
first time is dropping and creating other stored procedurs.

Firstly, you're in the wrong newsgroup...

That said, it sounds like the SQL Server instance is not refreshing its
object list in response to the creation of the new stored procedure. Try
refreshing it manually...
 
Ad

Advertisements

P

Patrice

As Mark said wrong group. What is done with MP.dbo.sp_aaa on this line ? For
example if you try to delete the proc when it has never been created at
least once you could get this error. Then if you run again it will succeed
as it has been created on the previous run...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top