Exclude objects from schema/data compare from command line

Discussion of open issues, suggestions and bugs regarding database management and development tools for SQL Server
Post Reply
droelands
Posts: 2
Joined: Mon 28 Oct 2019 18:02

Exclude objects from schema/data compare from command line

Post by droelands » Mon 28 Oct 2019 18:09

We're evaluating DBForge Studio for purchase.

In our development process, it is sometimes necessary to excude certain database objects from schema or data compare. However, the objects that are being excluded in the version 2.0 release might be different from the objects being excluded in the 2.1 release.

In our current setup, there's a file that developers can edit when they make a change that requires a database object to be excluded. It's a text file with a list of object names. When our automated build runs, it reads this file and excludes the objects listed.

I would like to know if there is a command-line parameter for DBForge Studio that would allow me to identify specific DB objects to exclude from data or schema compare. Having developers open the DBForge GUI and edit the configurations in that way is not feasible for us due to licensing and source-code-control concerns.

Thanks in advance.

alexa
Devart Team
Posts: 2860
Joined: Fri 24 Jun 2011 14:17

Re: Exclude objects from schema/data compare from command line

Post by alexa » Tue 29 Oct 2019 12:39

You can specify the objects to compare for data comparison. Here is the options list that can be used in the command line
http://docs.devart.com/studio-for-sql-server/comparing-synchronizing-data/options-used-in-cmd-for-datacompare.html

Also, you can use the 'Include tables or views by mask' option on the 'Options' page of the data comparison wizard, generate a *.dcomp document with the respective state of the option and use it in the command line interface.

There is no a possibility to ignore specific objects in schema comparison though.

droelands
Posts: 2
Joined: Mon 28 Oct 2019 18:02

Re: Exclude objects from schema/data compare from command line

Post by droelands » Tue 29 Oct 2019 13:00

Is it possible to create a file with a list of objects names that I want to INCLUDE, and somehow pass that to DBForge on the command line?

The ability to exclude/include specific objects by name is a dealbreaker for our organization.

alexa
Devart Team
Posts: 2860
Joined: Fri 24 Jun 2011 14:17

Re: Exclude objects from schema/data compare from command line

Post by alexa » Tue 29 Oct 2019 14:03

You can create a filters list that will be used in the command line using the key:

Code: Select all

/schemacompare ... /Filter:"C:\Filter.scflt"
In case the database objects are dynamic and need to be changed periodically, you can manually resave the filter. Or, you can manually specify them in the file.

The filter file has XML structure. However, you need to be careful with that.

Post Reply