Example of creating a new replication domain by cloning

This is an example of creating a new replication domain based on the data and configuration on a source database server that does not have replication defined. The three additional replication servers in the domain are added by cloning the source server.

This example creates a replication domain and grid that contain four replication servers: serv1, serv2, serv3, serv4. Each server computer has the HCL OneDB™ database server installed. The source server contains the stores_demo database.

  1. On the serv1 server, set the CDR_QDATA_SBSPACE configuration parameter.
  2. On the serv1 server, set the value of the ENABLE_SNAPSHOT_CLONE configuration parameter to 1 in the onconfig file.
  3. On the serv1 server, add the following sqlhosts information about serv1 and serv2:
    gserv1     group    -                     -     i=143
    serv1      ontlitcp ny.usa.com            1230  g=gserv1
    gserv2     group    -                     -     i=144
    serv2      ontlitcp tokyo.japan.com       1231  g=gserv2
    
  4. On both the serv1 and serv2 servers, complete the ifxclone prerequisites for all servers, such as setting the required configuration parameters and environment variables.

    Set these environment variables:

    • ONEDB_HOME
    • ONEDB_SERVER
    • ONEDB_ SQLHOSTS
    • ONCONFIG

    Set these configuration parameters to the same values on both servers:

    • DRAUTO
    • DRINTERVAL
    • DRTIMEOUT
    • LOGBUFF
    • LOGFILES
    • LOGSIZE
    • LTAPEBLK
    • LTAPESIZE
    • ROOTNAME
    • ROOTSIZE
    • PHYSBUFF
    • PHYSFILE
    • STACKSIZE
    • TAPEBLK
    • TAPESIZE
  5. On the serv2 server, create all of the chunks that exist on the serv1 server. You can use the --createchunkfile option (-k) of the ifxclone utility to automatically create cooked chunks on the target server.
  6. On the serv2 server, run the ifxclone command with the --disposition=RSS option to clone the data and the configuration of the serv1 server onto the serv2 server:
    ifxclone --trusted --source=serv1 --sourceIP=192.168.0.1 
    --sourcePort=1230 --target=serv2 --targetIP=192.168.0.2 
    --targetPort=1231 --disposition=RSS --createchunkfile
    ifxclone --trusted --source=serv1 --sourceIP=192.168.0.1 
    --sourcePort=1230 --target=serv2 --targetIP=192.168.0.2 
    --targetPort=1231 --disposition=RSS 
  7. On the serv1 server, run the cdr check sec2er command to determine if conversion to replication servers is possible:
    $cdr check sec2er -c gserv1 gserv2
    Secondary conversion to ER is possible.
    
  8. On the serv1 server, run the cdr start sec2er command to convert both servers to replication servers, create a new replication domain, create and start replicates based on all the tables on the serv1 server:
    cdr start sec2er -c gserv1 gserv2
  9. On the serv3 and serv4 servers, provision chunk paths and other storage to the same paths and at least the same sizes as on the serv1 server.
  10. On the serv3 server, run the ifxclone command with the --disposition=ER option to clone the data and the configuration of the serv1 server onto the serv3 server:
    ifxclone --trusted --source=serv1 --sourceIP=192.168.0.1 
    --sourcePort=1230 --target=serv3 --targetIP=192.168.0.3 
    --targetPort=1232 --disposition=ER
  11. On the serv4 server, run the ifxclone command with the --disposition=ER option to clone the data and the configuration of the serv1 server onto the serv4 server:
    ifxclone --trusted --source=serv1 --sourceIP=192.168.0.1 
    --sourcePort=1230 --target=serv4 --targetIP=192.168.0.4 
    --targetPort=1233 --disposition=ER
  12. Edit the sqlhosts files on all four servers so that they each have the following information:
    gserv1     group    -                     -     i=143
    serv1      ontlitcp ny.usa.com            1230  g=gserv1
    gserv2     group    -                     -     i=144
    serv2      ontlitcp tokyo.japan.com       1231  g=gserv2
    gserv3     group    -                     -     i=145
    serv3      ontlitcp rome.italy.com        1232  g=gserv3
    gserv4     group    -                     -     i=146
    serv4      ontlitcp perth.australia.com   1233  g=gserv4