Comments
4 comments
-
I have just tested this and it seems to be working correctly in my case, if you are missing a few tables then you should be getting error level 79
(in the example below the source has an additional table)C:\Program Files (x86)\Red Gate\SQL Compare 13>sqlcompare.exe /s1:W2K16-1 /db1:140617_source /s2:W2K16-1 /db2:140617_target /assertidentical /vSQL Compare Command Line V13.7.13.10771======================================================================================================================Copyright Copyright c Red Gate Software Ltd 2019Argument /server1 has value 'W2K16-1'Argument /database1 has value '140617_source'Argument /server2 has value 'W2K16-1'Argument /database2 has value '140617_target'Argument /assertidentical has value 'True'Argument /verbose has value 'True'Redgate Client capability version: 2SQL Compare: activated, edition professional, serial number:Comparing database W2K16-1.140617_source with database W2K16-1.140617_target...Registering data sourcesCreating mappingsComparingApplying Command Line ItemsRetrieving migration scriptsChecking for identical databasesSummary Information=======================================================================================================================DB1 = W2K16-1.140617_sourceDB2 = W2K16-1.140617_targetObject type Name DB1 DB2-----------------------------------------------------------------------------------------------------------------------Table [dbo].[T2] >>-----------------------------------------------------------------------------------------------------------------------Details - comparing W2K16-1.140617_source with W2K16-1.140617_target=======================================================================================================================Table [dbo].[T2]>> CREATE TABLE [dbo].[T2]>> (>> [C1] [nchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL>> )>> GO-----------------------------------------------------------------------------------------------------------------------C:\Program Files (x86)\Red Gate\SQL Compare 13>echo %errorlevel%79
-
I'm using the switch /project and I'm getting exit code 0.
Here is the output.C:\RedGateSQLCompareProjects\Dev>sqlcompare /project:XXXXX.scp /filter:testfilter.scpf /assertidentical /vSQL Compare Command Line V13.7.13.10771==============================================================================================================================================================Copyright Copyright © Red Gate Software Ltd 2019Argument /project has value 'XXXXX.scp'Argument /filter has value 'testfilter.scpf'Argument /assertidentical has value 'True'Argument /verbose has value 'True'Redgate Client capability version: 2SQL Compare: activated, edition professional, serial number: 512-001-140195-498ALoading synchronization parameters from project file: XXXXX.scpOKComparing database Scripts.XXXXX with database DEV-SQL2016.S_XXXXX...Registering data sourcesCreating mappingsComparingSummarizing Project SelectionsRetrieving migration scriptsChecking for identical databasesSummary Information==============================================================================================================================================================DB1 = XXXXXDB2 = DEV-SQL2016.S_XXXXXObject type Name DB1 DB2----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Details - comparing XXXXX with DEV-SQL2016.S_XXXXX==============================================================================================================================================================C:\RedGateSQLCompareProjects\Dev>echo %errorlevel%
0If I use /scripts1 with /s2 and db2 I get an error code 79 with a list of tables that need syncing or are missing.
That works fine.
The project switch is not returning the exit code I would have expected.
-
If you look at the output, in your case, SQL Compare is not detecting any differences (in my case there's an additional table in the source) so an exit code of 0 is correct.
I have tested now with a scripts folder as the source, a project file and a filter file to replicate your scenario as closely as possible and in my case I still can't find any issues.
I will contact you directly through our support system -
I just figured this out. My fault. I had unchecked the missing tables from the table list in the project file, so the program was working as expected.
Add comment
Please sign in to leave a comment.
The filter does include a table comparison while omitting users and roles.
If I run the scpf file in sql compare I can clearly see that I'm missing a few tables, but otherwise the DB is identical to my source folder.
Am I doing something wrong? Some switch missing?