Invalid column name 'COLUMN'

msigmanmsigman Posts: 11
edited August 1, 2011 9:46AM in SQL Compare Previous Versions
Running SQL Compare 9 on two SQL Server 2008 databases. I am trying to use the command line. It works fine when comparing, however as soon as I add the /synchronize switch I get these errors:
Registering data sources
Creating mappings
Comparing
Applying Command Line Items
Creating SQL
Synchronizing databases (from DB1 to DB2)
Error: Synchronization of 'qadb01\devdb.Monarch' and 'qadb01.Monarch' failed:
Invalid column name 'FAMILY_GUID'. Invalid column name 'FAMILY_GUID'. Invalid
column name 'STATE_GUID'. Invalid column name 'STATE_GUID'. Invalid column name
'DIVISION_GUID'. Invalid column name 'DIVISION_GUID'. Invalid object name
'dbo.OBJECT_ID_NUMBERS'.

I can do a synchronization with the UI and it works fine. However it fails on the command line. This is the command line (passwords removed for security):
C:\Program Files (x86)\Red Gate\SQL Compare 9>SQLCOMPARE /synchronize /server1:q
adb01\devdb /server2:qadb01 /db1:Monarch /db2:Monarch /include:identical /force
/username1:sa /password1:****** /username2:sa /password2:******

Comments

  • This is related to a known bug in the command line where is erroneously tries to rebuild all the view. The workaround for this is to use /exclude:identical. So the above command would become:

    C:\Program Files (x86)\Red Gate\SQL Compare 9>SQLCOMPARE /synchronize /server1:qadb01\devdb /server2:qadb01 /db1:Monarch /db2:Monarch /exclude:identical /force /username1:sa /password1:****** /username2:sa /password2:******
  • Thank you. However, now I am receiving this error:
    [10:00:40]: Copyright c Red Gate Software Ltd 1999-2011
    [10:00:40]: Registering data sources
    [10:00:47]: Creating mappings
    [10:00:48]: Comparing
    [10:00:48]: Applying Command Line Items
    [10:00:48]: Error: The selected objects are identical or no objects have been selected in
    [10:00:48]: the comparison.
    [10:00:48]: Process exited with code 63
    
  • aolcotaolcot Posts: 27 Bronze 2
    I believe that this exit error is raised when everything is identical, but it can be suppressed by using the /include:identical setting
  • aolcot, thank you. I think you are correct. However, if you look at my original command line, that's what I had. RedGate requested that I change it to /exclude:identical to help fix some bug of thiers. But now I don't get the desired behavior. :roll:
Sign In or Register to comment.