SQL Database Validation is Out-of-sync

I ran into a strange situation where I am trying to synchronize two databases on different servers using Red Gate SQL Compare v14.4.4.16824 and a stored procedure identified as different but will not deploy because it encounters an error: "Invalid column name xxxx".  The error itself is an error because the table column does in fact exist on both servers by that name.  I have used SSMS to confirm the tables are the same and contain the column name and I have tried to deploy with SSMS and that failed with the same invalid column name error. 

So my question is, what is the database looking at to validate the column name and how do I update that data?   

Answers

  • Ed_ThompsonEd_Thompson Posts: 3 New member
    I got it to correct itself finally.  I had to add a column to the table which resulted in it creating a temporary table, copying all the data into the temp from the current table, dropping the current table, then renaming the temporary table.  After that was completed I deleted the new column I added.  This of course has a downside as associated history is lost because it now has a new Object_id.

  • Thanks for reaching out to us regarding this!

    I'm glad you have been able to find a workaround for this, however clearly you shouldn't have had to do this. Before I start to look at trying to reproduce this issue here, I wondered if as a very first step you could update to the latest version of SQL Compare to see if you still see the same issue? Version 14.4.20 can be downloaded from here: https://download.red-gate.com/checkforupdates/SQLCompare/SQLCompare_14.4.20.18129.exe

    Kind regards

    Dan Jary | Redgate Software
    Have you visited our Help Center?
Sign In or Register to comment.