Could not find stored procedure - but works on second attempt

  • Thread starter Thread starter Avi
  • Start date Start date
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
 
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...
 
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...
 
Back
Top