SDC 8 shows DBs as identical, SDC 7 finds differences?

andersomandersom Posts: 29
I assume I must be doing something wrong on the command line, but I can't figure out what it might be.

The following command shows the two DBs as identical when using SDC 8:
E:\>"E:\Red Gate\SQL Data Compare 8\SQLDataCompare.exe" /verbose /server1:the_real_prodc /server2:ladbmo01\lamo
m /database1:pricing /database2:pricing /include:table:\[tbl_ppws_cfg_maint_expense\]
Red Gate SQL Data Compare Command Line Utility V8.0.5.34
==============================================================================
Copyright c Red Gate Software Ltd 1999-2009

Serial Number: 

Comparing database the_real_prodc.pricing with database ladbmo01\lamom.pricing...
Registering databases
Mapping
Comparing databases
Error: The selected objects are identical or no objects have been selected in
the comparison.

But when I run the exact same command in SDC 7, it shows the table as being different in the two databases. (SDC 7 is correct, in case you were wondering, the tables ARE actually different):
E:\>"E:\Red Gate\SQL Data Compare 7\SQLDataCompare.exe" /verbose /server1:the_real_prodc /server2:ladbmo01\lamo
m /database1:pricing /database2:pricing /include:table:\[tbl_ppws_cfg_maint_expense\]
Red Gate SQL Data Compare Command Line Utility V7.1.0.245
==============================================================================
Copyright c Red Gate Software Ltd 1999-2008

Serial Number:

SQL Data Compare running with SQL Option: Default (OK).
SQL Data Compare running with Mapping Option: Default (OK).
SQL Data Compare running with Comparison Option: Default (OK).
Comparing database the_real_prodc.pricing with database ladbmo01\lamom.pricing...
Registering databases
Mapping
Comparing databases
Finished

Summary Information
===============================================================================
DB1 = the_real_prodc.pricing
DB2 = ladbmo01\lamom.pricing

Object type     Name                                      Records      DB1 DB2
-------------------------------------------------------------------------------
Table           [dbo].[tbl_ppws_cfg_maint_expense]                196  ==  ==
Table           [dbo].[tbl_ppws_cfg_maint_expense]                  8  >>
Table           [dbo].[tbl_ppws_cfg_maint_expense]                  8      <<
-------------------------------------------------------------------------------
OK

So what am I doing wrong with my SDC 8 command line? Help!

