bc3_db_compare.rb

bin/bc3_db_compare.rb
Last Update: 2011-04-08 21:35:05 +0100

What’s for

Beyond Compare 3 offers no genuine method to compare database content.

This script is part of a solution to compare two tables in two databases (or different selections in one database...)

How to use

Call

bc3_db-compare <configfile> <targetfile> [<logfile>]

The configfile will be used to prepare a database connection and a DB-selection. The result is written to targetfile.

The optional logfile will get some logging data (can be used to analyse errors).

How to use with Beyond Compare 3

Import the file formats from file examples/BCSettings_db4bc3.bcpkg to Beyond Compare 3.

Save your two configuration files with extension db4bc3.

Compare your two configuration files.

How it works

You can define file formats with conversion process. This script implement such a conversion for database access.

The file to compare contains a configuration to make a database selection and build a result file.

Two of this configuration files will be compared with Beyond Compare 3. Beyond Compare 3 calls this script as conversion tool, the data base selection is executed and a text file is the result.

The configuration file defines the configuration in yaml-syntax. Details see DBconverter#check_configuration_file.

The file formats can be imported from file examples/BCSettings_db4bc3.bcpkg

Coding Details/Help

This script based on a question in www.scootersoftware.com/vbulletin/showthread.php?t=7360

If you have questions, try to ask in the Beyond Compare 3-forum. Normally I check the forum at least once a month ;)

Required files

  1. yaml
  2. sequel
  3. log4r