[MS-SQL] 프로시저 검색

|
SELECT OBJECT_NAME(object_id), OBJECT_DEFINITION(object_id)
FROM sys.procedures
WHERE OBJECT_DEFINITION(object_id) LIKE '%Insert Into DummyTable%' -- 검색 키워드 입력

-- 사용자 정의함수까지 조회가능
SELECT ROUTINE_NAME, ROUTINE_DEFINITION
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_TYPE IN ('PROCEDURE','FUNCTION')
AND ROUTINE_DEFINITION LIKE '%검색 키워드%'
And