Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Changing field names

Author  Topic 

JHA
Starting Member

3 Posts

Posted - 2008-01-27 : 16:20:34
This is a followup to my last post. If a field name is changed in the database, what is the easiest way to determine what stored procedures and triggers that reference that field are now broken?

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-01-27 : 16:51:44
Try search text column in sys.syscomments view.
Go to Top of Page

CShaw
Yak Posting Veteran

65 Posts

Posted - 2008-01-27 : 21:56:09
If you join it you get the object name as well. Try this,

Select o.name from syscomments c
Join sysobjects o
On c.id = o.id
Where text like '%yourcolumn%'

If you have a ton of stored procedures and such this may not be the fastest executing Query but it will get the results



Chris Shaw
www.SQLonCall.com
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-01-28 : 00:54:15
quote:
Originally posted by JHA

This is a followup to my last post. If a field name is changed in the database, what is the easiest way to determine what stored procedures and triggers that reference that field are now broken?


You should follow your old thread

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -