PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • History of incidents/notifications
  • Overview
  • History of notifications displayed in the HFSQL Control Center
  • Accessing the history of notifications by programming
  • Receiving the notifications (by email or WDBal)
  • Overview
  • HFSQL Control Center
  • Programming
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview
A HFSQL server can perform several operations that require to send a notification:
  • A server may encounter problems without any user (or developer) noticing anything.
    For example:
    • a scheduled task may fail.
    • an automatic backup may fail.
    • a node may become inactive in a HFSQL cluster, ...
  • Versions 22 and later
    A server can also perform operations automatically (automatic update, search for keys to optimize the queries, ...). The implementation and the status report of these operations require a notification.
    New in version 22
    A server can also perform operations automatically (automatic update, search for keys to optimize the queries, ...). The implementation and the status report of these operations require a notification.
    A server can also perform operations automatically (automatic update, search for keys to optimize the queries, ...). The implementation and the status report of these operations require a notification.
The HFSQL Control Center is used to:
Note: These operations are also available by programming.
Note: From version 19, HFSQL is the new name of HyperFileSQL.
History of incidents/notifications

Overview

A notification is created for each problem that occurs on the HFSQL server. The characteristics of this notification are as follows:
  • Date and time of incident.
  • Message presenting the incident.
  • Category of incident: Information, Warning, Critical, Error.
    • Versions 22 and later
      Information: Information about the events that occurred on the server.
      Example:
      • Automatic update of HFSQL server with reboot.
      • Suggestion for adding keys and composite keys to optimize the execution time of queries.
      New in version 22
      Information: Information about the events that occurred on the server.
      Example:
      • Automatic update of HFSQL server with reboot.
      • Suggestion for adding keys and composite keys to optimize the execution time of queries.
      Information: Information about the events that occurred on the server.
      Example:
      • Automatic update of HFSQL server with reboot.
      • Suggestion for adding keys and composite keys to optimize the execution time of queries.
    • Warning: Events that do not trigger a failure but about which something must be done.
      Example: Resolution of a modification conflict for the replication. If several of them occur, the architecture of the application may have to be changed (otherwise, there is no need to worry).
    • Critical: Failures for which no error can be returned to the user.
      Examples: WLanguage error in a stored procedure used by a scheduled task, failure of the connection to a replicated server, ...
    • Error: Problem regarding the management of Windows cache.
The history of notifications can be viewed:
  • from the HFSQL Control Center.
  • by programming.

History of notifications displayed in the HFSQL Control Center

The HFSQL Control Center allows you to view the history of incidents that occurred on the sever.
To see this history:
  1. Start the HFSQL Control Center.
  2. Select the requested server.
  3. Display the "Notifications" tab.
  4. The list of notifications sent by the server is displayed. You can:
    • delete a notification.
    • refresh the list.

Accessing the history of notifications by programming

The history of notifications is saved in a HFSQL file found in the system database of the server: "Alert.fic".
This data file can be handled by programming as follows:
PROCÉDURE HFCS_RetrieveNotifications(sServer, sUser="Admin", sPassword="", bCleanup=False)

oNotif is STNotif
arrReturn is array of STNotif

ctConnection is Connection
ctConnection..Provider = hAccessHFClientServer
ctConnection..Server = sServer
ctConnection..User = sUser
ctConnection..Password = sPassword
ctConnection..Database = "__System"

dsAlert is Data Source
IF HDeclareExternal("Alert.fic", dsAlert, ctConnection) THEN
FOR EACH dsAlert ON Date
oNotif:dtDateTime = dsAlert.Date
oNotif:nLevel = dsAlert.Level
oNotif:sMessage = dsAlert.Message
Add(arrReturn, oNotif)
IF bCleanup THEN
HDelete(dsAlert)
END
END
HCancelDeclaration(dsAlert)
HCloseConnection (ctConnection)
ELSE
Error("Error while retrieving the notifications: " + HErrorInfo(hErrFullDetails))
END

RESULT arrReturn
PROCÉDURE HFCS_RetrieveLastNotifications(sServer, sUser="Admin", sPassword=""): string
// Parameters for connecting to the server whose last notification must be retrieved
ctConnection is Connection
ctConnection..Provider = hAccessHFClientServer
ctConnection..Server = sServer
ctConnection..User = sUser
ctConnection..Password = sPassword
ctConnection..Database = "__System"

