Monday, April 11, 2011

Find Text within all stored procedures

 

select * from INFORMATION_SCHEMA.ROUTINES
Where ROUTINE_DEFINITION like '%searchstring%'

The following statement will search all stored proc in database containing the name ‘aspnet_Membership

select * from INFORMATION_SCHEMA.ROUTINES
Where ROUTINE_DEFINITION like '%aspnet_Membership_%'

image

following statement will search a text inside the stored procedure

select * from INFORMATION_SCHEMA.ROUTINES
Where ROUTINE_DEFINITION like '%INNER JOIN aspnet_UsersInRoles UR%'

 

image

No comments: