PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

  • Dynamic load balancing
  • Managing logs
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Allows you to find out and modify some settings of HFSQL Client/Server server.
Remark: The rights to manage the server are required to use this function. These rights correspond to the hRightsManageServer constant used in HInfoServerRights and HModifyServerRights.
Example
// Disable the management of audit logs for the server
HSetServer("MyConnection", hLogLevel, "")
Syntax

Finding out the value of a parameter Hide the details

<Result> = HSetServer(<Connection> , <Option>)
<Result>: Character string
  • Value of the specified option.
  • Empty string ("") if the option is not defined.
<Connection>: Character string or Connection variable
Connection to the server for which the value of <Option> must be known. This connection corresponds to:
<Option>: Integer constant
Specifies the option to know. These options are stored in the HFConf.ini file, at the root of the server.
List of available options:
hActiveDirectory<Enable> parameter of ACTIVEDIRECTORY section of HFConf.Ini file.
Enable the authentication via Active Directory.
Value:
  • 0, the authentication via Active Directory is not enabled,
  • 1, the authentication via Active Directory is enabled.
hActivityStatisticsPath<StatisticPath> parameter of HFConf.Ini file.
Path of directory containing the files of activity statistics.
hActivityStatisticsPeriod<StatisticPeriod> parameter of HFConf.Ini file.
Indicates the period (in second) between each backup of values for the different activity counters. You have the ability to specify 0 to stop collecting statistics.
hAutoStatisticalCalc<Enable> parameter of AUTOANALYSIS section of HFConf.Ini file.
Enable the automatic calculation of statistics for the data files (optimization of indexes).
Value:
  • 0, the automatic statistical calculation is not enabled,
  • 1, the automatic statistical calculation is enabled.
hCacheNbUnusedFiles<CacheMaxUnusedFiles> parameter of HFConf.Ini file.
Maximum number of unused HFSQL tables that are stored in cache (which means opened) on the server. When this number is reached, the less recent unused table is automatically deleted from the cache.
hDaemonUser<DaemonUser> parameter of HFConf.Ini file.
User name under which the server will operate.
hDatabasePath<DBRootPath> parameter of HFConf.Ini file.
Path of directory containing all databases (which means the data files of different HFSQL Client/Server applications).
hDebuggingPort<WLDebugPort> parameter of HFConf.Ini file.
Port used to debug the stored procedures and the Client/Server triggers.
hFindKey<KeySearch> parameter of HFConf.Ini file.
Enable the search for keys.
Value:
  • 0, the automatic search for keys is not enabled,
  • 1, the automatic search for keys is enabled.
hJNLBackupPath<JNLBackupRootPath> parameter of HFConf.Ini file.
Path of directory containing the backup of logs.
hJNLPath<JNLRootPath> parameter of HFConf.Ini file.
Path of directory containing all the logs of different HFSQL Client/Server applications (history of write operations performed in the HFSQL data files).
hkaInterval<KeepAliveInterval> parameter of HFConf.Ini file.
Maximum time (in seconds) after which, if no communication is established between the server and the client, the server will check the presence of client.
This parameter is set to 30 minutes by default.
hkaTimeout<KeepAliveTimeout> parameter of HFConf.Ini file.
Maximum timeout (in seconds) for the server when checking the presence of client. If the client is not found at the end of this timeout, the client is automatically disconnected.
This parameter is set to 2 minutes by default.
hlbActive<LoadEnable> parameter of HFConf.Ini file.
Indicates whether load balancing is enabled or not.
hlbClientCalls<LoadCoeffCall> parameter of HFConf.Ini file.
Global coefficient for the number of client calls.
hlbDisk<LoadCoeffDisk> parameter of HFConf.Ini file.
Global coefficient for the number of bytes read or written on disk.
hlbDiskAccess<LoadCoeffDiskAccess> parameter of HFConf.Ini file.
Global coefficient for the number of accesses to the disk.
hlbMaxTimeout<LoadMaxWait> parameter of HFConf.Ini file.
Maximum time (in ms) during which a request to the server can be temporarily stopped by the system for load balancing before it is processed.
hlbReceived<LoadCoeffRecv> parameter of HFConf.Ini file.
Global coefficient for the number of bytes received on the network.
hlbSent<LoadCoeffSend> parameter of HFConf.Ini file.
Global coefficient for the number of bytes sent over the network.
hLogLevel<ServerLogLevels> parameter of HFConf.Ini file.
Defines the elements that must be found in the log file.
hLogPath<ServerLogPath> parameter of HFConf.Ini file.
Path of directory containing all the audit log files of server (all the operations requested by the client computers from the server).
hMaxActivityStatisticsSize<ActivityStatisticMaxFileSize> parameter of HFConf.Ini file.
Maximum size of a file for activity statistics (in MB).
hMaxLogSize<ServerLogMaxSize> parameter of HFConf.Ini file.
Maximum size of a log file (in MB).
hMaxNumberConnection<MaximumConnectionsNumber> parameter of the HFConf.ini file
Maximum number of connections allowed per application. This number is determined by the number of applications (processes) with at least one non-super-user connection on the server. For example:
  • an application that has opened a single connection in super-user mode counts as zero.
  • an application that has opened a single connection with a normal user counts as 1.
  • an application that has opened two connections of a normal user counts as 1.
  • an application that has opened super-user and normal user connections counts as 1.
hMode2GB<MoreThan2GB> parameter of HFConf.Ini file.
Specifies whether the size of system tables can exceed 2 GB.
Remark: the operating system must support the files exceeding 2 GB.
hNdxCacheSize<NdxCacheSize> parameter of HFConf.Ini file.
Size of the index cache (in MB). The default value is 10 MB.
hServerPort<AccessPort> parameter of HFConf.Ini file.
Network port used.
hTelemetryEnable<Active> parameter of TELEMETRY section of HFConf.ini file
Configure the transmission of data in order to improve the HFSQL server.
Value:
  • 1 if the transmission of data (telemetry) was enabled when installing the HFSQL server,
  • 0 if the transmission of data (telemetry) was refused when installing the HFSQL server,
  • another value if no choice was made during the setup regarding the use of telemetry. The question will be asked again during the next setup of HFSQL server.
Remark: If the "TELEMETRY" section does not exist in the HFConf.ini file, the transmission of data regarding the use of product is not enabled for the HFSQL server.
hTempDirectory<TmpPath> parameter of HFConf.Ini file.
Path of temporary directory. This directory is used to create the temporary files if necessary (temporary files created when re-indexing large data files for example).
hWindowsDiskCacheSize<WindowsFileCacheSize> parameter of HFConf.ini file
Configure the management of the size for the disk cache of Windows.
Value:
  • -1 for a size that is automatically calculated,
  • 0 for an unlimited cache size,
  • a positive value corresponds to a custom cache size.
Remark: The standard management of Windows disk caches in 64-bit mode (independently from HFSQL) can create memory saturation. This constant is used to customize the management of memory caches.

Modifying the value of a parameter Hide the details

<Result> = HSetServer(<Connection> , <Option> , <Value>)
<Result>: Character string
  • Former value of option,
  • Empty string ("") if an error occurred.
