Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find stored procedure
Message
General information
Forum:
Microsoft SQL Server
Category:
Database management
Miscellaneous
Thread ID:
01668087
Message ID:
01668095
Views:
60
This message has been marked as the solution to the initial question of the thread.
>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
EXEC sp_MSForEachDB N'IF EXISTS(SELECT * FROM ?.sys.procedures WHERE Name=''TheNameYouWant'')
                         SELECT ''?'' as DBName, * FROM ?.sys.procedures WHERE Name=''TheNameYouWant'   '
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform