Search text in stored procedure in SQL Server

Discussion of open issues, suggestions and bugs regarding database management and administration tools for MySQL
Post Reply
veerablog
Posts: 1
Joined: Mon 11 Apr 2022 10:47

Search text in stored procedure in SQL Server

Post by veerablog » Mon 11 Apr 2022 10:51

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?
Last edited by veerablog on Tue 19 Apr 2022 10:11, edited 1 time in total.

dzhanhira
Devart Team
Posts: 239
Joined: Mon 26 Oct 2020 13:49

Re: Search text in stored procedure in SQL Server

Post by dzhanhira » Wed 13 Apr 2022 11:08

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.

Post Reply