Our database is about to reach 1000 stored procedures. Although we were wise and created a good scheme for naming the stored procedures, hunting for the stored procedure you need can be a bit frustrating as you scroll and scroll and scroll. If I know the exact name of the stored procedure I'm looking for, it would be great to identify it quickly and modify
For example, if I want to find p_Blah_Blah in the treeview and open it to modify it, is there a command to launch p_Blah_Blah in a new window for editing? Or perhaps a plugin that limits the view of stored procedures to what you are searching for? Anyone who wants to write a plugin? :)
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.
Using SQL Server Management StudioExpand Databases, expand the database in which the procedure belongs, and then expand Programmability. Expand Stored Procedures, right-click the procedure and then select Script Stored Procedure as, and then select one of the following: Create To, Alter To, or Drop and Create To.
You can filter the tree, right click on "Stored Procedures" choose "Filter" and "Filter Settings".
As a general rule here we use naming conventions to do with context, for example all user sprocs are named: usp_user_*
Check out the redgate tools here, they have a free search tool that makes this kind of stuff a breeze:
http://www.red-gate.com/products/sql-development/sql-search/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With