Find Stored Procedure by Name

There are several ways to find a stored procedure in the server by name: we can query sys.procedures, syscomments, or information_scema.routines. Respective examples would be:

select * from sys.procedures
     name like '%name_of_proc%'


select text from syscomments c
     inner join sys.procedures p on p.object_id = c.object_id
where like '%name_of_proc%'


select * from information_schema.routines
    routine_name like '%name_of_proc%'

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.