Janus Two-Phase Commit: Difference between revisions
(Created page with "Janus Two-Phase Commit support allows transactions running in multiple <var class="product">Model 204</var> Onlines to participate in a single global transaction using the [ht...") |
|||
Line 19: | Line 19: | ||
</li> | </li> | ||
</ol> | </ol> | ||
==Recovery== | |||
When running recovery (the [[RESTART command]] or the [[REGENERATE command]]) against journals that might contain global transactions, a JANUS 2PC port must be defined and a coordinator added to that port before the <var>RESTART</var> or <var>REGENERATE</var> command as in: | |||
<p class="code">JANUS NAMESERVER 12.34.56.78 | |||
JANUS DEFINE TWOPC * 2PC 5 SSL 0 | |||
JANUS ADDCOORD TWOPC IMGCOORD IMGSERV.MYDOMAIN.COM 3333 | |||
JANUS ADDCA TWOPC PROCFILE TWOPC.CA | |||
JANUS START TWOPC | |||
RESTART ROLL BACK ERROR STOP ROLL FORWARD | |||
</p> | |||
If, as in this example, a certificate must be retrieved from a procedure file, it would be a really bad idea for that procedure file be a file that needs to be recovered. |
Revision as of 05:09, 14 January 2020
Janus Two-Phase Commit support allows transactions running in multiple Model 204 Onlines to participate in a single global transaction using the two-phase commit protocol. In addition, it enables Model 204 to participate in a global transaction with an Imagine database server. An Imagine Two-Phase Commit Coordinator is required to act as the two-phase commit coordinator. JANUS commands are used to define and start a two-phase commit port. Since there is no way to specify a 2PC port on two-phase commit related statements and functions, there is no point in specifying more than one 2PC port – if more than one is specified the first started 2PC port is always used.
Configuring Janus Two-Phase Commit
These are the configuaration steps:
- Using a JANUS DEFINE command, define a Janus 2PC that will be used to communicate with the coordinator.
The following is a typical command for a two-phase commit port:
JANUS DEFINE TWOPC * 2PC 10
- Specify the host address or name and port number for the coordinator. This is done with the JANUS ADDCOORDINATOR command as in:
JANUS ADDCOORDINATOR TWOPC IMAGINE IMAGINEHOST.MYDOMAIN.COM 3456
If, as in this example, the coordinator host is specified as a name, a name server must be specified using the JANUS NAMESERVER command.
Recovery
When running recovery (the RESTART command or the REGENERATE command) against journals that might contain global transactions, a JANUS 2PC port must be defined and a coordinator added to that port before the RESTART or REGENERATE command as in:
JANUS NAMESERVER 12.34.56.78 JANUS DEFINE TWOPC * 2PC 5 SSL 0 JANUS ADDCOORD TWOPC IMGCOORD IMGSERV.MYDOMAIN.COM 3333 JANUS ADDCA TWOPC PROCFILE TWOPC.CA JANUS START TWOPC RESTART ROLL BACK ERROR STOP ROLL FORWARD
If, as in this example, a certificate must be retrieved from a procedure file, it would be a really bad idea for that procedure file be a file that needs to be recovered.