select a.text,b.name,b.xtype from dbo.syscomments a,dbo.sysobjects b
where a.id=b.id and PATINDEX('%tb_blackname%', a.text)>0 order by xtype