// By default, don't return anything
RETURN = ""
// Files of server notifications
dsAlert is Data Source
IF HDeclareExternal("Alert.fic", dsAlert, ctConnection) THEN
// Last notification in date
IF HReadLast(sdAlert,Date) THEN
// Retrieves the record
RETURN = HRetrieveRecord(sdAlert)
END
// Frees the declared file
HCancelDeclaration(dsAlert)
// Frees the connection
HCloseConnection (ctConnection)
ELSE
// Failure accessing the server
Error("Error while retrieving the notifications: " + HErrorInfo(hErrFullDetails))
END
Receiving the notifications (by email or WDBal)

Overview

By default, the notifications are found in the HFSQL Control Center. You can also be notified in real time when a problem occurs on the HFSQL server. All you have to do is configure the notification system of the HFSQL server.
This configuration can be performed:
  • via the HFSQL Control Center.
  • by programming.

HFSQL Control Center

To configure the sending of HFSQL notifications from the HFSQL Control Center:
  1. Start the HFSQL Control Center.
  2. Select the requested server.
  3. Display the "Configuration" tab. In the ribbon, in the "Parameters" group, click "Server configuration".
  4. In the list of possible configurations, click "Notifications". The window for configuring the notifications is displayed:
    Configuration of notifications
    In the list of possible configurations, click "Notifications". The window for configuring the notifications is displayed:
    Configuration of notifications
  5. Configure the modes for sending notifications:
    • in the "Configuration of SMTP server for sending by email" section, specify the characteristics of the SMTP server that will be used to send the notifications by email. in the "Send by email" tab, specify the characteristics of the SMTP server that will be used to send the notifications by email.
    • in the "Configuration of Control Centers for sending by messaging (WDBal)" section, specify the characteristics of the database of Control Centers that will be used to send the notifications.in the "Send by messaging (WDBal)" section, specify the characteristics of the database of Control Centers that will be used to send the notifications.
    Notes:
    • The "Retrieve the computer configuration" button is used retrieve the configuration of the current computer.
    • The database of Control Centers can be in Classic or in Client/Server mode.
  6. Create the recipients of notifications:
    • The button is used to add a recipient for the sending by email. Specify the email address of the recipient and validate.
    • The button is used to add a recipient for the sending via the messaging (WDBal) of Control Centers. Select the relevant recipients and validate.
    • In the list of recipients, for each recipient, select the minimum severity level of the incidents for which you want to send notifications.
  7. Click the "Apply" button to validate the configuration.

Programming

Several WLanguage functions can be used to configure the sending of HFSQL notifications by programming:
Versions 18 and later
HNotifAddCCRecipient
New in version 18
HNotifAddCCRecipient
HNotifAddCCRecipient
Adds recipients for the notifications sent via the Control Centers (WDBal messaging tool).
Versions 18 and later
HNotifAddEmailRecipient
New in version 18
HNotifAddEmailRecipient
HNotifAddEmailRecipient
Adds recipients for the notifications sent by email.
Versions 18 and later
HNotifConfigure
New in version 18
HNotifConfigure
HNotifConfigure
Specifies and configures the server used to send notifications by the HFSQL server.
Versions 18 and later
HNotifDeleteCCRecipient
New in version 18
HNotifDeleteCCRecipient
HNotifDeleteCCRecipient
Deletes the recipients of a notification sent via the Control Centers (WDBal messaging tool).
Versions 18 and later
HNotifDeleteEmailRecipient
HNotifDeleteEmailRecipient
Deletes the recipients of a notification by email.
Versions 18 and later
HNotifListCCRecipient
New in version 18
HNotifListCCRecipient
HNotifListCCRecipient
Returns the list of recipients for a notification sent via the Control Centers (WDBal messaging tool).
Versions 18 and later
HNotifListEmailRecipient
New in version 18
HNotifListEmailRecipient
HNotifListEmailRecipient
Returns the list of recipients for a notification by email.
Minimum required version
  • Version 18
This page is also available for…
Comments
Click [Add] to post a comment