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.

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
--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