Comments
8 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 -
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 -
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! -
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 -
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.
Add comment
Please sign in to leave a comment.
The following command shows the two DBs as identical when using SDC 8:
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):
So what am I doing wrong with my SDC 8 command line? Help!