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

  1. define_er: Define ER
    1. add_erkey: Add ERKEY to source schema
    2. add_replcheck : Add REPLCHECK column and index to source schema
  2. create_spaces: Create storage spaces using storagepool
    1. create_schema_loaddata: Multi phase replay of schema and data
      • Phased migration of schema and data:
        • Phase 1:
          • Migrate database schema except indexes, primary key, unique and referential constraints
          • Create all tables as “RAW” tables
        • Phase 2:
          • Start multiple parallel jobs for data load and index builds
          • Each job includes: make sure table is a raw table, Load data using “insert into … select * from …” ISTAR query, Build indexes, primary key and unique key constraints
        • Phase 3:
          • Build referential constraints
    2. create_schema_nodata : Create database schema
    3. create_schema_loaddata_nori : Create database schema without referential integrity and load data
  3. create_replicates: Create replicate, replicate set and grid definitions
  4. sync_data: Synchronize data
  5. add_ri: Add referential integrity
  6. all: Execute all phases (with phase create_schema_loaddata_nori)
  7. static: Execute create_spaces and create_schema_loaddata phases
  8. 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.


  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] 

-s --source Source server name

-t --target Target server name

-p --phase migration phase

-e --exec Execute commands. Default: print only.

-d --database Database to replicate

-T --receiveonly Setup oneway replication from source to target

('create_replicates' phase)

-r --checkrepair Synchronize data using 'cdr check'

instead of 'cdr sync'('sync_data' phase)

-g --grid Y/N Enable/Disable grid. Default:Y('create_replicates' phase)

-A --atsdir ATS files directory path('define_er' phase)

-R --risdir ATS files directory path('define_er' phase)

-P --parallelsync Number of table sync jobs to run

in parallel('sync_data' phase)

-f --outfile <file path> Output file for commands

-E --exclude specify table to exclude


To print commands to stdout:
cdr migrate server   -s cdr_utm_nag_1 -t cdr_utm_nag_2   --phase all
To execute commands:
cdr migrate server   -s cdr_utm_nag_1 -t cdr_utm_nag_2   --phase all  --exec
To run 'define_er' phase:
cdr migrate server  -s cdr_utm_nag_1 -t cdr_utm_nag_2   --phase define_er --atsdir=/work --risdir=/work