摘要:找出有使用某一特定物件的stored procedure, view, trigger, constraint.....
例如要找出tb_1是不是有被其它procedure或view用到
:
Select schema_name(schema_id) SchemaName,OBJECT_NAME(a.id) Name, b.type_desc,text
From sys.syscomments a
inner join sys.objects b
on a.id = b.object_id
where text like '%tb_1%'
inner join sys.objects b
on a.id = b.object_id
where text like '%tb_1%'