SQL Guide : System events : Miscellaneous events
  
Miscellaneous events
The miscellaneous events are mostly related to the server’s internal scheduling and housekeeping, such as backups, checkpoints, and merges.
Although you cannot post these events, you can cause events indirectly, for example, when requesting a backup, or when turning on Maintenance Mode in advanced replication setups. You can monitor these events as necessary.
SYS_EVENT_BACKUP
The system has started or completed a backup operation. The “state” parameter (NUMDATAINFO) indicates:
0: backup completed.
1: backup started.
Note that the server also posts a second event (SYS_EVENT_MESSAGES) when it starts or completes a backup.
Parameters: ENAME WVARCHAR, POSTSRVTIME TIMESTAMP, UID INTEGER, NUMDATAINFO INTEGER, TEXTDATA WVARCHAR
SYS_EVENT_BACKUPREQ
A backup operation has been requested (but has not yet started).
If the user application’s callback function returns non-zero, backup is not performed.
This event can be caught by the user only if the user is using shared memory access or linked library access.
None of the parameters are used.
Parameters: ENAME WVARCHAR, POSTSRVTIME TIMESTAMP, UID INTEGER, NUMDATAINFO INTEGER, TEXTDATA WVARCHAR
SYS_EVENT_CHECKPOINT
The system has started or completed a checkpoint operation.
If the system started a checkpoint, then the “state” parameter (NUMDATAINFO) is 1, and the message (TEXTDATA) parameter is “started”.
If the system completed a checkpoint, then the “state” parameter (NUMDATAINFO) is 0, and the message (TEXTDATA) parameter is “completed”.
Parameters: ENAME WVARCHAR, POSTSRVTIME TIMESTAMP, UID INTEGER, NUMDATAINFO INTEGER, TEXTDATA WVARCHAR
SYS_EVENT_CHECKPOINTREQ
A checkpoint operation has been requested (but has not yet started). Checkpoints are typically executed each time a certain number of log writes has completed.
If the user application’s callback function returns non-zero, then the merge is not performed.
This event can be caught by the user only if the user is using shared memory access or linked library access.
None of the parameters are used.
Parameters: ENAME WVARCHAR, POSTSRVTIME TIMESTAMP, UID INTEGER, NUMDATAINFO INTEGER, TEXTDATA WVARCHAR
SYS_EVENT_ERROR
Some type of server error has occurred. The message parameter (TEXTDATA) contains the error text. See Conditions or warnings that cause SYS_EVENT_ERROR for a list of server errors that can cause this event to be posted.
Parameters: ENAME WVARCHAR, POSTSRVTIME TIMESTAMP, UID INTEGER, NUMDATAINFO INTEGER, TEXTDATA WVARCHAR
SYS_EVENT_IDLE
The system is idle.
Some tasks have a priority of “idle” and are only run when the system is not running any other tasks. Because very low priority tasks may be running in an “idle” system, the system is not necessarily truly idle in the sense of not doing anything.
This event can be caught by the user only if the user is using shared memory access or linked library access.
None of the parameters are used.
Parameters: ENAME WVARCHAR, POSTSRVTIMETIMESTAMP, UID INTEGER, NUMDATAINFO INTEGER, TEXTDATA WVARCHAR
SYS_EVENT_IMDB_MEMORY
The system has encountered an event related to in-memory database memory limits.
The NUMDATAINFO parameter indicates the current memory allocation in Kilobytes.
The TEXTDATA parameter can have one of the following values:
IMDB_LIMIT_ABOVE - The amount of available virtual memory is above the limit specified by using the MME.ImdbMemoryLimit parameter
IMDB_LIMIT_ABOVE - The amount of available virtual memory is above the limit specified by using the MME.ImdbMemoryLimit parameter
IMDB_LIMIT_BELOW - The amount of available virtual memory is below the limit specified by using the MME.ImdbMemoryLimit parameter
IMDB_LOW_LEVEL_ABOVE - The amount of available virtual memory is above the limit specified by using the MME.ImdbMemoryLowPercentage parameter
IMDB_LOW_LEVEL_ABOVE - The amount of available virtual memory is above the limit specified by using the MME.ImdbMemoryLowPercentage parameter
IMDB_LOW_LEVEL_ABOVE - The amount of available virtual memory is above the limit specified by using the MME.ImdbMemoryLowPercentage parameter
IMDB_WARNING_LEVEL_ABOVE - The amount of available virtual memory is above the limit specified by using the MME.ImdbMemoryLowPercentage parameter
IMDB_WARNING_LEVEL_BELOW- The amount of available virtual memory is below the limit specified by using the MME.ImdbMemoryLowPercentage parameter
Parameters: ENAME WVARCHAR, POSTSRVTIME TIMESTAMP, UID INTEGER, NUMDATAINFO INTEGER, TEXTDATA WVARCHAR
SYS_EVENT_ILL_LOGIN
There has been an illegal login attempt. The username (TEXTDATA) and userid (NUMDATAINFO) indicate the user who tried to log in.
Parameters: ENAME WVARCHAR, POSTSRVTIME TIMESTAMP, UID INTEGER, NUMDATAINFO INTEGER, TEXTDATA WVARCHAR
SYNC_MAINTENANCEMODE_BEGIN
When the sync mode changes from NORMAL to MAINTENANCE, the server will send this system event. The node_name is the name of the node in which maintenance mode started.
A single solidDB® server can have multiple “nodes” (catalogs).) For more details about sync mode, see SET SYNC MODE.
Parameters: node_name WVARCHAR.
SYNC_MAINTENANCEMODE_END
When the sync mode changes from MAINTENANCE to NORMAL, the server will send this system event. The node_name is the name of the node in which maintenance mode started.
A single solidDB® server can have multiple “nodes” (catalogs).) For more details about sync mode, see SET SYNC MODE.
Parameters: node_name WVARCHAR
SYS_EVENT_MERGE
An event associated with the “merge” operation (merging data from the Bonsai Tree to the main storage tree) has occurred. The parameter STATE (NUMDATAINFO) gives more details:
0: stop the merge
1: start the merge
2: merge progressing
3: merge accelerated.
Parameters: ENAME WVARCHAR, POSTSRVTIME TIMESTAMP, UID INTEGER, NUMDATAINFO INTEGER, TEXTDATA WVARCHAR
SYS_EVENT_MERGEREQ
A merge operation has been requested (but has not yet started).
If the user application’s callback function returns non-zero, the merge is not performed.
This event can be caught by the user only if the user is using shared memory access or linked library access.
None of the parameters are used.
Parameters: ENAME WVARCHAR, POSTSRVTIME TIMESTAMP, UID INTEGER, NUMDATAINFO INTEGER, TEXTDATA WVARCHAR
SYS_EVENT_MESSAGES
This event is posted when the server has a message (error message or warning message) to log to solerror.out or solmsg.out. In this case, the TEXTDATA contains the message text and NUMDATAINFO the code. If the message to be written is an error, both SYS_EVENT_ERROR and SYS_EVENT_MESSAGES will be posted. If the message is only a warning, only SYS_EVENT_MESSAGES is posted. For a list of the warnings that can cause SYS_EVENT_MESSAGES, see Conditions or warnings that cause SYS_EVENT_MESSAGES.
Parameters: ENAME WVARCHAR, POSTSRVTIME TIMESTAMP, UID INTEGER, NUMDATAINFO INTEGER, MESSAGE WVARCHAR
SYS_EVENT_NOTIFY
Event sent with admin command ‘notify’.
Parameters: ENAME WVARCHAR, POSTSRVTIME TIMESTAMP, UID INTEGER, NUMDATAINFO INTEGER, TEXTDATA WVARCHAR
SYS_EVENT_PARAMETER
This event is posted if a configuration parameter is changed with the command
ADMIN COMMAND 'parameter...';
The parameter MESSAGE (TEXTDATA) contains the section name and the parameter name.
Parameters: ENAME WVARCHAR, POSTSRVTIME TIMESTAMP, UID INTEGER, NUMDATAINFO INTEGER, TEXTDATA WVARCHAR
SYS_EVENT_PROCESS_MEMORY
The system has encountered an event related to process size memory limits.
The NUMDATAINFO parameter indicates he current memory allocation in Kilobytes.
The TEXTDATA parameter can have one of the following values:
PROCESS_LIMIT_ABOVE - The amount of available virtual memory is above the limit specified by using the Srv.ProcessMemoryLimit parameter
PROCESS_LIMIT_BELOW - The amount of available virtual memory is below the limit specified by using the Srv.ProcessMemoryLimit parameter
PROCESS_LOW_LEVEL_ABOVE - The amount of available virtual memory is above the limit specified by using the Srv.ProcessMemoryLowPercentage parameter
PROCESS_LOW_LEVEL_BELOW - The amount of available virtual memory is below the limit specified by using the Srv.ProcessMemoryLowPercentage parameter
PROCESS_WARNING_LEVEL_ABOVE - The amount of available virtual memory is above the limit specified by using the Srv.ProcessMemoryWarningPercentage parameter
PROCESS_WARNING_LEVEL_BELOW- The amount of available virtual memory below the limit specified by using the memory is below the limit specified by using the Srv.ProcessMemoryWarningPercentageparameter
Parameters: ENAME WVARCHAR, POSTSRVTIME TIMESTAMP,UID INTEGER, NUMDATAINFO INTEGER, TEXTDATA WVARCHAR
SYS_EVENT_ROWS2MERGE
This event indicates that there are rows that need to be merged from the Bonsai Tree to the main storage tree. The rows parameter (NUMDATAINFO) indicates the number of non-merged rows in the Bonsai Tree.
Parameters: ENAME WVARCHAR, POSTSRVTIME TIMESTAMP, UID INTEGER, NUMDATAINFO INTEGER, TEXTDATA WVARCHAR
SYS_EVENT_SACFAILED
This event is posted when a START AFTER COMMIT (SAC) fails. The application can wait for this event and use the job ID (which is in the NUMDATAINFO field) to retrieve the error message from the system table SYS_BACKGROUNDJOB_INFO. (The job ID in NUMDATAINFO matches the job ID that is returned when the START AFTER COMMIT statement is executed.)
Parameters: ENAME WVARCHAR, POSTSRVTIME TIMESTAMP, UID INTEGER, NUMDATAINFO INTEGER, TEXTDATA WVARCHAR
SYS_EVENT_SHUTDOWNREQ
A shutdown request has been received. If the user application’s callback function returns non-zero, then shutdown is not performed.
This event can be caught by the user only if the user is using shared memory access or linked library access.
None of the parameters are used.
Parameters: ENAME WVARCHAR, POSTSRVTIME TIMESTAMP, UID INTEGER, NUMDATAINFO INTEGER, TEXTDATA WVARCHAR
SYS_EVENT_STATE_MONITOR
This event is posted when monitoring settings are changed.
State (NUMDATAINFO) is one of the following:
0: monitoring off.
1: monitoring on.
UID is the user ID of the user for whom monitoring was turned on or off.
Parameters: ENAME WVARCHAR, POSTSRVTIME TIMESTAMP, UID INTEGER, NUMDATAINFO INTEGER, TEXTDATA WVARCHAR
SYS_EVENT_STATE_OPEN
This event is posted when the “state” of the database is changed. The parameter STATE (NUMDATAINFO) indicates the new state:
0: Closed. No new connections allowed.
1: Opened: New connections allowed.
Parameters: ENAME WVARCHAR, POSTSRVTIME TIMESTAMP, UID INTEGER, NUMDATAINFO INTEGER, TEXTDATA WVARCHAR
SYS_EVENT_STATE_SHUTDOWN
This event is posted when a server shutdown is started. The NUMDATAINFO and TEXTDATA parameters provide no information.
Parameters: ENAME WVARCHAR, POSTSRVTIME TIMESTAMP, UID INTEGER, NUMDATAINFO INTEGER, TEXTDATA WVARCHAR
SYS_EVENT_STATE_TRACE
Server trace is turned on or off with the ADMIN COMMAND 'trace' command.
The parameter STATE (NUMDATAINFO) indicates the new trace state:
0: tracing off.
1: tracing on.
Parameters: ENAME WVARCHAR, POSTSRVTIME TIMESTAMP, UID INTEGER, NUMDATAINFO INTEGER, TEXTDATA WVARCHAR
SYS_EVENT_TMCMD
This event is posted when an “AT” command (that is, a timed command) is executed. The message parameter (TEXTDATA) contains the command.
Parameters: ENAME WVARCHAR, POSTSRVTIME TIMESTAMP, UID INTEGER, NUMDATAINFO INTEGER, TEXTDATA WVARCHAR
SYS_EVENT_TRX_TIMEOUT
This event is not used.
Parameters: ENAME WVARCHAR, POSTSRVTIME TIMESTAMP, UID INTEGER, NUMDATAINFO INTEGER, TEXTDATA WVARCHAR
SYS_EVENT_USERS
The parameter REASON (NUMDATAINFO) contains the reason for the event:
0: User connected.
1: User disconnected.
2: User disconnected abnormally.
4: User disconnected because of timeout.
Parameters: ENAME WVARCHAR, POSTSRVTIME TIMESTAMP, UID INTEGER, NUMDATAINFO INTEGER, TEXTDATA WVARCHAR
See also
System events