Contents
How do you identify all Stored Procedures referring a particular function?
How to identify all stored procedures referring a particular…
- SELECT Name.
- FROM sys.procedures.
- WHERE OBJECT_DEFINITION(OBJECT_ID) LIKE ‘%TableNameOrWhatever%’
How do you find where a stored procedure is used in other Stored Procedures?
Expand Databases, expand the database in which the procedure belongs, and then expand Programmability. Expand Stored Procedures, right-click the procedure and then click View Dependencies. View the list of objects that depend on the procedure. View the list of objects on which the procedure depends.
How do I find specific text in all Stored Procedures in SQL Server?
Search text in stored procedure in SQL Server
- SELECT DISTINCT.
- o.name AS Object_Name,
- o.type_desc.
- FROM sys.sql_modules m.
- INNER JOIN.
- sys.objects o.
- ON m.object_id = o.object_id.
- WHERE m. definition Like ‘%[ABD]%’;
How do I find stored procedures in database?
Below are the steps for using filter settings to find stored procedure.
- In the Object Explorer in SQL Server Management Studio, go to the database and expand it.
- Expand the Programmability folder.
- Right Click the Stored Procedures folder.
- From the right-click menu, select Filter in the right-click menu.
How to find procedures in a specific table?
If you want to get stored procedures using specific column of table, you can use below query : You can use ApexSQL Search, it’s a free SSMS and Visual Studio add-in and it can list all objects that reference a specific table column. It can also find data stored in tables and views.
How to get stored procedures using specific column only?
If you want to get stored procedures using specific column only, you can use try this query: If you want to get stored procedures using specific column of table, you can use below query : You can use ApexSQL Search, it’s a free SSMS and Visual Studio add-in and it can list all objects that reference a specific table column.
When to use objectproperty in sys.procedures?
Of course in all cases if you only want a specific type of object (stored procedures for example) in your result set then you have to either write a function (see my previous post here for an example), use OBJECTPROPERTY (IsProcedure, IsView etc) (2000+), OBJECTPROPERTYEX (BaseType) (2005+), or join with sys.objects, sys.procedures, sys.views etc.
How to find all objects that reference a specific table?
You can use ApexSQL Search, it’s a free SSMS and Visual Studio add-in and it can list all objects that reference a specific table column. It can also find data stored in tables and views. You can easily filter the results to show a specific database object type that references the column