Compare all but one table with Command line
e2patrick
Posts: 1 New member
Hi, we are using an automated data comparison via Command line between Source Control and target database. We now add a table that we want to store in Source Control but we don't want the data to be synchronized.
So I added the switch "/Exclude:table:[ef].[QueryHints]" to the argument list. After that we got the problem that Data Compare didn't synchronized any of the tables. When I deactived the exclude switch the programms synchronized all tables again.
How can I exclude only this single table with command line?
This is the complete argument list:
"/scripts1:$MyDatabasePath"
, "/server2:$MyServerInstance "
, "/database2:$MyDatabase"
, "/scriptfile:$releaseRolloutPathDataCompare$MyDatabase.sql"
, "/include:table,view,schema,storedprocedure,function,userdefinedtype"
, "/Synchronize"
, "/Include:Identical"
, "/Exclude:table:[ef].[QueryHints]"
, "/Options:Default"
, "/server2:$MyServerInstance "
, "/database2:$MyDatabase"
, "/scriptfile:$releaseRolloutPathDataCompare$MyDatabase.sql"
, "/include:table,view,schema,storedprocedure,function,userdefinedtype"
, "/Synchronize"
, "/Include:Identical"
, "/Exclude:table:[ef].[QueryHints]"
, "/Options:Default"
Tagged:
Answers
I'm wondering if it's due to the syntax, I think it needs to be "/Exclude:table:QueryHints"
https://documentation.red-gate.com/sdc/using-the-command-line/command-line-syntax/switches-used-in-the-command-line#Switchesusedinthecommandline-/Exclude:<objecttype>:<regularexpression>
Kind regards
Dan Calver | Redgate Software
Have you visited our Help Center?