Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"could not find stored procedure"

Tags:

I am maintaining a classic ASP website that has a SQL Server 2005 backend. For a small piece of new functionality I wrote a stored procedure to do an insert. This is the only user stored procedure in the database.

When I attempt to call the stored procedure from code I get the following error:

 Microsoft OLE DB Provider for SQL Server error '80040e14'  Could not find stored procedure 'InsertGroup'.  /newGroup.asp, line 84  

The DB uses SQL Server authentication. When I connect to the DB server in Visual Studio using the same user/pw as in the connection string the stored procedure is not visible but all tables are.

The user has datareader and datawriter roles and explicit execute permission on the stored procedure.

What am I missing?

UPDATE: My apologies, the server admin misinformed me that it was a 2000 server when it is actually a 2005 server (running on Windows Server 2003 x64).

like image 271
Chloraphil Avatar asked May 11 '09 12:05

Chloraphil


People also ask

How do I find a stored procedure?

You can find the stored procedure in the Object Explorer, under Programmability > Stored Procedures as shown in the following picture: Sometimes, you need to click the Refresh button to manually update the database objects in the Object Explorer.

How do I enable a stored procedure in SQL?

Use SQL Server Management StudioExpand Databases, expand the database in which the procedure belongs, and then expand Programmability. Expand Stored Procedures, right-click the procedure to grant permissions on, and then select Properties. From Stored Procedure Properties, select the Permissions page.

Could not find stored procedure error 2812?

Explanation. This error occurs when you attempt to execute a stored procedure that does not exist. If the procedure actually does exist, that is, it appears when sp_help is run with no parameters, error 2812 can occur if the procedure name was not fully qualified.


1 Answers

Walk of shame:

The connection string was pointing at the live database. The error message was completely accurate - the stored procedure was only present in the dev DB. Thanks to all who provided excellent answers, and my apologies for wasting your time.

like image 156
Chloraphil Avatar answered Oct 07 '22 23:10

Chloraphil