<Connection>: Character string or Connection variable
Connection to the server for which the value of <Option> must be modified. This connection corresponds to:
<Option>: Integer constant
Specifies the option to know. These options are stored in the HFConf.ini file, at the root of the server.
Remark: A detailed description of each parameter is available on the HFConf.ini page
  • List of options for a standard use:
    Remark: The modification made to these options using HSetServer is taken into account without having to restart the server.
    hActiveDirectory<Enable> parameter of ACTIVEDIRECTORY section of HFConf.Ini file.
    Enable the authentication via Active Directory.
    Value:
    • 0, the authentication via Active Directory is not enabled,
    • 1, the authentication via Active Directory is enabled.
    hActivityStatisticsPath<StatisticPath> parameter of HFConf.Ini file.
    Path of files for activity statistics. The path is created on the server if it does not exist.
    The statistics are saved and reinitialized.
    hActivityStatisticsPeriod<StatisticPeriod> parameter of HFConf.Ini file.
    Indicates the period (in seconds) between each backup of values for the different activity counters.
    This value must be greater than or equal to 1 otherwise no modification is performed.
    The statistics are saved and reinitialized.
    You have the ability to specify 0 to stop collecting statistics.
    hAutoStatisticalCalc<Enable> parameter of AUTOANALYSIS section of HFConf.Ini file.
    Enable the automatic calculation of statistics for the data files (optimization of indexes).
    Value:
    • 0, the automatic statistical calculation is not enabled,
    • 1, the automatic statistical calculation is enabled.
    hFindKey<KeySearch> parameter of HFConf.Ini file.
    Enable the search for keys.
    Value:
    • 0, the automatic search for keys is not enabled,
    • 1, the automatic search for keys is enabled.
    hkaInterval<KeepAliveInterval> parameter of HFConf.Ini file.
    Maximum time (in seconds) after which, if no communication is established between the server and the client, the server will check the presence of client.
    This parameter is set to 30 minutes by default.
    hkaTimeout<KeepAliveTimeout> parameter of HFConf.Ini file.
    Maximum timeout (in seconds) for the server when checking the presence of client. If the client is not found at the end of this timeout, the client is automatically disconnected.
    This parameter is set to 2 minutes by default.
    hLogLevel<ServerLogLevels> parameter of HFConf.Ini file.
    Defines the elements that must be in the log file.
    hLogPath<ServerLogPath> parameter of HFConf.Ini file.
    Path of log files. The path is created on the server if it does not exist.
    hMaxActivityStatisticsSize<StatisticMaxFileSize> parameter of HFConf.Ini file
    Maximum size of a file for activity statistics (in MB).
    This value must be greater than or equal to 1 otherwise no modification is performed.
    The statistics are saved and reinitialized.
    hMaxLogSize<ServerLogMaxSize> parameter of HFConf.Ini file.
    Maximum size of a log file (in MB).
    This value must be greater than or equal to 1 otherwise no modification is performed.
    hMaxNumberConnection<MaximumConnectionsNumber> parameter of the HFConf.ini file
    Maximum number of connections allowed per application. This number is determined by the number of applications (processes) with at least one non-super-user connection on the server. For example:
    • an application that has opened a single connection in super-user mode counts as zero.
    • an application that has opened a single connection with a normal user counts as 1.
    • an application that has opened two connections of a normal user counts as 1.
    • an application that has opened super-user and normal user connections counts as 1.
    By default, this parameter is 0 (no limit).
    hNdxCacheSize<NdxCacheSize> parameter of HFConf.Ini file.
    Size of the index cache (in MB).
    This value must be greater than or equal to 1 otherwise no modification is performed.
    hTelemetryEnable<Active> parameter of TELEMETRY section of HFConf.ini file
    Configure the transmission of data regarding the use of HFSQL server in order to improve the product.
    Value:
    • 1 if the transmission of data (telemetry) was enabled when installing the HFSQL server,
    • 0 if the transmission of data (telemetry) was refused when installing the HFSQL server,
    • another value if no choice was made during the setup regarding the use of telemetry. The question will be asked again during the next setup of HFSQL server.
    Remark: If the "TELEMETRY" section does not exist in the HFConf.ini file, the transmission of data regarding the use of product is not enabled for the HFSQL server.
    hTempDirectory<TmpPath> parameter of HFConf.Ini file.
    Path of temporary directory. This directory is used to create the temporary files if necessary (temporary files created when re-indexing large data files for example).
    The path is created on the server if it does not exist.
  • List of options for an advanced use:
    Remark: The modification of these options using HSetServer will be taken into account the next time the server starts.
    hDaemonUser<DaemonUser> parameter of HFConf.Ini file.
    User name that will be used by the server.
    hDatabasePath<DBRootPath> parameter of HFConf.Ini file.
    Path of the directory containing all the databases (which means the data files of different HFSQL Client/Server applications).
    The path is created on the server if it does not exist when restarting the server.
    hJNLBackupPath<JNLBackupRootPath> parameter of HFConf.Ini file.
    Path of directory containing the backup of logs.
    The path is created on the server if it does not exist when restarting the server.
    hJNLPath<JNLRootPath> parameter of HFConf.Ini file
    Path of the directory containing all the logs of the different HFSQL Client/Server applications.
    The path is created on the server if it does not exist when restarting the server.
    hMode2GB<MoreThan2GB> parameter of HFConf.Ini file.
    Specifies whether the size of system tables can exceed 2 GB.
    Remark: the operating system must support the files exceeding 2 GB.
    hServerPort<AccessPort> parameter of HFConf.Ini file.
    Network port used.
    hWindowsDiskCacheSize<WindowsFileCacheSize> parameter of HFConf.ini file
    Mode for managing the size of Windows disk cache.
    Value:
    • -1 for a size that is automatically calculated,
    • 0 for an unlimited cache size,
    • a positive value indicates a custom cache size.
    Remark: The standard management of Windows disk caches in 64-bit mode (independently from HFSQL) can create memory saturation. This constant is used to customize the management of memory caches.
  • List of options for load balancing:

    Remark: The modification made to these options using HSetServer is taken into account without having to restart the server.
    hlbActive<LoadEnable> parameter of HFConf.Ini file.
    Indicates whether load balancing is enabled or not.
    • True if the load balancing must be enabled,
    • False otherwise.
    hlbClientCalls<LoadCoeffCall> parameter of HFConf.Ini file.
    Global coefficient for the number of client calls.
    This value (included between -100 and 100) increases or reduces the coefficient applied to the counter for the client calls to the server.
    hlbDisk<LoadCoeffDisk> parameter of HFConf.Ini file.
    Global coefficient for the number of bytes read or written on disk.
    This value (included between -100 and 100) increases or reduces the coefficient applied to the counter for the bytes read or written on disk by the server.
    hlbDiskAccess<LoadCoeffDiskAccess> parameter of HFConf.Ini file.
    Global coefficient for the number of accesses to the disk.
    This value (included between -100 and 100) increases or reduces the coefficient applied to the counter for the number of disk accesses.
    hlbMaxTimeout<LoadMaxWait> parameter of HFConf.Ini file.
    Maximum time (in ms) during which a request to the server can be temporarily stopped by the system for load balancing before it is processed.
    hlbReceived<LoadCoeffRecv> parameter of HFConf.Ini file.
    Global coefficient for the number of bytes received on the network.
    This value (included between -100 and 100) increases or reduces the coefficient applied to the counter for the bytes received by the server.
    hlbSent<LoadCoeffSend> parameter of HFConf.Ini file.
    Global coefficient for the number of bytes sent over the network.
    This value (included between -100 and 100) increases or reduces the coefficient applied to the counter for the bytes sent by the server.
<Value>: Variant
New value for the specified option.
Remarks

Dynamic load balancing

The coefficients are used to modify the importance of each counter in the formula for calculating the load generated by a user on the server.
  • A value equal to 1, 0 or -1 does not modify the coefficient.
  • A value greater than 100 is equivalent to 100.
  • A value less than -100 is equivalent to -100.

Managing logs

The information about the logs can be modified without restarting the server. We advise you to modify the path of logs before they are enabled. Otherwise, the logs will be written in the default directory between the activation and the change of path.
Related Examples:
The HSetServer function Unit examples (WINDEV): The HSetServer function
[ + ] Using the HSetServer of WINDEV.
This function is used to modify some parameters on the HFSQL server.
It allows you to configure your server more efficiently.
Business / UI classification: Business Logic
Component: wd270hf.dll
Minimum version required
  • Version 11
This page is also available for…
Comments
Click [Add] to post a comment