Saturday, February 25, 2012

[Microsoft][ODBC SQL Server Driver][SQL Server]Could not find stored procedure

I am new to SQL Server and stored procedures and here is my problem.

I am stepping into a stored procedure ‘storedProced1’ using T-SQL debugger. ‘storedProced1’ is calling ‘storedProced2’. When I step into the following line where storedProced2’ is being executed,

exec storedProced2 @.Parameter1, @. Parameter2, @. Parameter3

I got the following message in the immediate window.

[Microsoft][ODBC SQL Server Driver][SQL Server]Could not find stored procedure 'storedProced2’.

@.RETURN_VALUE = N/A

But “storedProced2” does exists. What am I doing wrong?

Make sure that the procedure exists within the actual database and make sure that you are using the right owner declaration for this, this calling the procedure with the Routine_Schema and Routine_Name from the following query.

SELECT Routine_schema, ROutine_name
From INFORMATION_SCHEMA.Routines
WHere Routine_Name = 'storedProced2'

--> Calling EXEC <SchemaName>.<Objectname>

HTH, jens K. Suessmeyer.

http://www.sqlserver2005.de

No comments:

Post a Comment