Vous êtes sur la page 1sur 3

April 7, 2017

rstjean
Example 2-target replicaiton configurations/properties for Ustav Banerjee's
Disaster Recovery Course update for OE 11.7.0.

The example files are in the /largedisk/rstjean/disrecov sub-directory.


This file is instructions.txt located in the above directory.
The 11.6.3 databases are in the oe116 sub-directory.
The 11.7.0 databases are in the oe117 sub-directory.
You can ignore the other sub-directories.
The three databases are really the sports2000 sample database, renamed to
db0 (source), db1 (target1) and db2 (target2).
In this configuration, agent0 is the name of the agent for db0, and
agent1 for target db1 and agent2 for target db2.
The generic.pf file has some command line args common to all the replicas.
The addAI.st file is provided, since it's referenced in the properties files.
Note: I had to run prostrct list, edit the .st files to fix up the file
paths, then run prostrct repair on these databases in order to get the
broker to successfully start. This was necessary because the databases were
originally created in other direcotries. If you copy the databases it's
possible you may have to repair the paths also.

Cd into the oe116 or oe117 directory to start the databases.


Commands to start the 2 targets:
_mprosrv -z3 db1 -pf generic.pf -S 20001 -DBService replagent
_mprosrv -z3 db2 -pf generic.pf -S 20002 -DBService replagent
Command to start the source DB:
_mprosrv -z3 db0 -pf generic.pf -S 20000 -DBService replserv
The above ports are in the properties files. The 11.6 and 11.7
databases are configured to use the same three ports: 20000,
20001 and 20002. These ports were not reserved with getaport!
Because the ports are the same, you cannot run both sets of
databases at the same time, unless you edit the properties files
for one of them.

Commands to check the status of replication agents and server:


rprepl db1 -C status agent1 -detail
3049
rprepl db2 -C status agent2 -detail
3049
rprepl db0 -C status server -detail
6021
For agents a normal status is 3049. For the server the normal status is 6021.

OE 11.7.0 has enhanced commands to check the status of replication agents


and server. It prints out a more friendly status description along with
the status number:
rprepl db1 -C status agent1 -verbose
3049: Normal Processing
rprepl db2 -C status agent2 -verbose
3049: Normal Processing
rprepl db0 -C status server -verbose
6021: Normal Processing

I've provided example minimalistic replication property files that


are commonly seen in 11.6.x and previous versions of OE. The file
names all end in "minimal" and are in the oe116 directory.
To use the minimal properties files in 11.6, copy them over:
cp db0.repl.properties.minimal db0.repl.properties
cp db1.repl.properties.minimal db1.repl.properties
cp db2.repl.properties.minimal db2.repl.properties

There are also what the documentation refers to as "combined"


files that have the same layout for replication source and
target databases.
To use the combined properties files in 11.6, copy them over:
cp db0.repl.properties.combined db0.repl.properties
cp db1.repl.properties.combined db1.repl.properties
cp db2.repl.properties.combined db2.repl.properties

The oe117 directory contains the some more full or complete example
property files, using the combined style. These have replication-set
enabled, and define agent0 (see below), and show an example of how to
configure a recovery backup to occur during a transtion. To copy
them over:
cp db0.repl.properties.full117 db0.repl.properties
cp db1.repl.properties.full117 db1.repl.properties
cp db2.repl.properties.full117 db2.repl.properties
I think these properties files would work in 11.6.x also, but I didn't
try them today. OE 11.6.0 will ignore properties it doesn't know,
e.g. replication-set and logging-level.
Please keep in mind that the sample files I provided don't cover
all the various allowed combinations! The ones I provided set up
for manual transtion, and use a role of "reverse". Setting up
auto-transition requries some properties to be set differently. And
my example timeouts are very low. But the overall layout of the
files is the same.
I didn't try transtions with these sample databases, but they should
work. These properties files are used in all my replication testing.
I believe replication in 11.7 expects the more complete properties
files, each target should have a [server] section in case it transtions
to a source. You could verify this with Jeff or Dapeng.
Notes about the 11.7 repl.properties files:
There is a [control-agent.<agentname>] section defining each actual
or potential replicaton agent. These three sections are included in
each replica's property file.
An agent has been configured for db0 in case it's needed. That agent
is named agent0. You would need agent0 running if the original
source database is restored (rebased) and started as a replication
target and expected to join the replication set.
In this example, the control-agents sections in the db1.repl.properties
and db2.repl.properties files do not include a reference to agent0. They
could if you want to, just in case db1 transtions to become the source.
However, the new replserver will then waste time, about 5 minutes, waiting
to connect to agent0 which most likely will not be running.
If db1 or db2 is currently the source database, after a transition
where a role switch occurred, and the original source db0 is rebased,
then it will be necessary to add agent0 into the control-agents
property for db1 and db2. This property is a comma separted list, so
for example to make db1's replserver know about agent0, change
control-agents to "agent0,agent1". After making such property file
change, it is necessary to terminate and retart the replication
server and all agents.
Notice that in the 11.7 configuration I was able to mark agent1
as non-critical, by setting critical=0. If any agent is critical
it must be the first one in the transition-to-agents list. In 11.7
is no longer required to have a critical agent.
The [server] and [agent] sections can now contain a logging-level
property. This a number between 0 and 4, with the default being 0
(no replication logging) and the high value of 4 specifying verbose
replication logging. This logging-level propoerty allows one to override
the logging level from the pmmgr.properties file. Also OE Replication
has a new command in 11.7.0 to temporarily change the logging level on
a running agent or server. The logging level reverts to the value in
the properties file when replication is restarted. Note: I don't
know yet if we will expose the logging-level changes to customers
in 11.7.0. We may wait until 11.7.1 to introduce it.

Vous aimerez peut-être aussi