Database/MS SQL

저장프로시져 안에 특정 문자 찾기

catchv 2013. 1. 15. 13:37
반응형

프로시져에서 특정 문자 찾기

SELECT Name
FROM sys.procedures
WHERE OBJECT_DEFINITION(object_id) LIKE '%t_code%'
 
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'

 

반응형