Object(SP, UDF 등) 검색

Posted by Alvin You
2014.03.22 22:20 SQL Server
크리에이티브 커먼즈 라이선스
Creative Commons License

SELECT *
FROM sys.procedures
WHERE OBJECT_DEFINITION(object_id) LIKE '%foobar%'

SELECT OBJECT_NAME(object_id)
FROM sys.sql_modules
WHERE Definition LIKE '%foobar%'
AND OBJECTPROPERTY(object_id, 'IsProcedure') = 1

SELECT ROUTINE_NAME
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_DEFINITION LIKE '%foobar%'
AND ROUTINE_TYPE = 'PROCEDURE'

저작자 표시
신고
이 댓글을 비밀 댓글로

티스토리 툴바