Migrates the current database from an external source using a migrator.

[USING <ParamName> = <ParamValue> [,<ParamName> = <ParamValue>]]
[START AT TABLE <TableName>]

<ParamName> = The name of a migrator parameter

<ParamValue> = A literal value to be assigned to the paramter

Use this statement to migrate the current database from an external source.

The FROM clause specifies the migrator to use for the migration process. Migrators are defined using the CREATE MIGRATOR statement.

The USING clause is optional and allows you specify a comma-delimited list of parameters and the values to assign to each parameter. You can find out the parameters for a migrator along with their type and default value by querying the MigratorParams table in the Configuration Database.

The WITH DATA clause specifies that the table data for the external data source should be migrated also, while the WITH NO DATA clause specifies that only the metadata for the database objects should be migrated. The default is WITH NO DATA.

Starting in 2.29, the START AT TABLE clause can be used to specify the table from which to start the migration. The order of the tables that are being migrated is determined by the migrator being used, along with its associated database engine.

Information ElevateDB allows for tables (including constraints), indexes, triggers, functions, and procedures to migrated from an external data source. However, not all migrators and/or data sources support all of these types of objects.

-- This example migrates a BDE alias called
-- DBDEMOS using the BDE migrator

USING DatabaseName = 'DBDEMOS', Transliterate = False

Required Privileges
The current user must be granted the proper CREATE privilege on the current database in order to execute this statement. Additionally, if the WITH DATA clause is specified, then the current user must be granted the INSERT privilege on any tables that will be migrated so that the rows from the external data source can be inserted into the new ElevateDB tables. Please see the User Security topic for more information.

SQL 2003 Standard Deviations
This statement deviates from the SQL 2003 standard in the following ways:

ExtensionThis SQL statement is an ElevateDB extension.