0

Possible Duplicate:
Find a specific column entry in an unknown table in a database?
how to search Sql Server 2008 R2 stored procedures for a string?

Hello I'm trying to figure out a fairly complex SQL Server(2008 in 2000 compatibility) database. There are 3 columns in a table I'm particularly concerned with. I've searched the code of our application and it seems to make no direct usage of these 3 columns but I know somewhere in the database they are populated and used. So it must be in triggers, functions, and/or stored procedures.

What is the best way of figuring out where to look for the code that populates these 3 columns?

Community
  • 1
  • 1
Earlz
  • 62,085
  • 98
  • 303
  • 499
  • 2
    possible duplicate of [how to search Sql Server 2008 R2 stored procedures for a string?](http://stackoverflow.com/questions/6354256/how-to-search-sql-server-2008-r2-stored-procedures-for-a-string) and http://stackoverflow.com/questions/3991030/searching-in-sql-management-studio-2005/3991077#3991077 and http://stackoverflow.com/questions/3361141/sql-server-2005-find-which-stored-procs-run-to-a-particular-table – gbn Sep 02 '11 at 17:04
  • Keep in mind it could also be populated by an SSIS package or SQL Agent job. – John Saunders Sep 02 '11 at 21:11

1 Answers1

1

If you need to find database objects (e.g. tables, columns, triggers) by name - have a look at the FREE Red-Gate tool called SQL Search which does this - it searches your entire database for any kind of string(s).

enter image description here

enter image description here

It's a great must-have tool for any DBA or database developer - did I already mention it's absolutely FREE to use for any kind of use??

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459