cdr migrate server

The cdr migrate server command automates data migration task between two or more servers. This command also automates setting up of Enterprise Replication between two Informix server instances.

Data migration options

  • Static mode-offline data migration
    • Create storage spaces using storage pool
    • Migrate schema (except referential integrity) and data in parallel
    • Build referential integrity
  • Dynamic mode – online data migration
    • Create storage spaces using storage pool
    • Migrate schema (except referential integrity) and data in parallel
    • Resynchronize data using Enterprise Replication
    • Build referential integrity
The cdr migrate server command automates tasks such as:
  • Define Enterprise Replication domain between the two servers.
  • Add ERKEY columns for the tables that does not have primary key or unique index columns.
  • Create required storage spaces for the databases
  • Apply database schema from source server to target server
  • Create replicate definitions
  • Synchronize data between source and target server instances
  • Build referential integrity

Supported phases

Supported phases Meaning
1 define_er Define ER
2a add_erkey Add ERKEY to source schema
2b add_replcheck Add ERPLCHECK column and index to source schema
3 create_spaces Create storage spaces using storagepool
4a create_schema_loaddata Create database schema and load data
4b create_schema_nodata Create database schema
4c create_schema_loaddata_nori Create database schema without referential integrity and load data
5 create_replicates Create replicate, replicate set and grid definitions
6 sync_data Synchronize data
7 add_ri Add referential integrity
8 all Execute all phases (with phase create_schema_loaddata_nori
9 static Execute create_spaces and create_loaddata phases
10 dynamic Execute all phases similar to 'all'
If you decide to execute the above phases individually, then phase order need to be maintained.

Prerequisites to run cdr migrate server command

  1. To auto create required storage spaces, storage pool is a requirement at source and target servers.
  2. SQLHOSTS files at both source and target server must be already configured with ER group information.
  3. Trusted host configuration must be already established between source and target servers.
  4. Source server must be 11.70xC1 or higher version.

Restrictions

  1. Cannot mix multiple database code-sets in same data migration command.
  2. Parallel data load using ISTAR query do not support tables with smart large objects(BLOB and CLOB), user created UDTs and collection datatypes.
    • Requires customization to unload/load data using external tables or using any other supported unload/load commands.
  3. Tenant databases and database sharding are not supported.
  4. Cannot use this tool for database code-set migration

Command syntax

cdr migrate server -s source -t target -p phase [-d database] [--exec] 

The following table describes the options to cdr migrate server:

Long Form Short Form Meaning Additional Information
--source -s Source server name
--target -t Target server name
--phase -p Migration phase
--exec -e Execute commands. Default: print only.
--database -d Database to replicate
--receiveonly -T Setup oneway replication from source to target 'create_replicates' phase
--checkrepair -r Synchronize data using 'cdr check' instead of 'cdr sync' 'sync_data' phase
--grid -g Y/N Enable/Disable grid. Default:Y 'create_replicates' phase
--atsdir -A ATS files directory path 'define_er' phase
--risdir -R ATS files directory path 'define_er' phase
--parallelsync -P Number of table sync jobs to run in parallel 'sync_data' phase
--outfile -f <file path> Output file for commands
--exclude -E db:owner.tab specify table to exclude

Examples

To generate the commands for migration without executing it:
cdr migrate server   -s cdr_group_1 -t cdr_group_2   --phase all
To execute all phases of cdr migrate command:
cdr migrate server   -s cdr_group_1 -t cdr_group_2   --phase all  --exec
To execute only 'define_er' phase:
cdr migrate server  -s cdr_group_1 -t cdr_group_2   --phase define_er --atsdir=/work --risdir=/work --exec