IBM 000-8697 Manual Do Utilizador

Página de 702
Product Environment
9-23
Two-Phase Commit and Automatic Recovery
Two-Phase Commit and Automatic Recovery
The two-phase commit protocol includes automatic recovery in the event of
an uncontrolled shutdown (such as an operating-system failure) experienced
by either the coordinator or a participant OnLine database server. Two types
of recovery mechanics are included in the two-phase commit protocol:
If your OnLine database server is configured for
IBM I
nformix
STAR
and you
experience a failure, you must restart the sqlexecd daemon when you reini-
tialize. To do this, log in as root and enter the following commands at the
system prompt when you are ready to reinitialize OnLine:
tbmode -ky ## Ensure all processes are terminated
 ## and shared memory has been detached.
tbinit
## Reinitialize shared memory and start
 ## OnLine in online mode. Use tbinit -s
 ## to start OnLine in quiescent mode.
sqlexecd
## Restart the INFORMIX-STAR daemon.
The sqlexecd command can take a servicename argument, although a default
is assumed. For more information about the servicename value for your
OnLine database server, refer to the
IBM I
nformix
NET
and
IBM I
nformix
STAR
I
nstallation and
C
onfiguration
G
uide. (The servicename value is stored in the
$
INFORMIXDIR
/etc/sqlhosts
 file.)
Coordinator Recovery
Coordinator recovery occurs automatically whenever a database server
process acting as coordinator completes the precommit phase and decides to
commit the transaction, but is terminated before the two-phase commit
protocol can be completed. During coordinator recovery, a new coordinator
database server process is spawned to complete the two-phase commit
protocol and ensure that the transaction is completed by every participating
OnLine database server.
recovery.
Coordinator
recovery
The coordinating database server process is terminated
prematurely.
Participant
recovery
The database server process at a participating OnLine
database server is terminated prematurely.