Find Specific Text on Stored Procedure




Do you remember we had so many requirements to check a text on stored procedures or a view?

Think that we are going to change a field name of a table or a data type of a field. Or we are going to replace or delete a data table in your database. Database might be so big and there may be hundreds of stored procedures.
We can't open every single stored procedures or a view and check whether they are using the data table we going to delete.

For that,
We can simply find the stored procedures which are using this particular data table or a field. That may help us to reduce the work load more than 80%.

You can use this following query for it.

SELECT     *
FROM       INFORMATION_SCHEMA.ROUTINES
WHERE      ROUTINE_DEFINITION LIKE '%TableName%'

Comments

Popular posts from this blog

Apply CSS styles to SharePoint Web parts

SharePoint Number Column Without Commas

Suppress field in Crystal Reports