Comments
Sort by recent activity
I've written a SQL Query that helps you identify the items in sysobjects and syscomments that are out of sync as a result of renaming an object.
Run the query below to identify the items, then generate create scripts for each of the relevant items, delete them and then recreate them with script. This should bring them back into line again.
There may be more automated ways of doing this, but it works.
USE dbname
GO
SELECT so.id, so.name, so.type, sc.text, PATINDEX ( '%' + so.name + '%' , sc.text )
FROM
sysobjects as so
join syscomments as sc on so.id = sc.id
WHERE PATINDEX ( '%' + so.name + '%' , sc.text ) < 1
AND sc.colid = 1
and so.type <> 'D'
ORDER BY so.name / comments
I've written a SQL Query that helps you identify the items in sysobjects and syscomments that are out of sync as a result of renaming an object.
Run the query below to identify the items, then gene...