xxxxxxxxxx
SELECT DISTINCT
o1.name AS Object_Name1,
o1.type_desc as type_desc1,
o2.name AS Object_Name2,
o2.type_desc as type_desc2
FROM DB1.sys.sql_modules m1
INNER JOIN DB1.sys.objects o1
ON m1.object_id = o1.object_id
FULL OUTER JOIN DB2.sys.sql_modules m2
INNER JOIN DB2.sys.objects o2
ON m2.object_id = o2.object_id
ON o1.name = o2.name
WHERE isnull(m2.definition,'') <> isnull(m1.definition,'')