Maximize the power of SQL Prompt with SQL Toolbelt Essentials. Watch now.

Find Invalid Objects

crimdoncrimdon Posts: 54 Bronze 3
edited February 3, 2017 5:55AM in SQL Prompt
I have an old legacy database in which I know there are quite a few invalid objects.

Some of the views generate "The multi-part identifier "xxx" could not be bound"

I'm trying to use find invalid objects to find errors such as these but it appears to ignore them. Does anyone know another way apart from scripting all of the database objects out and running them?

Comments

  • Anu DAnu D Posts: 876 Silver 3
    Hi Andrew,

    Thanks for the post!

    I will email you can you reply me with the script that you think should have been flagged as invalid?

    Looking forward to hear from you!
    Anuradha Deshpande
    Product Support
    Redgate Software Ltd.
    E-mail: [email protected]
  • Tawfik_Khalifeh_cmeTawfik_Khalifeh_cme Posts: 4 Bronze 1
    edited November 23, 2017 10:50AM
    Thought it would be better not to open a similar support ticket.
    I use this feature quit often and it seemed reliable, up until it failed me once after deploying sql changes to production, there was an INSERT statement using an outdated column name that "find invalid objects" did not detect.
    I can send you the problematic stored procedure if that helps, a pseudocode summary below

    - insert data from user defined table type into a temp table
    - insert data into db table using (insert into .. select .. join ..)
    - the column that was invalid but not detected was in the insert column list
Sign In or Register to comment.