If I\'ve been told a table (or proc) name, but not which connected database the object is located in, is there any simple script to search for it? Maybe search somewhere in the
SELECT DISTINCT
o.name,
o.xtype
FROM
syscomments c
INNER JOIN
sysobjects o
ON
c.id=o.id
WHERE
c.TEXT LIKE '%TableName%'
order by
o.name desc,
o.xtype desc