Find Invalid Objects

SQL Complete allows you to find invalid objects in multiple databases, such as an object that references other objects that were dropped, etc.

To find invalid objects in a database:

  1. In SSMS, click SQL Complete in the main menu and select Find Invalid Objects. Alternatively, right-click a required database in Object Explorer, navigate to SQL Complete and select Find Invalid Objects from the context menu. The Find Invalid Objects window opens.

  2. Specify the connection and select a database to search in for invalid objects. You can select multiple databases from the list of available ones.

  3. Click Analyze to start searching.

  4. The detected invalid objects are displayed in the grid with details about the type of the object, schema, name and invalid reason. Select an invalid object and the bottom pane displays a script with the invalid object being highlighted.

    Find Invalid objects

  5. You can do the following actions with the invalid objects: Script as ALTER or Script as DROP to New SQL Window or to Clipboard.

    Script as ALTER

  6. The script includes a comment next to the invalid object.

    Invalid column name