I always need this code to find my store proc for thing like
- Table related back to a particular store proc
- I need to find certain SCR (software chage request) in all the store proc
So how do I do it? The fast and dirty way would be
---
Use MyDatabase;
SELECT Name
FROM sys.procedures
WHERE OBJECT_DEFINITION(OBJECT_ID) LIKE '%Kenny%'
GO
----
Base on the example above, I'm trying to search the word "Kenny" in all my store proc and return the store proc name. Please do take note that you will not be able to find exactly as what you want in a glance. You will find problem like comment or table or variable which have the same name.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment