High Availability Guide : HotStandby system events
  
HotStandby system events
This section covers only HSB-specific events. For a discussion of other types of events, see other manuals, such as solidDB® SQL Guide,
Each HotStandby operation generates an event. To monitor these events you can use an application, such as a watchdog application.
Events are objects with a name that signal that a specific action occurred in the server. Special statements in stored procedures are required to receive events. HotStandby events are no different from other events created and supported by solidDB®. They are sent to those users who are registered to receive the event in a stored procedure. For details on posting, registering, and waiting for events, read “Stored Procedures, Events, Triggers, and Sequences”, in solidDB® SQL Guide, and solidDB® SQL Syntax, also insolidDB® SQL Guide.
The following table lists the events that are currently available for HotStandby. Note that most events include five parameters, but not all of those parameters are necessarily used.
HSB Event
Event parameters
Cause of event
SYS_EVENT_
HSBCONNECTSTATUS
ENAME WVARCHAR, POSTSRVTIME TIMESTAMP, UID INTEGER, NUMDATAINFO INTEGER, TEXTDATA WVARCHAR
For TEXTDATA, the possible valid values are:
TEXTDATA = {
CONNECTED |
CONNECTING |
CATCHUP |
BROKEN
}
Change in connect status between the Primary and Secondary server
SYS_EVENT_
HSBSTATESWITCH
ENAME WVARCHAR, POSTSRVTIME TIMESTAMP, UID INTEGER, NUMDATAINFO INTEGER, TEXTDATA WVARCHAR
For TEXTDATA, the possible valid values are:
TEXTDATA = {
PRIMARY ACTIVE |
PRIMARY ALONE |
PRIMARY UNCERTAIN |
SECONDARY ACTIVE |
SECONDARY ALONE |
STANDALONE
}
Each state switch sends a state switch event.
SYS_EVENT_NETCOPYEND
ENAME WVARCHAR, POSTSRVTIME TIMESTAMP, UID INTEGER, NUMDATAINFO INTEGER, TEXTDATA WVARCHAR
None of the parameters are used.
HotStandby NETCOPY operation ended.
This event can be caught by the user only if the user is using shared memory access or linked library access.
SYS_EVENT_NETCOPYREQ
ENAME WVARCHAR, POSTSRVTIME TIMESTAMP, UID INTEGER, NUMDATAINFO INTEGER, TEXTDATA WVARCHAR
None of the parameters are used.
A HotStandby NETCOPY was requested.
If the user application's callback function returns non-zero, then netcopy is not performed.
This event can be caught by the user only if the user is using shared memory access or linked library access.