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 is a list of the events that are currently available for HotStandby. Most events include five parameters, but not all of those parameters are necessarily used.
SYS_EVENT_HSBCONNECTSTATUS
Event parameters
ENAME WVARCHAR, POSTSRVTIME TIMESTAMP, UID INTEGER, NUMDATAINFO INTEGER, TEXTDATA WVARCHAR
For TEXTDATA, the possible valid values are:
TEXTDATA = {
CONNECTED |
CONNECTING |
CATCHUP |
BROKEN
}
Cause of event
Change in connect status between the Primary and Secondary server.
SYS_EVENT_HSBSTATESWITCH
Event parameters
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
}
Cause of event
Each state switch sends a state switch event.
SYS_EVENT_NETCOPYEND
Event parameters
ENAME WVARCHAR, POSTSRVTIME TIMESTAMP, UID INTEGER, NUMDATAINFO INTEGER, TEXTDATA WVARCHAR
None of the parameters are used.
Cause of event
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
Event parameters
ENAME WVARCHAR, POSTSRVTIME TIMESTAMP, UID INTEGER, NUMDATAINFO INTEGER, TEXTDATA WVARCHAR
None of the parameters are used.
Cause of event
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.