Metadata diff

To completely transfer the database contents of two databases with similar structure, you first have to determine which tables are different from one another.

Differences in the table structure will mean among other things that a transfer of the corresponding table cannot be performed; for example if fields are present in a table in the source database that are not present in the target.

The Metadata Diff module can be used for this, as explained below.

To start a new database comparison, click on the icon button Metadata diff in the esdbm program window.

A new tab labeled Metadata diff opens. On the left, you can select the database for comparison using the alias.

'Old database' area

Database

Select the database alias that is to be used as the data source.

 

By default the alias ESWin is entered as the Database in the Old database area. You can also select a different alias.

The database aliases shown are read out from the dbxconnections.ini file in the esoffice para directory. You can view / edit the database connections under Connection settings.

 

Log in data

An esoffice user login is required when a module is opened or a function that acesses an esoffice database is executed.

The user requires 110 - Basic settings authorization.

If you have successfully logged in to an esoffice database (alias) in esdbm, your log in data will not be requested again when you access the database alias again.

'New database' area

Database

Select the database alias that is to be used as the target for the data transfer.

 

For example, to migrate a Firebird database to an MSSQL database, select the Firebird alias under Old database and the MSSQL alias under New database.

 

Log in data

An esoffice user login is required when a module is opened or a function that acesses an esoffice database is executed.

The user requires 110 - Basic settings authorization.

If you have successfully logged in to an esoffice database (alias) in esdbm, your log in data will not be requested again when you access the database alias again.

Compare databases

When you have specified the Old database (source) and New database (target), click on the Compare databases button.

 

A log in is required when you first access a database alias (old and new databases).

Once you have started the comparison by clicking the Compare databases button, an overview of the differences in the databases is shown as a tree structure on the right.

The tree consists of two layers.

The first layer contains the table names.

The second layer, which is opened by clicking on the icon, contains the field names.

The icons have the following meanings:

Change

The table or field has changed from the target to the source.

New

The table or field does not exist yet in the source but is present in the target.

Path column

The table or field no longer exists in the target but is only present in the source.

Further information is contained in brackets ( ) after each field name. This indicates the field type.

Field types

The various field types that can occur in the XML file are listed below:

Abbreviation - Meaning

I - Integer (32 bit)

S - Small - Integer (16 bit)

F - Float / Double

D - DateTime / TimeStamp

M - Memo (PlainText)

R - Memo (RichText)

H - Memo (HTML)

B - Blob

A|1 - Boolean (string of length 1)

A|X - String of length X

You can use this information to adapt a copy script so that correct transfer between two tables can be accomplished, for example.