>>>Hi,
>>>
>>>In my SQL Server 2008 I have tons of databases (for all customers). Some time ago I created a custom stored procedure for one of the customers. I know the stored procedure name. But I can't find it. Is there a command I can execute in my SSMS that will find the SQL database that has this SP?
>>>
>>>TIA
>>
>>Dmitry,
>>
>>The sys.procedures table has that information for you. You can query it by its
name column using a regular SELECT statement (assuming you were granted enough privileges).
>
>Antonio,
>First, thank you. But the following SQL Select only returns 2 records:
>
>select * from sys.procedures
>
>
>And I know I have many SPs in many DBs.
Hmmm, you're right, Dmitry, the table is scoped to a single database.
Hopefully others may offer you a better option, but while we wait for it these two links found in a quick google search may be helpful
*
https://dba.stackexchange.com/questions/130399/script-to-find-the-list-of-stored-procedures-in-all-databases*
https://www.red-gate.com/products/sql-development/sql-search/
----------------------------------
António Tavares Lopes