You can use SQL Prompt to find invalid objects in your database. This can be useful, for example, if you have inherited a legacy database and you want to know if any objects are referencing objects that have been dropped and no longer exist in the database.
Objects are listed as invalid by SQL Prompt if they:
To find invalid objects in a database:
To open the script as an ALTER statement in a new query window, click Script selected objects as ALTER.
script multiple invalid objects as ALTER by selecting more than one object in the upper pane, and then clicking Script selected objects as ALTER:
This only creates one new query. Each object is scripted as a separate ALTER action.
locate an invalid object in the Object Explorer by double-clicking it in the upper pane:
copy a list of invalid objects you select in the upper pane by right-clicking a selected object, and clicking Copy: