Page 1 of 1

Search text in stored procedure in SQL Server

Posted: Mon 11 Apr 2022 10:51
by veerablog
I want to search a text from all my database stored procedures. I use the below SQL

Code: Select all

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]%';

I want to search for [ABD] in all stored procedures including square brackets, but it's not giving the proper result. How can I change my query to achieve this?

Re: Search text in stored procedure in SQL Server

Posted: Wed 13 Apr 2022 11:08
by dzhanhira
Hi there,

Firstly, we would to recommend having a look at the following page: https://docs.devart.com/studio-for-mysq ... jects.html

If there will be still questions, please, feel free to contact us.