1

I have to work on a database in which there are many stored-procedures & views that are referencing non-existing tables & columns. How can I get the list of invalid objects (Tables, Columns) so I can fix it accordingly?

Paul Stephenson
  • 67,682
  • 9
  • 49
  • 51
Yaqub Ahmad
  • 27,569
  • 23
  • 102
  • 149

1 Answers1

3

You could use SQL Prompt from Red Gate. It has a Find Invalid Objects feature that identifies stored procedures and views (amongst others) that refer to non-existent objects and tells you why.

SQL Prompt is a commercial product -- you could use its 14-day fully-functional free trial period to tidy up your database right away though.

Disclaimer: I work for Red Gate (on the SQL Prompt team).

Paul Stephenson
  • 67,682
  • 9
  • 49
  • 51