SQL

MS-SQL 프로시저 함수 내용검색

administrators 2016. 9. 28. 17:55

MS-SQL 프로시저 함수 내용검색



SELECT ROUTINE_NAME 
        FROM INFORMATION_SCHEMA.ROUTINES
    WHERE ROUTINE_DEFINITION LIKE '%Search_Text%'
        AND ROUTINE_TYPE='PROCEDURE'
        order by ROUTINE_NAME
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_TYPE = 'PROCEDURE'
OR ROUTINE_TYPE = 'FUNCTION'
ORDER BY ROUTINE_NAME
select a.name, b.text 
from sys.sysobjects a inner join sys.syscomments b on a.id = b.id
where a.xtype = 'P'
and a.category = 0
and b.text like '%검색할내용%'
Select A.*
From sys.sysobjects A 
        Inner Join sys.syscomments B 
        ON A.id = B.id
Where A.xtype = 'P'
        And A.category = 0
        And B.text Like '%검색어%'
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_TYPE = 'PROCEDURE'
OR ROUTINE_TYPE = 'FUNCTION'
ORDER BY ROUTINE_NAME