"Invalid object name" or "Invalid column name" error during Test To Live

Version 3

    Verified Product Versions

    Service Desk 7.7.x


    On running Test To Live you seen the following error during synchronisation:


    invalid view error.PNG

    Progress status: Synchronising database schemas...

    Error message: Invalid object name '<table name>'


    Error message: Invalid column name '<column name>'


    In the Test To Live log the last line looks like:


    [09:45:39] RedGate - Refreshing [dbo].[aaaa_view]



    This error can occur when a View in the databases is invalid.  As part of the database schema synchronisation done by Test To Live it recreates all views and if any of them fail to compile in SQL Server an error is thrown.


    The most common reasons an existing view would fail to compile is if a table of column used in it no longer exists.  In the example messages above the view in question is called aaaa_view and is invalid because it references a table called aaaa_table which does not exist.



    Remove or fix the view in the Test database then re-run Test To Live.