views:

463

answers:

4

This is pretty weird.

I have my Profiler open and it obviously shows that a stored procedure is called. I open the database and the SP list, but the SP doesn't exist. However, there's another SP whose name is the same except it has a prefix 'x'

Is SQL Server 2005 mapping the SP name to a different one for security purposes?

EDIT: I found out it's a Synonym, whatever that is.

+1  A: 

Possibly silly questions, but just in case... have you refreshed the SP list? Have you checked for a stored procedure of that name under a different owner? If you created the stored procedure without specifying the owner then it could be in the list under your ownership (or not at all if the list is filtered to only "dbo" for example).

Tom H.
"Different owner" has bit me more than once - in that case, you'll find it at the top of bottom of the list
rwmnau
+1  A: 

You may not have permission to see all the objects in the database

+1  A: 

Adding to the previous answers, it could also be under "System Stored Procedures", and if the name of the stored procedure begins with "sp_", it could also be in the master database.

kcrumley
+2  A: 

In general, when you know an object exists because it's been used in a query, and you can't find it in the object tree in Management Studio, you can do this to find it.

select *
from sys.objects
where name = 'THE_NAME_YOU_WANT'

I just checked, and it works with Synonyms.

kcrumley