Replication Sets. - Forum - OpenEdge RDBMS - Progress Community
 Forum

Replication Sets.

This question is answered

Been trying for a few days to set up a Replication Set. Cant find anything useful in the documentation. Am i missing something? It tells me using three different terminologies (Replication-Set,Inter-Agent Communication,Target Sync) that i can do what i want to do. But no examples and no properties listed that i can find.

Trying to get three databases in a replication set. Anyone got a guide/tutorial with some example Repl.Properties files?

Verified Answer
  • Hi Jason,
     
    The error is indicating that there is an issue with seeding the target(s).  Below is an outline of steps for
    enabling a source and creating two targets.
     
    -jeff
     
    # Add AI extents to source, if needed
    prostrct add srcdb addai.st
    rfutil srcdb -C aimage truncate -aiblocksize 16
     
    # Start AI on source, if needed rfutil srcdb -C mark backedup -G 0
    rfutil srcdb -C aimage begin
     
    # Enable replication for the source database
    proutil srcdb -C enablesitereplication source
    # Make back up of source
    probkup srcdb srcdb.bak
     
    # Restore the source database to the targets
    prorest tgtdb1 srcdb.bak
    prorest tgtdb2 srcdb.bak
     
    # If needed, add AI extents to target dbs
    prostrct add tgtdb1 addai.st
    prostrct add tgtdb2 addai.st
     
    # If needed, start AI on targets
    rfutil tgtdb1 -C aimage begin
    rfutil tgtdb2 -C aimage begin
     
    # Enable the target databases for replication
    proutil tgtdb1 -C enablesitereplication target
    proutil tgtdb2 -C enablesitereplication target
     
    # Copy source properties file to same directory as srcdb
    # Copy target1 properties file to same directory as tgtdb1
    # Copy target2 properties file to same directory as tgtdb2
     
    # Start first target
    proserve tgtdb1 -DBService replagent -S 6600
    proapw tgtdb1
    probiw tgtdb1
     
    # Start second target
    proaiw tgtdb1
    proserve tgtdb2 -DBService replagent -S 6500
    proapw tgtdb2
    probiw tgtdb2
    proaiw tgtdb2
     
    # Start source (sizing pica for testing purposes)
    proserve srcdb -DBService replserv -pica 8192
    proapw srcdb
    probiw srcdb
    proaiw srcdb
     
