Does the stored procedure not exist or is not running?

I have a problem:

I have a db connection where I run stored procedures. The same connection is used to create the previously stored procedures.

When I try to call this stored procedure, later I get the following message:

Could not find stored procedure 'Dbo.yaf_prov_upgrade'.

The problem is that it really exists in the database. As well as the fact that it appears in the SQL Server profile.

RPC: completed exec [DBO]. [Yaf_prov_upgrade] @PreviousVersion = 46, @NewVersion = 46.Net SqlClient data Provider Nico Matrix \ Nico

I was wondering what could be the reasons why a particular query could throw such an exception, even if it exists, it throws, and the call reaches the database.

This may not be a connection problem, as it has already performed other stored procedures. This may not be a problem with the procedure, because it exists, in fact the same application, on the same web page, created it and placed it there.

Update: I forgot to mention that I use integrated protection, and I launched SP in the database with the same user with whom the application is connected, and I had no problems launching it.

So what could it be?

+5
source share
3 answers

Your completed RPC means that the batch sent to SQL Server was correct and completed. This does not mean that the stored procedure was executing and was executing normally.

This will (do not argue, check) one of:

  • wrong permissions

SELECT
   @@SERVERNAME, 
   SUSER_SNAME(), 
   DB_NAME(), 
   USER_NAME(), 
   OBJECT_ID('dbo.yaf_prov_upgrade')

OBJECT_ID NULL, .

+13

, , , , , .

+1

ms-sql, , SP . , SP ? , ?

0

All Articles