Icon Migrating Databases

ElevateDB provides an open migration interface so that migrators can be written to migrate data from literally any external data source. Migrators are defined using the CREATE MIGRATOR statement and refer to migrator modules (DLLs) that implement the actual migration interface. Please see your product-specific manual for more information on creating migrator modules. The MIGRATE DATABASE statement is used to actually execute the migration for the external data source.

Standard Migrator Modules
ElevateDB includes the following migrator modules:

ModuleDescription
edbmigrateElevateDB migrator module
edbmigratedbisam1DBISAM Version 1.x migrator module
edbmigratedbisam2DBISAM Version 2.x migrator module
edbmigratedbisam3DBISAM Version 3.x migrator module
edbmigratedbisam4DBISAM Version 4.x migrator module
edbmigratebdeBDE (Borland Database Engine) migrator module
edbmigrateadoADO (Microsoft ActiveX Data Objects) migrator module
edbmigratendbNexusDB migrator module
edbmigrateadsADS (Advantage Database Server) migrator module

You can find these migrator modules as part of the ElevateDB Additional Software and Utilities (EDB-ADD) installation in the \libs subdirectory under the main installation directory. There are ANSI and Unicode versions of each of the migrator modules that will work with both ANSI or Unicode sessions.

Information You can download the ElevateDB Additional Software and Utilities (EDB-ADD) installation from the Downloads page of the web site.

In order to reference these migrator modules from within a migrator in ElevateDB, you must make sure that the migrator modules (DLLs) are registered in the configuration file by using the CREATE MODULE statement. You can verify that this is done by using the following SELECT statement on the special system-defined Configuration Database:

SELECT * FROM Modules

If the rows returned from the above query include the five migrator modules listed above, then the migrator modules have been registered successfully in the configuration file. Please see the Architecture topic for more information on the configuration file.

Creating a Migrator
To create a migrator that uses the desired migrator module, you can use the CREATE MIGRATOR statement. For example, you would use the following statement to create a migrator for use with DBISAM 1 data sources:

CREATE MIGRATOR "DBISAM1"
MODULE "edbmigratedbisam1"
DESCRIPTION 'DBISAM 1 Migrator'

Migrating the External Data
The first step in migrating an external data source is to query the parameters required for the migrator. You can do so by querying the MigratorParams Table table in the Configuration database. This table contains the parameters for each migrator that are retrieved from the migrator module, along with their type and any default values. These parameters are important because they will be used with the MIGRATE DATABASE statement to populate the parameters as required by the migrator. Usually, the most important parameter is the name of the external database, or database directory, or a connection string that indicates the proper values used to connect to the external data source.

The target database for a migration must be present before the migration takes place, and the migration is always executed from within the target database. You can use the CREATE DATABASE statement in order to create the target database.

To perform the migration, you can execute the MIGRATE DATABASE statement from the ElevateDB database that you just created (or already existed):

MIGRATE DATABASE FROM "DBISAM1"
USING DatabaseDirectory = 'c:\dbisamdata'

When the MIGRATE DATABASE statement is executed, the external data source should migrate to the current ElevateDB database. Any errors that are encountered will be raised as an exception with an ElevateDB error code.
Image