SQL SERVER 根據(jù)代碼內(nèi)容查找存儲過程或者觸發(fā)器等
select o.*,'|',m.*
from sys.objects o join sys.sql_modules m on o.object_id = m.object_id
where m.definition like '%代碼段%'
--也可以使用SQL SERVER 2000中的視圖syscomments
select c.*
from sys.objects o join syscomments c on o.object_id = c.id
where o.type = 'p' and c.text like '%代碼段%'

浙公網(wǎng)安備 33010602011771號