Comments

  • Quick update: I installed the latest cumulative patch for SDC 8 to see if it would help, now I'm getting a different error:
    E:\>"E:\Red Gate\SQL Data Compare 8\SQLDataCompare.exe" /verbose /server1:the_real_prodc /server2:ladbmo01\lamo
    m /database1:pricing /database2:pricing /include:table:\[tbl_ppws_cfg_maint_expense\]
    Red Gate SQL Data Compare Command Line Utility V8.0.5.42
    ==============================================================================
    Copyright c Red Gate Software Ltd 1999-2009
    
    Serial Number: 
    
    Comparing database the_real_prodc.pricing with database ladbmo01\lamom.pricing...
    Registering databases
    Mapping
    Error: Object reference not set to an instance of an object.
    
  • Hi Matt,

    I am not entirely sure what is going on here, so have opened a support case for you.

    I am sending you an e-mail about this now.

    Pete
    Peter Peart
    Red Gate Software Ltd
    +44 (0)870 160 0037 ext. 8569
    1 866 RED GATE ext. 8569
  • Hi Matt,

    We have a patched version of SQL Data Compare that should fix this and is available from the sticky below:

    http://www.red-gate.com/MessageBoard/vi ... php?t=9880

    Please note that when specifying the table name, you will need to do so without the owner. For example, in the sample databases with SQL Data Compare there is a table called [dbo].[Contacts]. This would be specified as follows:
    sqldatacompare /db1:WidgetDev /db2:WidgetLive /s1:"ts-pete\sql2008" /s2:"ts-pete\sql2008" /include:table:"Contacts"
    

    Pete
    Peter Peart
    Red Gate Software Ltd
    +44 (0)870 160 0037 ext. 8569
    1 866 RED GATE ext. 8569
  • The latest update that you posted does not solve the original problem.

    It does fix the "Object reference not set to an instance of an object." error, but the "The selected objects are identical or no objects have been selected in the comparison." error remains.
  • Hi Matt,

    Can you please try this again using the syntax that I provided in my last update? For example, in the sample databases with SQL Data Compare there is a table called [dbo].[Contacts]. This would be specified as follows:

    sqldatacompare /db1:WidgetDev /db2:WidgetLive /s1:"ts-pete\sql2008" /s2:"ts-pete\sql2008" /include:table:"Contacts"
    

    Many thanks!
    Peter Peart
    Red Gate Software Ltd
    +44 (0)870 160 0037 ext. 8569
    1 866 RED GATE ext. 8569
  • If I quote the table name, then it does sort-of work, however it treats the table name as a wildcard, and I need to match only the exact table name. See the following:
    E:\>"E:\Red Gate\SQL Data Compare 8\SQLDataCompare.exe" /verbose /server1:the_real_
    prodc /server2:ladbmo01\lamom /database1:pricing /database2:pricing /include:table:"tbl_ppws_run_results"
    Red Gate SQL Data Compare Command Line Utility V8.0.5.48
    ==============================================================================
    Copyright c Red Gate Software Ltd 1999-2009
    
    Serial Number: 
    
    Comparing database the_real_prodc.pricing with database ladbmo01\lamom.pricing...
    Registering databases
    Mapping
    Comparing databases
    Finished
    
    Summary Information
    ===============================================================================
    DB1 = the_real_prodc.pricing
    DB2 = ladbmo01\lamom.pricing
    
    Object type     Name                                      Records      DB1 DB2
    -------------------------------------------------------------------------------
    Table           [dbo].[tbl_ppws_run_results]                    44597  >>
    Table           [dbo].[tbl_ppws_run_results]                     6167      <<
    Table           [dbo].[tbl_ppws_run_results_cac]                   77  <>  <>
    Table           [dbo].[tbl_ppws_run_results_cac]               757138  >>
    Table           [dbo].[tbl_ppws_run_results_cac]               117318      <<
    Table           [dbo].[tbl_ppws_run_results_comp_scale]           867  >>
    Table           [dbo].[tbl_p...un_results_comp_scale_dtl]         867  >>
    
    Table           [dbo].[tbl_ppws_run_results_sfee_fee]            2206  >>
    Table           [dbo].[tbl_ppws_run_results_sfee_fee_dtl]        2206  >>
    -------------------------------------------------------------------------------
    OK
    

    In order to just compare the single table named tbl_ppws_run_results, I'm putting square brackets around the table name, which was the correct way to do it in version 7, however doing it that way now gives me the following results:
    E:\>"E:\Red Gate\SQL Data Compare 8\SQLDataCompare.exe" /verbose /server1:the_real_
    prodc /server2:ladbmo01\lamom /database1:pricing /database2:pricing /include:table:\[tbl_ppws_run_results\]
    
    Red Gate SQL Data Compare Command Line Utility V8.0.5.48
    ==============================================================================
    Copyright c Red Gate Software Ltd 1999-2009
    
    Serial Number: 
    
    Comparing database the_real_prodc.pricing with database ladbmo01\lamom.pricing...
    Registering databases
    Mapping
    Comparing databases
    Error: The selected objects are identical or no objects have been selected in
    the comparison.
    
  • Hi Matt,

    Can you try using the following:
    ^tbl_ppws_run_results$
    

    And if that doesn't work:
    "^tbl_ppws_run_results$"
    

    I believe that in version 7 the tool compared on the fully qualified object name hence the brackets, however version 8 doesn't behave like that anymore, hence the removal of the brackets.

    Please can you let me know how you get on with this Matt?

    Pete
    Peter Peart
    Red Gate Software Ltd
    +44 (0)870 160 0037 ext. 8569
    1 866 RED GATE ext. 8569
  • Ah, that works much better.

    So, to clarify, in SDC 7 the command line syntax for selecting specific tables was:
    /include:table:\[table1\]^|\[table2\]^|\[table3\]
    

    Whereas in SDC8, the following syntax is correct?
    /include:table:^table1$^|^table2$^|^table3$
    

    That seems confusing to me...

    Also, your online documentation seems to indicate that the square bracket syntax is correct, not the $ syntax you posted, and probably needs to be updated.
Sign In or Register to comment.