All Replies
  • Hi Jason,
     
    The first step would be to configure and enable AI on both targets.  Once this is done, you can enable
    The configuration as a Replication Set in the Transition section of the properties files.  I’ve put properties
    for source and both targets below that provide an example of a Replication Set property file configuration.
     
     
    -jeff
     
    Source properties:
     
    [server]
      control-agents=agent1,agent2
      database=db0
      agent-shutdown-action=recovery
      defer-agent-startup=5
      transition=manual
      transition-timeout=5
    [control-agent.agent1]
      name=agent1
      database=db1
      host=localhost
      port=6600
      replication-method=async
      critical=0
      connect-timeout=120
    [control-agent.agent2]
      name=agent2
      database=db2
      host=localhost
      port=6500
      replication-method=async
      critical=0
      connect-timeout=120
    [transition]
      replication-set=1
      database-role=reverse
      transition-to-agents=agent1,agent2
      restart-after-transition=1
      start-secondary-broker=0
      normal-startup-arguments=-S 51876
      source-startup-arguments=-S 51876 -DBService replserv
      target-startup-arguments=-S 51876 -DBService replagent
    [agent]
      name=agent0
      database=db0
      listener-minport=4387
      listener-maxport=4500
     
     
    First Target’s properties:
     
    [server]
      control-agents=agent1,agent2
      database=db1
      agent-shutdown-action=recovery
      defer-agent-startup=5
      transition=manual
      transition-timeout=5
    [control-agent.agent1]
      name=agent1
      database=db0
      host=localhost
      port=6600
      replication-method=async
      critical=0
      connect-timeout=120
    [control-agent.agent2]
      name=agent2
      database=db2
      host=localhost
      port=6500
      replication-method=async
      critical=0
      connect-timeout=120
    [transition]
      replication-set=1
      database-role=reverse
      transition-to-agents=agent1,agent2
      restart-after-transition=1
      start-secondary-broker=0
      normal-startup-arguments=-S 51877
      source-startup-arguments=-S 51877 -DBService replserv
      target-startup-arguments=-S 51877 -DBService replagent
    [agent]
      name=agent1
      database=db1
      listener-minport=4387
      listener-maxport=4500
     
     
    Second Target properties:
     
    [server]
      control-agents=agent1,agent2
      database=db2
     agent-shutdown-action=recovery
      defer-agent-startup=5
      transition=manual
      transition-timeout=20
    [control-agent.agent1]
      name=agent1
      database=db1
      host=localhost
      port=6600
      replication-method=async
      critical=0
      connect-timeout=120
    [control-agent.agent2]
      name=agent2
      database=db0
      host=localhost
      port=6500
      replication-method=async
      critical=0
      connect-timeout=120
    [transition]
      replication-set=1
      database-role=reverse
      transition-to-agents=agent1,agent2
      restart-after-transition=1
      start-secondary-broker=0
      normal-startup-arguments=-S 51878
      source-startup-arguments=-S 51878 -DBService replserv
      target-startup-arguments=-S 51878 -DBService replagent
    [agent]
      name=agent2
      database=db2
      listener-minport=4387
      listener-maxport=4500
     
     
     
  • Hey Jeff,

    I have tried with your config and still get errors.

    Can you post up a step by step guide from having one single database to having three in a replication set including enabling AI on the targets etc.

    I think my error lies with the backup im using to generate the targets but cant be sure.

    This is the error in source.

    [2017/07/31@10:03:30.511+0100] P-8466       T-140242165417792 I RPLS    5: (-----) [19110] This source database cannot be replicated to agent1

  • Hi Jason,
     
    The error is indicating that there is an issue with seeding the target(s).  Below is an outline of steps for
    enabling a source and creating two targets.
     
    -jeff
     
    # Add AI extents to source, if needed
    prostrct add srcdb addai.st
    rfutil srcdb -C aimage truncate -aiblocksize 16
     
    # Start AI on source, if needed rfutil srcdb -C mark backedup -G 0
    rfutil srcdb -C aimage begin
     
    # Enable replication for the source database
    proutil srcdb -C enablesitereplication source
    # Make back up of source
    probkup srcdb srcdb.bak
     
    # Restore the source database to the targets
    prorest tgtdb1 srcdb.bak
    prorest tgtdb2 srcdb.bak
     
    # If needed, add AI extents to target dbs
    prostrct add tgtdb1 addai.st
    prostrct add tgtdb2 addai.st
     
    # If needed, start AI on targets
    rfutil tgtdb1 -C aimage begin
    rfutil tgtdb2 -C aimage begin
     
    # Enable the target databases for replication
    proutil tgtdb1 -C enablesitereplication target
    proutil tgtdb2 -C enablesitereplication target
     
    # Copy source properties file to same directory as srcdb
    # Copy target1 properties file to same directory as tgtdb1
    # Copy target2 properties file to same directory as tgtdb2
     
    # Start first target
    proserve tgtdb1 -DBService replagent -S 6600
    proapw tgtdb1
    probiw tgtdb1
     
    # Start second target
    proaiw tgtdb1
    proserve tgtdb2 -DBService replagent -S 6500
    proapw tgtdb2
    probiw tgtdb2
    proaiw tgtdb2
     
    # Start source (sizing pica for testing purposes)
    proserve srcdb -DBService replserv -pica 8192
    proapw srcdb
    probiw srcdb
    proaiw srcdb
     
  • Worked! You're a star Jeff.

  • For those of us that have 24 by 7 operation, could we move  # Start source before the backup and make online backup.

    # Enable replication for the source database

    proutil srcdb -C enablesitereplication source

    # Start source (sizing pica for testing purposes)

    proserve srcdb -DBService replserv -pica 8192

    proapw srcdb

    probiw srcdb

    proaiw srcdb

    # Make online back up of source

    probkup online srcdb srcdb.bak

    Will the rest be the same then?  

    Dmitri Levin

    Alphabroder

  • Hi Dmitri,
     
    Yes, you can move the start of the source before the back up and then make the online backup.
    You would want to consider using the defer-agent-startup property to accommodate the time
    it takes to do the back up and seed the targets. 
     
    -jeff
     
  • Yes, of course defer-agent-startup is a must in that case.

    [server]

    defer-agent-startup=5760

    Thank Jeff

    Dmitri Levin

    Alphabroder