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?

4
  • 1
    You can use SQL Server Data Tools for this. Commented Jun 20, 2012 at 9:03
  • Thanks, SQL Prompt worked for me. Commented Jun 20, 2012 at 9:05
  • 1
    Until the evaluation runs out! Commented Jun 20, 2012 at 9:05
  • +1 for great advice. Let me try it. Commented Jun 20, 2012 at 9:18

1 Answer 1

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).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.