FairCom DB Configuration Options

FairCom DB is extremely flexible and can be configured for nearly any environment.

Particularly common configurations include security controls, memory usage, performance options and transaction log management. File control options such as memory files, encryption and compression can also be centrally managed.

This flexibility comes with great responsibility. It is important end-user installations exactly follow application vendor recommendations for maintained performance and reliability. It is never advised to change production server settings without first confirming desired results in development settings. Catastrophic data loss can result from a mis-configured FairCom Server.

The keyword descriptions that follow use the nomenclature format in this table:

< input value >

An input value for the keyword. Replace with the value desired. For example, COMMIT_DELAY <milliseconds> would be put in the configuration file as COMMIT_DELAY 10 to delay 10 milliseconds.

< value1 | value2 >

The | character indicates that either value1 or value2 can be used as described above, but not both together. For example, ADMIN_ENCRYPT <YES | NO> can be entered as either ADMIN_ENCRYPT YES or ADMIN_ENCRYPT NO.

 

SUBSYSTEM

SUBSYSTEM is a reserved word that is used to group entries in the configuration file. It indicates the start of a group of related keywords called a "subsystem." It cannot be used on its own.

In V11.5 and later, FairCom Server supports commenting out a SUBSYSTEM block in ctsrvr.cfg by commenting out just the line containing the SUBSYSTEM keyword. Prior to this enhancement, each line of the SUBSYSTEM block had to be commented out. Now an entire SUBSYSTEM block can be commented as shown below:

 

;SUBSYSTEM EVENT DISK_FULL_ACTION {

volume VOLUME

limit LIMIT

run EXE [OPTIONS]

freq FREQUENCY

maxruntime MAXRUNTIME

}

 

Basic Configuration

The basic keywords are listed below. Each keyword links to a complete description along with legal and default values of each configuration option. The complete descriptions can be found in the section titled Basic Options.

Under normal circumstances, your configuration file should consist primarily of these keywords. The keywords listed in the other sections are restricted to more advanced configurations and should be used with caution.

 
COMMENTS

Denotes that the remainder of the ctsrvr.cfg file is for documentation purposes only

 
COMM_PROTOCOL

Specifies a communications module loaded by the server.

 
CONNECTIONS or USERS

The maximum number of connections to the FairCom Server.

 
DAT_MEMORY

The memory allocated to the data cache in bytes.

 
DUMP

The name of a dynamic dump script file specifying when to begin and what to include in a dynamic dump.

 
FILES

The maximum number of files to be open at one time.

 
GUEST_LOGON

Controls whether or not to permit GUEST logons when no user ID is sent to the FairCom Server.

 
IDX_MEMORY

The memory allocated to the index cache in bytes.

 
LOCAL_DIRECTORY

Supplies the FairCom Server with the name of a directory path for processing files without absolute names.

 
MAX_DAT_KEY

Maximum number of indexes per data file.

 
MAX_KEY_SEG

Maximum number of key segments allowed per index.

 
SERVER_NAME

Assigns a name to the FairCom Server instead of the default name.

 
SERVER_PORT

Specifies the TCP/IP Port of the server rather than using the SERVER_NAME keyword method.

 

AUTO_TRANDEP

AUTO_TRANDEP YES | NO

Configure the automatic transaction dependent file option for ctTRNLOG files. When YES is specified, the transaction dependent mode (ctTRANDEP) is enabled for all newly created data and index files that are under full transaction control (using the ctTRNLOG file mode).

Default: YES

 

COMMENTS

COMMENTS

Denotes that the remainder of the ctsrvr.cfg file is for documentation purposes only and is not to be used. The server ignores any remaining keywords. Comment individual lines by placing a semi-colon, ‘;’, at the beginning of the line.

Default: Off

 

CONNECTIONS or USERS

CONNECTIONS <Number of Connections>

The maximum number of connections to the FairCom Server. Typically, a FairCom Server is activated to support up to one of the following values for concurrent user connections: 8, 16, 32, 64, 128, 256, 512, or 1024. However, your particular FairCom Server may be customized with a different value for connections. Specifying a number of users greater than the actual number of users needed results in inefficiencies (e.g., unused memory), so the goal is to keep this number as low as feasible on the system. The Activation Key flier displays the allowable number of users for your FairCom Server, as does the FairCom Server startup screen.

Default: Activated number of connections in the license

 

CPU_AFFINITY

CPU_AFFINITY <cpu list>

Windows

On Windows and Linux systems, CPU_AFFINITY server keyword can be used to set the processor affinity mask for the FairCom DB process.

The option accepts a comma-delimited list of specific CPU cores to assign. For example: CPU_AFFINITY 0,1,2,3,8,9,10,11 indicates that FairCom DB is to be run on the eight specified CPUs.

If FairCom DB successfully sets the CPU affinity to the specified CPUs, the following message is logged to CTSTATUS.FCS, where <cpulist> is the list of CPUs specified for the CPU_AFFINITY option:

Successfully set CPU affinity to: <cpulist>

The following error situations can occur when using the CPU_AFFINITY option:

If the list of CPUs specifies a CPU number that is out of range on the system, a message is logged to CTSTATUS.FCS:

Configuration error: <config_file_name>, line <line_number>: The CPU_AFFINITY option specifies an invalid CPU number for this system.

Linux

CPU license check is now supported on Linux as of V12, though the check itself currently supports only logical CPU counts.

The option accepts a comma-delimited list of specific CPU cores to assign. For example: CPU_AFFINITY 0,1,2,3,8,9,10,11 indicates that FairCom DB is to be run on the eight specified CPUs.

The CPU_AFFINITY server keyword can be used to restrict the server process to a set of CPU IDs (as has existed for Windows since V8). CPU_AFFINITY is limited to a maximum CPU ID range of 0-31. If you need binding to larger CPU ID numbers, you must use system tools to do so.

Solaris

On Solaris systems, CPU_AFFINITY accepts a comma-delimited list of specific CPU cores to assign. For example: CPU_AFFINITY 0,1,2,3,8,9,10,11 indicates that FairCom DB is to be run on the eight specified CPUs.

 

Note: To use CPU_AFFINITY under Solaris you need to run the FairCom DB Server with root permission. This because Solaris requires any process using a processor set to have such permission.

To create a processor set on Solaris, use the Solaris command psrset. For example, to create a set comprising processors 4 through 7, use:

psrset -c 4-7

where:

  • -c - Create processor set.
  • 4-7 - The processor numbers included in the set.

The ID of the newly created processor set is returned:

created processor set ps_id

To bind a process to this processor set, use:

psrset -b ps_id pid

where:

  • -b - Bind.
  • ps_id - The ID returned by the command when the processor set was created.
  • pid - The ID of the process to be bound to the processor set.

If the process does not have permission to assign itself to the specified processor set (or if an invalid processor set is specified), FairCom DB logs the following message to CTSTATUS.FCS, where <configuration_file_name> is the name of the FairCom DB configuration file, <line_number> is the line number on which the CPU_AFFINITY option was specified, and <error_code> is the system error code returned by the OS.

Configuration error: <configuration_file_name>, line <line_number>: Failed to set CPU affinity: system error code <error_code>.

 

DUMP

DUMP system.dmp

The name of a dynamic dump script file specifying when to begin and what to include in a dynamic dump. The contents of the script are described in Dynamic Dump. There is no default script, so the keyword DUMP does not appear in the default configuration file. An example configuration file entry for DUMP is:

Note: If the DUMP keyword is used, the file named as containing the dynamic dump script must be in the same directory as the FairCom Server. The FairCom Server will look for this file only in its own directory and, if it does not find it, the FairCom Server will terminate immediately with error FNOP_ERR (12, file not found).

Default: None

See Also:

 

FILES

FILES <Number of Files>

The maximum number of files to be open at one time.

The FairCom server supports up to 1 million open data and index files. The operating system and available system memory are the primary limitations.

Note: The number of file descriptors set by the FILES keyword may need to be considerably greater than the number of open data files. Each index, whether or not in a separate file, counts toward this total. For example, a host index file that supports three different keys (i.e., contains three separate index members) counts as three files toward the FILES total. In addition, each member of a superfile is counted toward the total set by the FILES keyword.

Unix/Linux Considerations

The Unix and Linux operating systems place a limit on the number of file descriptors that can be in use at one time. The number of file descriptors required by FairCom DB is determined as follows:

  • Each open file consumes 1 file descriptor (this may be somewhat lower than the setting of the FILES keyword because individual superfile members and members of a host index do not consume file descriptors).
  • Each TCP/IP socket consumes a file descriptor (this corresponds to the CONNECTIONS keyword).
  • FairCom DB reserves a few file descriptors in addition to those used for data files, index files, and TCP/IP connections.

Based on the above considerations, the system should be configured to allow a number somewhat greater than the number of files + connections.

The file descriptor limit is typically set by the limit or ulimit command, which may require superuser access, or by the hard limit set in a system configuration file such as /etc/security/limits.conf on Linux. The specifics vary by system, so consult the documentation for your Unix or Linux system. (Unix and Linux define both hard limits and soft limits. A soft limit can be changed by a process at any time, but it cannot exceed the hard limit. The hard limit is of interest for this discussion.)

Note: When the file descriptor limit for FairCom Server (set by the operating system) is set too low, server startup fails with error 1005 (system-dependent initialization failed). A message is written to standard output indicating that system-dependent initialization failed and that details are in CTSTATUS.FCS.

 

Features for Handling File Descriptor Limits

Several features improve the ability of the system to handle situations concerning file descriptors:

See Also

MAX_FILES_PER_USER

COMPATIBILITY FILE_DESCRIPTOR_LIMIT

In This Section

Improved File Descriptor Limit Messages Logged During Server Startup

Server Now Fails to Start if File Descriptor Limit Can't be Increased to Required Value

Message Written to Standard Output When File Descriptor Limit is too Low

New file descriptor limit compatibility keyword

Improved File Descriptor Limit Messages Logged During Server Startup

The file descriptor limit messages that FairCom Server logs to CTSTATUS.FCS at startup have been improved. The following information is logged:

  • the file descriptor limit was successfully increased
  • a warning that the maximum set by the system is not high enough to meet the server's file descriptor requirements
  • the limit and the file descriptor requirement values

Now we also include the user limit in the file descriptor limit, because a TCP/IP socket uses a file descriptor.

Note: If the file descriptor limit cannot be increased to the required value, server startup fails. See Fail server startup if file descriptor limit can't be increased to required value.

Sample messages

Case #1: The system file descriptor limit is not high enough:

Mon Apr 28 13:17:55 2014

- User# 00001 ERROR: The hard limit on file descriptors available to this process (4096) is lower than the database engine's file descriptor requirement (11275). Either increase the hard limit, or decrease the FILES or CONNECTIONS settings.

 

Case #2: FairCom DB was able to increase the limit:

Mon Apr 28 13:19:02 2014

- User# 00001 Successfully increased current file descriptor limit to: 11275

 

Server Now Fails to Start if File Descriptor Limit Can't be Increased to Required Value

Appropriate operating system file descriptors are critical to FairCom DB server operation.

Note: If a file descriptor limit set by the operating system cannot be increased to the required value, server startup fails with error 1005 (system-dependent initialization failed).

If the file descriptor limit set by the operating system isn't high enough, it is possible to fail to open a transaction start file when performing a checkpoint, causing the server to terminate abnormally. This behavior avoids a runtime error by catching the insufficient file descriptor limit at server startup.

Message Written to Standard Output When File Descriptor Limit is too Low

When the file descriptor limit for FairCom Server (set by the operating system) is set too low, a message is written to standard output indicating that system-dependent initialization failed and that details are in CTSTATUS.FCS.

New file descriptor limit compatibility keyword

Although running FairCom Server with insufficient file descriptors can lead to errors opening files, we have added a compatibility keyword, COMPATIBILITY FILE_DESCRIPTOR_LIMIT, that restores the previous behavior in case it is not convenient for a system administrator to set the file descriptor limit for the FairCom Server process to the required value or it is not desired to decrease the FILES or CONNECTIONS settings.

Note: Use of this keyword is generally discouraged. It is provided for backward compatibility or short-term use until site administrators are able to increase file appropriate file descriptor limits for a FairCom Server process.

A message is also logged to CTSTATUS.FCS explaining that the COMPATIBILITY FILE_DESCRIPTOR_LIMIT configuration option can be used to allow the server to start in this situation:


Tue Apr 29 12:23:44 2014

- User# 00001 ERROR: The hard limit on file descriptors available to this process (500) is lower than the database engine's file descriptor requirement (1043). Either increase the hard limit, or decrease the FILES or CONNECTIONS settings.

Tue Apr 29 12:23:44 2014

- User# 00001 Note: The configuration option COMPATIBILITY FILE_DESCRIPTOR_LIMIT can be used to allow c-tree Server to start even if the file descriptor limit is insufficient. However, this can lead to errors opening files.

 

GUEST_LOGON

GUEST_LOGON <YES | NO>

When no user ID is sent to the FairCom Server, the client is automatically assigned a user ID of GUEST. The keyword GUEST_LOGON controls whether or not to permit GUEST logons. The keyword takes YES or NO for its arguments.

Default:

NO

 

LOCAL_CONNECTION_ONLY

LOCAL_CONNECTION_ONLY YES | NO

c-tree server supports limiting connections from only localhost using restrictions in the license file (ctsrvrSN.lic where "SN" is a unique number supplied to you by FairCom). In V11.7 and later, is also configurable in ctsrvr.cfg.

This option forces a local connection by binding the socket to the loopback IP address.

If the license file limits the connection to localhost only, attempting to set the keyword to NO fails.

The server's BROADCAST feature is not available when "local connection only" is configured.

Default:

NO or permanently set to YES based on ctsrvrSN.lic file settings set at time of server purchase.

 

LOCAL_DIRECTORY

LOCAL_DIRECTORY <Path>

The preferred way to supply FairCom Server with the name of a directory path for processing files without absolute names. Absolute names include a specific volume or drive reference as part of the name, for example, d:\fairserv\data\. The trailing slash is required.

Note: The other method, the SERVER_DIRECTORY configuration option, has been deprecated. LOCAL_DIRECTORY is the preferred keyword to allow the server to store data and files in an alternative location.

If a LOCAL_DIRECTORY name is defined in the configuration script, the name will be attached to the beginning of any file name that is not absolute. If neither LOCAL_DIRECTORY nor SERVER_DIRECTORY is supplied, database and system files are stored relative to the FairCom Server working directory. LOCAL_DIRECTORY and SERVER_DIRECTORY cannot be used together.

This configuration option can include an environment variable name that will be substituted with its value when the configuration file is read.

Note: The LOCAL_DIRECTORY does not become a permanent part of the file name. The name entered into the transaction log does not include the LOCAL_DIRECTORY.

Default: The directory where the FairCom Server process resides.

 

MAX_DAT_KEY

MAX_DAT_KEY <Max Indexes per Data File>

Maximum number of indexes per data file. This keyword defaults to 64. It can be increased to a theoretical limit of 32767, although a practical limit exists well before this value.

The typical error code that would be seen if this limit is too low is error 107, IDRK_ERR "Too many keys for ISAM data file."

Note: In the standalone model, MAX_DAT_KEY is a compile-time setting, so the code must be recompiled if this setting is changed.

Default: 64

Occasionally data files require a large number of indexes. Commencing with FairCom DB V10.3, the number of indexes default limit was increased from 32 to 64. Customers using the FairCom Server can use the MAX_DAT_KEY keyword to change the limit on the number of indexes per data file.

If this limit is too low, the typical error code that would be seen is error 107, IDRK_ERR "too many keys for ISAM data file."

This value affects the amount of memory that is allocated to store ISAM index state information. It can be increased without a major impact on performance unless FairCom Server is being run in an environment with very little memory (e.g., certain embedded applications).

Note: In the standalone model, MAX_DAT_KEY is a compile-time setting. If this value is changed, the code must be recompiled with the new setting.

 

MAX_KEY_SEG

MAX_KEY_SEG <Max Segments per Index>

Maximum number of key segments allowed per index.

This keyword defaults to 16. It can be increased to a theoretical limit of 32767, although a practical limit exists well before this value.

Default: 16

 

PAGE_SIZE

PAGE_SIZE <bytes>

The number of bytes per buffer page (maximum 65536 bytes). Only the following values are accepted (all other values generate an error):

  • 1024
  • 2048
  • 4096
  • 8192
  • 16384
  • 32768
  • 65536

To encourage compatibility across different FairCom DB environments, we suggest not modifying the PAGE_SIZE. However, if performance is of concern, this value may be modified to suit the characteristics of the operating system. Generally, this is a matter to discuss with the application programmer.

Default: 32768 in V12 and later (before V12, the default was 8192)

Warning: Changing the PAGE_SIZE is a maintenance task that should be done carefully and with a full reliable backup. Practice on a copy of your data and server folder until you are confident with the results. For procedures, see Adjusting PAGE_SIZE in the FairCom Installation Guide.

Note: A file created with a larger PAGE_SIZE cannot be opened by a server with a smaller PAGE_SIZE.

 

SERVER_NAME

SERVER_NAME <NAME>

A name assigned to FairCom Server, instead of the default name.

Default: FAIRCOMS

See Also

 

SERVER_PORT

SERVER_PORT <port_number>

Specifies the TCP/IP Port of the server rather than using the SERVER_NAME keyword method. This allows for a direct specification of the port number.

With SERVER_NAME the TCP/IP port used is computed as 5001 plus the sum of the ASCII values of the characters in the server name. If both SERVER_NAME and SERVER_PORT are specified in the server configuration file, SERVER_PORT takes precedence over SERVER_NAME.

When a client prefixes the server name with the pound sign (#), the specified server name is interpreted as a numeric port. Otherwise, the specified server name is converted to a numeric port using the original approach.

For example: #6000@localhost is interpreted as port 6000, and 6000@localhost is interpreted as port 5198.

On Linux/Unix you must back quote the '#' sign due to bash processing of the '#' character:

\#5597@hosthname

Note: When specifying a client port number directly with the #nnnn format, this forces a TCP/IP connection to the server, even when operating on the same machine. That is, the shared memory protocol, if enabled (default), is overridden when a direct port number is requested, even if the server name is also "#nnnn".

Default

Off

See Also

 

Client Communication

FairCom DB clients generally connect to the server process via TCP/IP or shared memory. These options configure the parameters surrounding these connections.

FairCom DB also supports basic LDAP authentication and there are options for configuring those parameters.

 
DEAD_CLIENT_INTERVAL

Controls the timeout interval (the number of seconds of client idle time after which the server checks the connection for that client).

 
MAX_CONCURRENT_USER_ACCOUNTS

Sets the maximum number of user accounts that can connect to FairCom DB at one time.

 
MAX_CONNECTIONS_PER_USER_ACCOUNT

Sets the maximum number of connections for each user account.

 
MAX_ISAM_CONNECTIONS

Sets the maximum number of ISAM connections.

 
MAX_SQL_CONNECTIONS

Sets the maximum number of SQL connections.

 
Communications Protocol

 
COMM_PROTOCOL

Specifies a communications module to be loaded by the server, which will determine the protocol to be used for client/server communications.

Each communication protocol has its own set of configuration keywords, listed below:

 
TCP/IP

 
BROADCAST_DATA

Specifies a token to be broadcast following the Server Name.

 
BROADCAST_INTERVAL

The number of seconds between broadcasts.

 
BROADCAST_PORT

Specifies the TCP/IP port used for the broadcast.

 
SESSION_TIMEOUT (SESSION_TIMEOUT, SESSION_TIMEOUT)

Forces TCP/IP connections to be removed after the specified number of seconds has elapsed without activity.

 
Shared Memory


SEMAPHORE_BLK

For Unix based systems only: the number of semaphores obtained at one time.

 
SHMEM_DIRECTORY

Sets the directory in which FairCom DB stores files used for connecting using the Unix shared memory protocol.

 
SHMEM_PERMISSIONS

Sets the permissions for the shared memory resources when using the Unix shared memory protocol.

 
LDAP


LDAP_SERVER

Specifies the host name and port of an LDAP server for authentication.


LDAP_PORT

Specifies the port to use when connecting to the LDAP server.


LDAP_TIMEOUT

Specifies an LDAP server connection timeout in seconds.


LDAP_SSL

Specifies if c-tree Server will use SSL when connecting to the LDAP server.


LDAP_PREFIX

Specifies a string to prepend to the user name that is passed to LDAP.


LDAP_BASE

Specifies the base name for LDAP directory searches.


LDAP_APPLICATION_ID

Specifies if the logic will authenticate the application ID before authenticating the user ID.


LDAP_KEY_STORE

Specifies the name of an encrypted store file created using the ctcpvf utility.


LDAP_ISAM_ALLOWED_GROUP & LDAP_SQL_ALLOWED_GROUP

Specifies the filter to be used to check LDAP group membership.


LDAP_GROUP_CHECK

Specifies the group, base, and filter to be used when checking LDAP group membership.


ADMIN_USER_GROUP

Specifies the name of the super administrator user and administrator group.

 
GUEST_USER_GROUP

Specifies the name of the guest user and guest group.


LOGIN_ALLOWED_GROUP

If specified, only members of the specified group are allowed to connect to the FairCom Server.

 
Diagnostics

Diagnostics keywords are intended to be used to help collect data to be analyzed for troubleshooting. The use of these keywords should be avoided in normal operation as they may cause additional overhead (e.g., logging).

 
DIAGNOSTICS TRAP_COMM

Instructs the FairCom Server to log incoming communications packets to TRAPCOMM.FCS prior to execution.

 

DEAD_CLIENT_INTERVAL

DEAD_CLIENT_INTERVAL idle_time_seconds

DEAD_CLIENT_INTERVAL controls the timeout interval, the number of seconds of client idle time after which the server checks the connection for that client. The default value is 1800 (30 minutes). Specify 0 to use the system default (typically about 2 hours), which was the V12.0 default behavior.

For the equivalent detection on the client side, see the ctCOMMOPT_TCP_KEEPALIVE_INTERVAL option of the ctSetCommProtocolOption function.

This affects TCP based connections using SQL and ISAM ports.

COMPATIBILITY TCPIP_CHECK_DEAD_CLIENTS enables an older method to carry out this check, which has a minimum setting of 120 seconds (2 minutes).

Note: The timeout interval only controls how often the FairCom Server sends a message to test the connection. Different operating systems use different timeout values on TCP/IP messages, so the actual delay before a dead client is dropped depends on when the operating system notifies the FairCom Server that the message failed.

Default: 1800 (30 minutes)

 

MAX_CONCURRENT_USER_ACCOUNTS

MAX_CONCURRENT_USER_ACCOUNTS <max_accounts>

Sets the maximum number of user accounts that can connect at one time to FairCom DB. The maximum number of ISAM and SQL connections can be set separately using MAX_ISAM_CONNECTIONS and MAX_SQL_CONNECTIONS respectively.

Note: If limits are set in the license file, the configuration option can only be used to further reduce the connection limits (they cannot be increased above the license file limits).

The error code ALMT_ERR (984) is returned when logon is denied because the number of distinct user accounts that are allowed to be connected at one time has been reached.

See Also

 

MAX_CONNECTIONS_PER_USER_ACCOUNT

MAX_CONNECTIONS_PER_USER_ACCOUNT <max_connections>

Sets the maximum number of connections for each user account. The maximum number of ISAM and SQL connections can be set separately using MAX_ISAM_CONNECTIONS and MAX_SQL_CONNECTIONS respectively.

If a user is in a group, the connections are counted at the group level. If the user is not part of a group, connections are counted for the individual user.

Note: If limits are set in the license file, the configuration option can only be used to further reduce the connection limits (they cannot be increased above the license file limits).

The error code ALMT_ERR (984) is returned when logon is denied because the number of distinct user accounts that are allowed to be connected at one time has been reached.

See Also

 

MAX_ISAM_CONNECTIONS

MAX_ISAM_CONNECTIONS <max_number>

Sets the maximum number of ISAM connections. The maximum number of ISAM and SQL connections can be set separately using MAX_ISAM_CONNECTIONS and MAX_SQL_CONNECTIONS respectively.

Note: If limits are set in the license file, the configuration option can only be used to further reduce the connection limits (they cannot be increased above the license file limits).

The error code ALMT_ERR (984) is returned when logon is denied because the number of distinct user accounts that are allowed to be connected at one time has been reached.

See Also

 

MAX_SQL_CONNECTIONS

MAX_SQL_CONNECTIONS <max_number>

Sets the maximum number of SQL connections. The maximum number of ISAM and SQL connections can be set separately using MAX_ISAM_CONNECTIONS and MAX_SQL_CONNECTIONS respectively.

Note: If limits are set in the license file, the configuration option can only be used to further reduce the connection limits (they cannot be increased above the license file limits).

The error code ALMT_ERR (984) is returned when logon is denied because the number of distinct user accounts that are allowed to be connected at one time has been reached.

See Also

 

TCP/IP

See also COMM_PROTOCOL

 

BROADCAST_DATA

BROADCAST_DATA <Token>

BROADCAST_DATA specifies a token to be broadcast following the Server Name. The token must not contain spaces. There is no default token. For example, add a department name or further identifying information for the FairCom Server.

This configuration option can include an environment variable name that will be substituted with its value when the configuration file is read.

Default: No data sent

See Also

BROADCAST_INTERVAL

BROADCAST_PORT

 

BROADCAST_INTERVAL

BROADCAST_INTERVAL <Seconds>

The number of seconds between broadcasts. The default is 10 seconds, otherwise the token should be a number. The maximum value allowed is set to 86,400 seconds, which is once per day.

If the number is negative, each broadcast is also sent to the FairCom Server standard output.

Default: 10

See Also

BROADCAST_DATA

BROADCAST_PORT

 

BROADCAST_PORT

BROADCAST_PORT <DEFAULT | Port>

Specifies the TCP/IP port used for the broadcast.

The default value is 0, which means the broadcast is off.

If DEFAULT is specified, this means that the broadcast is on and the default port is used, which is 5595.

Any valid four-byte integer greater than 5000 that is not in use by another process may be specified. This should NOT be the port for the FairCom Server, which is displayed at startup and is based on the Server Name.

Default: 0

See Also

BROADCAST_DATA

BROADCAST_INTERVAL

 

SESSION_TIMEOUT

SESSION_TIMEOUT <seconds>

The SESSION_TIMEOUT option forces TCP/IP connections to be removed after the specified number of seconds has elapsed without activity. This option has been verified on Windows, Linux, and Mac OS X.

History

In V11 and later:

For 64-bit FairCom DB servers, a timeout allows each thread to detect and perform its own disconnection in case of a timeout.

  • If SESSION_TIMEOUT is negative, it is ignored.
  • If SESSION_TIMEOUT is less than 5, it is set to 5 so that the minimum SESSION_TIMEOUT value is 5 seconds.

 

In V11.6.1 and later, SESSION_TIMEOUT also applies to SQL connections.

Default: No timeout

 

Shared Memory

See also:

  • COMM_PROTOCOL
  • Shared Memory Resources Considerations

 

SEMAPHORE_BLK

SEMAPHORE_BLK <number>

Note: SEMAPHORE_BLK is a legacy keyword that is no longer used.

For Unix based systems only. This is the number of semaphores obtained at one time. These semaphores are used in the shared memory communication subsystem.

Default: 10

See Also:

 

SHMEM_DIRECTORY

SHMEM_DIRECTORY <directory_name>

On Unix systems, the FairCom DB shared memory communication protocol creates a file that clients use to find the shared memory identifier for its shared memory logon region, and it creates named pipes for initial communication between client and server.

This option sets the directory in which FairCom DB stores files used for connecting using the Unix shared memory protocol.

This configuration option can include an environment variable name that will be substituted with its value when the configuration file is read.

NOTE: If SHMEM_DIRECTORY is set, clients must be able to find this non-default directory.
Client processes will check the environment variable CTREE_SHMEM_DIRECTORY (see "Client Configuration" in Shared Memory Client-Server Communication for Unix/Linux). A client looking in the wrong location for shared memory information may take extra time to connect waiting for the shared memory protocol to timeout before falling back to TCP.

See Also

 

SHMEM_GROUP

SHMEM_GROUP <group>

By default, a client application must belong to the server owner’s primary group to use shared memory. This is configurable with the SHMEM_GROUP keyword. This option causes FairCom Server to assign group membership to the specified group. This option applies to the resources for both the ISAM and the SQL shared memory protocol.

Possible errors indicating problems:

FSHAREMM: Could not get group ID for group <group> for shared memory

FSHAREMM: Failed to set group for LQMSG shared memory region: X

See Also

 

SHMEM_MAX_SPIN

SHMEM_MAX_SPIN <number>

Sets the maximum number of spin operations that a shared memory connection uses for a receive operation when the shared memory spin feature is enabled.

Default:

On Windows systems, the default is 400.

On Unix systems that support atomic operations, the default is 100000.

On Unix systems that do not support atomic operations, the default is 10000.

See Also:

 

SHMEM_PERMISSIONS

SHMEM_PERMISSIONS <permissions>

On Unix systems, the FairCom DB shared memory communication protocol creates a file that clients use to find the shared memory identifier for its shared memory logon region, and it creates named pipes for initial communication between client and server.

SHMEM_PERMISSIONS <permissions> sets the permissions for the shared memory resources. The default is 660. 666 will allow access to FairCom DB by any user account. Your the system umask setting for the account can alter this default. Explicitly setting SHMEM_PERMISSIONS avoids issues with umask affecting the default.

Note: Use caution when increasing the access permissions to the shared memory resources. For example, shared memory permission of 666 allows any user to attach to a shared memory segment and read or write to it. This means that any process could make a request to FairCom Server or could read the request data of another process through such a shared memory region.

See Also

 

LDAP

When LDAP is enabled, FairCom DB Server authenticates a supplied username / password (from InitISAMXtd) against the LDAP server itself. By default, FairCom DB doesn't query the server for any other information to be returned, it's simply pass/fail. Note: If the LDAP server becomes unavailable for any reason, users can't be authenticated.

The one exception is when LDAP_ALLOWED_GROUP options are specified. In those cases, FairCom DB additionally authenticates to LDAP with a specific LDAP account provided by the LDAP_APPLICATION_ID option (and passwords specified with LDAP_KEY_STORE) and query and validate group membership for that user. If a user is not allowed in the group, the connection is denied. The optional LDAP_GROUP_CHECK can be used to return and update group membership in FAIRCOM.FCS.

Once a user is authenticated and all group checks are complete, FairCom DB discards all authentication information and disconnects from the LDAP server and there is no further interaction.

Example

FairCom Server provides a set of keywords for configuring the LDAP subsystem:

SUBSYSTEM USER_AUTH LDAP

{

LDAP_SERVER localhost

LDAP_TIMEOUT 10

LDAP_PREFIX cn=

LDAP_BASE ou=people,dc=faircom,dc=com

LDAP_APPLICATION_ID cn=ctreesql,ou=applications,dc=faircom,dc=com

LDAP_ISAM_ALLOWED_GROUP cn=ctreeisamusers,ou=groups,dc=faircom,dc=com

LDAP_SQL_ALLOWED_GROUP cn=ctreesqlusers,ou=groups,dc=faircom,dc=com

LDAP_GROUP_CHECK

 

{attr:member} {base:ou=groups,dc=faircom,dc=com} {filter:(objectclass=groupOfNames)}

LDAP_PORT 389

LDAP_SSL NO

LDAP_KEY_STORE ldap.fkf

}

 

Security

LDAP client authentication requires passing an actual client LDAP password to the FairCom DB server. This requires additional encryption to protect the password in transit. Unique public/private key pairs are generated at runtime and are only used for this one particular connection request.

The encryption algorithm that the client library uses to securely pass the user password to the server when using LDAP authentication was updated in V13 to use an AES-GCM encryption with a random initialization vector (iv).

 

If a client library that uses AES-GCM for LDAP authentication connects to a server that does not support it, the connection attempt now fails with error code 1179, CLIENT_LOGON_REQUIRES_AES_GCM at the ISAM level, or error -18179 at the SQL level.

If a client library that does not use AES-GCM for LDAP authentication connects to a server that use AES-GCM authentication at the ISAM level, the connection attempt now fails with error code 941 or 1180 (SERVER_LOGON_REQUIRES_AES_GCM), or error code -17941 or -18180 at the SQL level.

Limitations

  • The ADO.NET driver uses AES-CBC with a random iv, since AES-GCM is not supported by the .NET Framework (only .NET Core supports AES-GCM).
  • While the JDBC driver can be compiled with Java 1.7 for backward compatibility, it requires Java 1.8 or later in order to use AES-GCM.

LDAP Keywords

Only LDAP keywords are allowed to be specified inside the SUBSYSTEM USER_AUTH LDAP block of the configuration file. Logic prevents non-LAP keywords from being specified in this block.

The following keywords can be used in the SUBSYSTEM USER_AUTH LDAP block:

General LDAP configuration

LDAP_SERVER

LDAP_PORT

LDAP_TIMEOUT

LDAP_SSL

Site-specific directives

LDAP_PREFIX

LDAP_BASE

Required for group management checks

LDAP_APPLICATION_ID

LDAP_KEY_STORE

LDAP_ISAM_ALLOWED_GROUP

LDAP_SQL_ALLOWED_GROUP

LDAP_GROUP_CHECK

 

ADMIN_USER_GROUP

ADMIN_USER_GROUP <admin_user_name>:<admin_group_name>

Specifies the name of the super administrator user (default ADMIN) and administrator group (default ADMIN). Only members of the specified administrator group can perform some operations with FairCom DB such as shutting down FairCom DB or connecting using the ctadmn utility.

Example

ADMIN_USER_GROUP Administrator:Administrators

See Also

 

GUEST_USER_GROUP

GUEST_USER_GROUP <user:group>

Specifies the name of the guest user (default GUEST) and guest group (default GUEST).

Example

GUEST_USER_GROUP Guest:Guests

See Also

 

LDAP_APPLICATION_ID

When the LDAP_APPLICATION_ID option is used, FairCom DB checks the ISAM and SQL group membership (if those configurations enabled) after authenticating the application ID and before authenticating the user ID. This is done because the user ID might not have been assigned the permissions needed to check group membership. LDAP_GROUP_CHECK is performed in the context of the LDAP application ID. This is consistent with what is done for the LDAP_ISAM_ALLOWED_GROUP and LDAP_SQL_ALLOWED_GROUP options.

When LDAP_APPLICATION_ID is not specified the current user ID is used for lookup.

See also:

LDAP_GROUP_CHECK

 

LDAP_BASE

LDAP_BASE <base>

<base> is appended to the user name when authenticating the user using LDAP. and specifies the base name to use for the group membership search (LDAP_ISAM_ALLOWED_GROUP and LDAP_SQL_ALLOWED_GROUP configurations).

Example

LDAP_BASE DC=MyDomain,DC=local

With LDAP_BASE dc=mycompany,dc=com and LDAP_PREFIX cn= in ctsrvr.cfg, then FairCom DB authenticates the user name MYUSERNAME as: cn=MYUSERNAME;dc=mycompany,dc=com

See Also

LDAP_SERVER

LDAP_TIMEOUT

ADMIN_USER_GROUP

GUEST_USER_GROUP

LOGIN_ALLOWED_GROUP

 

LDAP_GROUP_CHECK

LDAP_GROUP_CHECK {attr:<ATTRIBUTE>}{base:<BASE>}{filter:<FILTER>}

Where:

  • <ATTRIBUTE> is the group attribute to be checked (for example attr:member)
  • <BASE> is the LDAP base for the group membership search
  • <FILTER> is the LDAP filter for the group membership search

FairCom Server V11.5 and later are able to update the c-tree group membership records in FAIRCOM.FCS at logon. Because SQL permissions use the current group membership for a user account as stored in FAIRCOM.FCS, this ability makes it possible for SQL permissions to act on the current LDAP group membership for a user account that is authenticated using LDAP.

To use this feature, add this option in the SUBSYSTEM USER_AUTH LDAP block in ctsrvr.cfg.

Any errors encountered are logged to CTSTATUS.FCS.

Example 1:

The file faircom.ldif contains these domain, user, and group definitions:

 

# Domain

 

dn: dc=faircom,dc=com

objectClass: domain

objectClass: top

dc: faircom

 

# People

 

dn: ou=people,dc=faircom,dc=com

objectclass: top

objectclass: organizationalUnit

ou: people

description: Container for user entries

 

dn: cn=user1,ou=people,dc=faircom,dc=com

cn: user1

objectClass: person

sn: user1

 

dn: cn=user2,ou=people,dc=faircom,dc=com

cn: user2

objectClass: person

sn: user2

 

dn: cn=user3,ou=people,dc=faircom,dc=com

cn: user3

objectClass: person

sn: user3

 

dn: cn=user4,ou=people,dc=faircom,dc=com

cn: user4

objectClass: person

sn: user4

 

dn: cn=user5,ou=people,dc=faircom,dc=com

cn: user5

objectClass: person

sn: user5

 

# Groups

 

dn: ou=groups,dc=faircom,dc=com

objectClass: organizationalUnit

ou: groups

description: Container for group entries

 

dn: cn=dev,ou=groups,dc=faircom,dc=com

objectClass: groupOfNames

cn: dev

description: Research and Development group

member: cn=user2,ou=people,dc=faircom,dc=com

member: cn=user3,ou=people,dc=faircom,dc=com

 

dn: cn=support,ou=groups,dc=faircom,dc=com

objectClass: groupOfNames

cn: support

description: Technical Support group

member: cn=user1,ou=people,dc=faircom,dc=com

member: cn=user2,ou=people,dc=faircom,dc=com

member: cn=user3,ou=people,dc=faircom,dc=com

 

dn: cn=qa,ou=groups,dc=faircom,dc=com

objectClass: groupOfNames

cn: qa

description: Product Testing group

member: cn=user1,ou=people,dc=faircom,dc=com

member: cn=user2,ou=people,dc=faircom,dc=com

member: cn=user3,ou=people,dc=faircom,dc=com

 

dn: cn=it,ou=groups,dc=faircom,dc=com

objectClass: groupOfNames

cn: it

description: Information Technology group

member: cn=user4,ou=people,dc=faircom,dc=com

member: cn=user5,ou=people,dc=faircom,dc=com

 

dn: cn=ctreeisamusers,ou=groups,dc=faircom,dc=com

objectClass: groupOfNames

cn: ctreeisamusers

description: c-tree ISAM Users

member: cn=user1,ou=people,dc=faircom,dc=com

member: cn=user2,ou=people,dc=faircom,dc=com

member: cn=user3,ou=people,dc=faircom,dc=com

member: cn=user4,ou=people,dc=faircom,dc=com

member: cn=user5,ou=people,dc=faircom,dc=com

 

dn: cn=ctreesqlusers,ou=groups,dc=faircom,dc=com

objectClass: groupOfNames

cn: ctreesqlusers

description: c-tree SQL Users

member: cn=user1,ou=people,dc=faircom,dc=com

member: cn=user2,ou=people,dc=faircom,dc=com

member: cn=user3,ou=people,dc=faircom,dc=com

member: cn=user4,ou=people,dc=faircom,dc=com

member: cn=user5,ou=people,dc=faircom,dc=com

 

# Applications

 

dn: ou=applications,dc=faircom,dc=com

objectclass: top

objectclass: organizationalUnit

ou: applications

description: Container for application entries

 

dn: cn=ctreesql,ou=applications,dc=faircom,dc=com

cn: ctreesql

objectClass: person

sn: ctreesql

 

Example 2:

The following LDAP configuration options in ctsrvr.cfg require LDAP authentication using an application ID of ctreesql, allow ISAM logons only from members of the ctreeisamusers group, allow SQL logons only from members of the ctreesqlusers group, and update the c-tree group definitions for a particular user ID at logon time based on that user ID's current LDAP group membership:

 

SUBSYSTEM USER_AUTH LDAP

{

LDAP_SERVER localhost

LDAP_TIMEOUT 10

LDAP_PREFIX cn=

LDAP_BASE ou=people,dc=faircom,dc=com

LDAP_APPLICATION_ID cn=ctreesql,ou=applications,dc=faircom,dc=com

LDAP_ISAM_ALLOWED_GROUP cn=ctreeisamusers,ou=groups,dc=faircom,dc=com

LDAP_SQL_ALLOWED_GROUP cn=ctreesqlusers,ou=groups,dc=faircom,dc=com

LDAP_GROUP_CHECK {attr:member}{base:ou=groups,dc=faircom,dc=com}{filter:(objectclass=groupOfNames)}

LDAP_PORT 389

LDAP_SSL NO

LDAP_KEY_STORE ldap.fkf

}

 

When user3 successfully connects to c-tree Server, the user3 user account and groups to which user3 belongs are added to FAIRCOM.FCS:

 

User Id User Description (Groups)

------------ ------------------------------------

ADMIN ( ADMIN )

USER3 ( CTREEISAMUSERS CTREESQLUSERS DEV QA SUPPORT )

 

Now it is possible to create a SQL table and grant permission to user3 through a group to which user3 belongs. For example:

As ADMIN:

 

create table t(ch char(5));

insert into t values ('abc');

commit;

 

As user3:

 

select * from t;

error(-20228): Access denied(Authorisation failed)

 

As ADMIN:

 

grant select on admin.t to dev;

commit;

 

As user3:

 

select * from t;

CH

--

abc

1 record selected

 

Perform LDAP_GROUP_CHECK in Context of LDAP Application ID

The check for group membership, configured by the LDAP_GROUP_CHECK option, was done in the context of the user account that was logging on. However, the user account might not have permission to query its LDAP groups.

The logic has been enhanced so that, if an LDAP application is specified (by specifying the LDAP_APPLICATION_ID option in the SUBSYSTEM USER_AUTH LDAP block in ctsrvr.cfg), it now performs the LDAP_GROUP_CHECK in the context of the LDAP application ID. This is consistent with what is done for the LDAP_ISAM_ALLOWED_GROUP and LDAP_SQL_ALLOWED_GROUP options.

When LDAP_APPLICATION_ID is specified, you MUST also use LDAP_KEY_STORE to specify an application password, otherwise the application authentication will fail.

Note: When LDAP_APPLICATION_ID is not specified the logic behaves as before, using the current user ID for lookup.

 

See also:

LDAP_APPLICATION_ID

 

LDAP_ISAM_ALLOWED_GROUP & LDAP_SQL_ALLOWED_GROUP

In V11 and later, FairCom Server's ability to check LDAP group membership has been improved. Previously, part of the filter was hard-coded. Now, the entire filter can be specified in the configuration file. Additionally, the attribute is no longer hard-coded; now it can be specified in the configuration file.

To use the new functionality, specify the following syntax for the LDAP_ISAM_ALLOWED_GROUP and/or LDAP_SQL_ALLOWED_GROUP options:


LDAP_ISAM_ALLOWED_GROUP {attr:ATTRIBUTE_VALUE}{base:BASE_VALUE}{filter:FILTER_VALUE}
 

For example:


LDAP_ISAM_ALLOWED_GROUP {attr:member}{base:dc=mycompany,dc=com}{filter:(&(objectClass=groupOfNames)(cn=myusergroup))}

 

LDAP_KEY_STORE

LDAP_KEY_STORE <key_store_file>

This option is used in conjunction with the LDAP_APPLICATION_ID keyword. <key_store_file> is the name of an encrypted store file created using the ctcpvf utility. The encrypted store file contains the application ID password (that is, the password that c-tree Server will use when authenticating the user name <application_id> with LDAP).

See Also:

 

LDAP_LOCAL_PREFIX

LDAP_LOCAL_PREFIX <prefix>

When LDAP_SERVER is enabled, all non-admin users authenticate using LDAP. The LDAP_LOCAL_PREFIX <prefix> keyword allows filtering certain users to use local c-tree authentication if their user name begins with <prefix>. This prefix comparison is case-insensitive.

Note: If the user account existed prior to this V12 change, local authentication may fail with LDRQ_ERR (985) or SQL error (-17985): CT - Logon is denied because this user account requires LDAP authentication, but c-tree Server has not enabled LDAP authentication. If this occurs, the user account will need to be deleted and re-created.

 

LDAP_MODULE

LDAP_MODULE <module_name>

<module_name> specifies the LDAP shared library to load. The default value is libldap.so. On Solaris, libldap.so is the native LDAP library, so this should be used to specify the name of the OpenLDAP version of libldap.so.

LDAP_MODULE is not supported on windows.

Example

LDAP_MODULE libldap.so

 

LDAP_PORT

LDAP_PORT <port>

Specifies the port to use when connecting to the LDAP server. The default is to use the standard LDAP port: 389 for non-SSL connections, and 636 for SSL connections (which is enabled by specifying LDAP_SSL YES in ctsrvr.cfg).

 

LDAP_PREFIX

LDAP_PREFIX <prefix>

  • <prefix> is a string to prepend to the user name that is passed to LDAP.

For example, if you specify LDAP_BASE dc=mycompany,dc=com and LDAP_PREFIX cn= in ctsrvr.cfg, then c-tree Server authenticates the user name MYUSERNAME as:

cn=MYUSERNAME,dc=mycompany,dc=com

 

LDAP_SERVER

LDAP_SERVER <ldap_host_name>:<ldap_port>

Specifies the host name and port of an LDAP server for authentication.

Example

LDAP_SERVER 192.168.0.15:389

See Also


 

 

 

LDAP_SSL

LDAP_SSL YES | NO

If YES is specified, c-tree Server uses SSL when connecting to the LDAP server. The default is NO.

 

LDAP_TIMEOUT

LDAP_TIMEOUT <timeout>

Specifies an LDAP server connection timeout in seconds (default is 60).

Example

LDAP_TIMEOUT 30

See Also

 

LOGIN_ALLOWED_GROUP

LOGIN_ALLOWED_GROUP <group>

When this keyword is specified, only users who are members of the specified group are allowed to connect to the FairCom Server. The FairCom Server returns error LGRP_ERR when a user who is not a member of the specified group attempts to connect to the FairCom Server. If the keyword is not specified, any user who can be authenticated using the specified LDAP server is permitted to connect to the FairCom Server.

Example

LOGIN_ALLOWED_GROUP c-treeUsers

See Also

 

TLS

To enable TLS (SSL), add a SUBSYSTEM COMM_PROTOCOL SSL section to ctsrvr.cfg containing your specified TLS configuration options.

Supported options

SERVER_CERTIFICATE_FILE - provide the name of the PEM-encoded certificate file that contains the FairCom DB server certificate.

SERVER_PRIVATE_KEY_FILE - indicate the name of the file containing the private key.

SERVER_ENCRYPTED_STORE_FILE - create an encrypted store file.

SSL_CONNECTIONS_ONLY - require the client to use SSL/TLS to connect to the FairCom Server or not.

SSL_CIPHERS - set the encryption ciphers that are allowed to be used for encrypting the SSL connection.

DEBUG_LOG - write messages to the specified <log file>.

VERIFY_CLIENT_CERTIFICATE - require the client to supply an X.509 certificate or not.

X509_AUTHENTICATION - enable or disable using an X.509 certificate at logon for authentication and database authorization

Example:

SUBSYSTEM COMM_PROTOCOL SSL {

 

;This is the file name of the server certificate

SERVER_CERTIFICATE_FILE c:\certs\server.pem

 

; This servers private key. It is encrypted in pkcs8 format

SERVER_PRIVATE_KEY_FILEc:\certs\private\server.pkcs8

 

; master.fkf contains the password for decrypting server.pkcs8

SERVER_ENCRYPTED_STORE_FILE master.fkf

 

;For SSL you can specify (un-comment) a debug log file name

;DEBUG_LOG ssl.log

 

SSL_CONNECTIONS_ONLY YES

 

;Require clients to provide a x509 certificate

VERIFY_CLIENT_CERTIFICATE YES

 

;Use x509 client certificate for database authentication

x509_AUTHENTICATION YES

 

;Use the SUBJECT:CN from the client's certificate as their user name

x509_PATH CN

}

 

DIAGNOSTICS TRAP_COMM

DIAGNOSTICS TRAP_COMM

When activated, the DIAGNOSTICS TRAP_COMM keyword instructs the FairCom Server to log incoming communications packets to TRAPCOMM.FCS prior to execution. This log can be played back using the cttrap utility and a debug build of the FairCom Server to observe the results of the client requests, allowing the developer to exactly duplicate and repeat client activities. The trap file, TRAPCOMM.FCS, is created in the server directory by default. To prepend a path onto the trap file name (say to route it to a separate disk), add an entry of the form DIAGNOSTIC_STR <trap file path>. For example, if DIAGNOSTIC_STR /bigdisk/ were in the configuration file, then the trap file would be /bigdisk/TRAPCOMM.FCS.

Notes

  • A fresh TRAMCOMM.FCS file is created on each server startup and wipes out any existing one.
  • TRAPCOMM.FCS isn't completely flushed until the server shuts down, thus it may appear empty until then.

Default: Disabled

See Also

 

SESSION_TIMEOUT

SESSION_TIMEOUT <seconds>

The SESSION_TIMEOUT option forces TCP/IP connections to be removed after the specified number of seconds has elapsed without activity. This option has been verified on Windows, Linux, and Mac OS X.

History

In V11 and later:

For 64-bit FairCom DB servers, a timeout allows each thread to detect and perform its own disconnection in case of a timeout.

  • If SESSION_TIMEOUT is negative, it is ignored.
  • If SESSION_TIMEOUT is less than 5, it is set to 5 so that the minimum SESSION_TIMEOUT value is 5 seconds.

 

In V11.6.1 and later, SESSION_TIMEOUT also applies to SQL connections.

Default: No timeout

 

Startup and Shutdown

APP_NAME_LIST

Permits the server configuration file to create a list of arbitrary names that can be retrieved by clients.


CACHE_LINE

Under multi-CPU systems, ensure this setting matches your equipment to increase performance by reducing false sharing in CPU caches.

 
CHECK_CONFIG

Forces FairCom DB to continue processing the configuration file when an error occurs.

 
COMPATIBILITY NO_EXTERNAL_SHUTDOWN

Disallow server shutdown attempts made by external c-tree clients.

 
CONSOLE CTRL_C_ENABLE

Permit <CTRL>+C to stop the FairCom Server.

 
CONSOLE NO_MESSAGEBOX

Deactivates error messages coming to the console in the form of a message box.

 
CONSOLE NO_PWRDWNPASSWORD

Bypasses the ADMIN group User ID and password validation typically required at shutdown.

 
CONSOLE NO_SHUTDOWN_PROMPT

Disables the shutdown prompt, which is used to acknowledge the shutdown to prevent an accidental unload.

 
CONSOLE TOOL_TRAY

On Windows, starts the FairCom Server in background, displaying only an icon in the Windows tool tray.

 
CONSOLE W9X_SERVICE

Windows 95/98 only: Execute the FairCom Server as a Windows 95/98 service.

 
CTSRVR_CFG

Specify the configuration file used when executing the FairCom Server from the command line.

 
DNODEQ_SHUTDOWN_LIMIT

Specifies a limit on the number of delete node queue entries that FairCom DB processes when it is shutting down.

 
NO_SHUTDOWN_FLUSH

Skips the file flushing of the specified file during server shutdown.

 

PLUGIN

Specifies a specially designed plugin module (a DLL or shared library) to be loaded and initialized at startup.

 

PLUGIN_CALLBACK

Enable loading generic, user-defined libraries once at server startup, and unloading them at server shutdown.

 
PROCESS_PRIORITY

Specifies the FairCom Server's process priority.

 
PROCESS_EXIT_COMMAND

Runs a command when the FairCom DB process calls the system function exit().

 
SIGNAL_DOWN

Launches the specified application when the FairCom Server comes down.

 
SIGNAL_READY

Launches an application when the FairCom Server comes up.

 

STACK_DUMP

Control stack generation.

 
USER_SIGNAL_DOWN

Defines functionality to occur at Server shutdown.

 
USER_SIGNAL_READY

Defines functionality to occur at Server startup.

 
WAIT_ON_SHUTDOWN_SEC

Permits explicit control on how long to wait for server shutdown.

 
Diagnostics

Diagnostics keywords are intended to be used to help collect data to be analyzed for troubleshooting. The use of these keywords should be avoided in normal operation as they may cause additional overhead (e.g., logging).

 
DIAGNOSTICS FULL_DUMP

On Windows: Enables the generation of a mini-dump file with a full memory dump.

 
DIAGNOSTICS SHUTDOWN_COMM

Logs messages showing the operations performed at server shutdown to disconnect client connections.

 

APP_NAME_LIST

APP_NAME_LIST permits the server configuration file to create a list of arbitrary names that can be retrieved by clients. The names are any text string not containing spaces. If spaces are desired, the text string can be placed in quotes, however, the quotes will be part of the text string on retrieval.

As many APP_NAME_LIST entries as required may be created in the configuration file. For example: a list of file names may be created and then the names of the files can be retrieved by the client application. Further, by convention, one could use a delimiter to add parameters to the end of the string. Assuming, for the sake of example, that a pound sign (#) is used as a delimiter, then some entries could be added as follows:

APP_NAME_LIST first.dat#parm11#parm12#parm13

APP_NAME_LIST second.dat#parm21#parm22#parm23#parm24

It is up to the client application to determine how to parse the APP_NAME_LIST string that is returned in its entirety by calls to the c-tree GetSymbolicNames() API function.

The text string used in APP_NAME_LIST entries have the following restrictions:

  1. The text string cannot contain a vertical bar (|) character; and
  2. The string cannot exceed the maximum file name length (255 characters, or 512 characters when multi-byte characters are enabled).

 

CACHE_LINE

CACHE_LINE<size>

To maximize the performance of the FairCom Server under multi-CPU systems, ensure the cache-line setting matches the setting for your equipment. A cache-line is the smallest amount of memory a processor will retrieve and store in its highest speed cache. Using an appropriate CACHE_LINE setting helps reduce false sharing in CPU caches. Typical cache-line sizes are 32, 64, or 128 bytes.

It is common for 32-bit CPUs to use a 32-byte cache line size, and for 64-bit CPUs to use a 64-byte or larger cache line size, thus the default CACHE_LINE setting is 32 for 32-bit systems and 128 for 64-bit systems.

Supported CACHE_LINE values are: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, and 1024. If an invalid CACHE_LINE value is specified, the server logs a warning message to CTSTATUS.FCS and uses the default value.

Default: 32 or 128

 

CHECK_CONFIG

CHECK_CONFIG <YES | NO>

Forces FairCom DB to continue processing the configuration file when an error occurs. The server logs information about the success and failure of each keyword.

Note: CHECK_CONFIG currently only supports a minimal subset of configuration keywords. Errors with other keywords still terminate server processing of the configuration file.

 

COMPATIBILITY NO_EXTERNAL_SHUTDOWN

COMPATIBILITY NO_EXTERNAL_SHUTDOWN

FairCom DB can be configured to disallow server shutdown attempts made by external c-tree clients. (The term “external clients” refers to clients that communicate with the server through the server's communication subsystem.)

When this option is specified, attempts by external clients to shut down FairCom DB fail with error XSHT_ERR (792). This feature is most useful when FairCom DB is loaded as a DLL or shared library into an application server process. While external clients are prevented from shutting down the process, the application server process can shut down the FairCom DB subsystem by calling the ctThrdTerm() c-tree API function.

 

CONSOLE CTRL_C_ENABLE

CONSOLE CTRL_C_ENABLE

By default, FairCom Server ignores a <CTRL>+C signal. Adding this keyword to ctsrvr.cfg permits <CTRL>+C to stop the FairCom Server.

Default: Disabled

 

CONSOLE NO_MESSAGEBOX

CONSOLE NO_MESSAGEBOX

When activated for Windows machines, this keyword deactivates error messages coming to the console in the form of a message box. The FairCom Server continues to log messages to CTSTATUS.FCS.

Default: Disabled

 

CONSOLE NO_PWRDWNPASSWORD

CONSOLE NO_PWRDWNPASSWORD

Bypass the ADMIN group User ID and password validation typically required at shutdown. When this option is active and a machine shutdown or restart occurs, the prompt is bypassed and the FairCom Server shuts down cleanly.

Default: Request prompts

 

CONSOLE NO_SHUTDOWN_PROMPT

CONSOLE NO_SHUTDOWN_PROMPT

To prevent an accidental unload, the FairCom Server prompts the console to acknowledge the shutdown. The number of active connections is displayed and the user has the option to proceed with the shutdown (unload) or allow the server to continue running. Use the CONSOLE NO_SHUTDOWN_PROMPT keyword to disable this shutdown prompt.

Default: Show prompt

 

CONSOLE TOOL_TRAY

CONSOLE TOOL_TRAY

Under Microsoft Windows, starts the FairCom Server in background, displaying only a c-tree icon in the Windows tool tray. This feature can also be activated with the ampersand, ‘&’, character on the command line. For example:

C:>faircom &

or

C:>ctsrvr &

The server waits until it has created the transaction logs, performed automatic recovery if necessary, and initialized the communication subsystem before displaying the balloon tip. This makes it easier for a developer or a server administrator to know the point in time at which c-tree Server is ready to accept connections.

Default: Disabled

 

CONSOLE W9X_SERVICE

It is possible to execute the FairCom Server as a Windows 95/98 service. Not to be confused with a Windows Server 2003/XP/Vista Service, this support is limited to the Windows 95/98 platform. This feature allows the server to remain in operation even if a user logs off of Windows without shutting down. Add the following keyword to the server configuration file to activate this support:

CONSOLE W9X_SERVICE

This keyword will be ignored on all other platforms except Windows 95/98.

Default: Disabled

 

CTSRVR_CFG

CTSRVR_CFG <path and filename>

Specify the configuration file used when executing the FairCom Server from the command line.

This configuration option can include an environment variable name that will be substituted with its value when the configuration file is read. See Environment Variables in Configuring FairCom DB.

Default: Server Working directory

 

DNODEQ_SHUTDOWN_LIMIT

DNODEQ_SHUTDOWN_LIMIT

FairCom DB supports a configurable limit on the number of delete node queue entries that FairCom DB processes when it is shutting down. If the option DNODEQ_SHUTDOWN_LIMIT is specified in the configuration file, then when FairCom DB shuts down, if there are more than the specified number of entries in the delete node queue, the delete node thread writes all the unique queue entries to a disk stream file named DNODEQUE.FCS. A memory-based index file is used to eliminate duplicate queue entries, and only the unique entries are written to disk. If the number of unique entries is less than DNODEQ_SHUTDOWN_LIMIT, those entries are returned to the delete node queue and are processed by the delete node thread before FairCom DB finishes shutting down.

DNODEQ_SHUTDOWN_LIMIT 0 causes FairCom DB to process all entries in the delete node queue when shutting down.

FairCom DB always attempts to open and read all entries from the file DNODEQUE.FCS into the delete node queue at startup, regardless of the DNODEQ_SHUTDOWN_LIMIT setting. The FairCom Server deletes the file DNODEQUE.FCS after populating the delete node queue with its contents.

An administrator can delete the file DNODEQUE.FCS before starting FairCom DB to avoid processing these persistent delete node queue entries.

 

NO_SHUTDOWN_FLUSH

NO_SHUTDOWN_FLUSH <file name>

With very large (2GB+) caches, it may be possible for a file to never be written to disk during its entire life cycle. When the FairCom Server is shut down, it begins to flush files to disk. In the case of a “scratch” or “temp” file, the application vendor may not care if c-tree flushes this file to disk.

NO_SHUTDOWN_FLUSH skips file flushing during server shutdown. Note that <file name> may specify a wildcard pattern, with ‘?’ replacing a single character and ‘*’ replacing a group of characters. See FairCom DB Standard Wildcards. Non-transaction controlled files can be specified as shown below for this treatment, but such a file will be corrupted after shutdown if file flushing was actually skipped. Transaction-controlled files that are not flushed will simply lengthen automatic recovery times.

Default: Flush at shutdown

 

PLUGIN

Specifies a specially designed plugin module (a DLL or shared library) to be loaded and initialized at startup.

PLUGIN <LABEL>;<DLL>

 

  • <LABEL> - The name used when referencing this plugin in CTSTATUS.FCS error messages.
  • <DLL> - The library that will be loaded at server startup, and unloaded prior to shutdown.

 

PLUGIN_CALLBACK

Record update callbacks are file-based, loading a DLL/SO library on physical file open and unloading the DLL/SO on file close. This design leads to difficulties for more complex callbacks that attempt to maintain longer-term state information. To address this, the PLUGIN keyword functionality has been extended to support loading generic, user-defined libraries once at server startup, and unloading them at server shutdown.

This is enabled by setting in ctsrvr.cfg:

PLUGIN_CALLBACK <LABEL>;<DLL>

where:

  • <DLL> - The library that will be loaded at server startup, and unloaded prior to shutdown.
  • <LABEL> - The name used when referencing this plugin in CTSTATUS.FCS error messages.

When the library is loaded at startup, it must export the following function:

 

int ctDECL ctPlugin_describe(char * name,size_t * size,int request)

and may optionally provide the following functions:

Example

An example implementation is provided in ctrucbdll.c.

Note:

Currently, only Record Update callbacks and Deferred Index callbacks can utilize this PLUGIN_CALLBACK functionality.

 

PROCESS_PRIORITY

PROCESS_PRIORITY

Specifies the FairCom Server's process priority.

Note: Use with caution, as a changing priority can substantially impact other processes on the system, or diminish database performance if decreased.

 

PROCESS_EXIT_COMMAND

PROCESS_EXIT_COMMAND <command>

Used to run a command when the FairCom DB process calls the system function exit(). Before running the command, FairCom DB sets the following environment variables:

CTREE_PROCESS_ID is set to the FairCom DB process ID.

CTREE_SHUTDOWN_STATE is set to one of the following database engine shutdown status codes:

0 Shutdown not initiated.

1 Shutdown initiated.

2 Shutdown completed, but some clients remain active.

3 Shutdown completed with all files closed and final checkpoint logged.

Description

At shutdown the server calls the application indicated by the PROCESS_EXIT_COMMAND keyword within that application. It is possible to access the CTREE_PROCESS_ID and the CTREE_SHUTDOWN_STATE environment variables that exist within the scope of that application.

Example:

Create test.bat in the server executable directory, containing the following:

@echo %CTREE_PROCESS_ID% > shutdown.txt

@echo %CTREE_SHUTDOWN_STATE% >> shutdown.txt

Add this line to ctsrvr.cfg:

PROCESS_EXIT_COMMAND .\test.bat

Start the server and then stop it.

The content of shutdown.txt (created by test.bat) will be something like the following:

27700

3

Where 27700 indicates the c-tree server PID and 3 is the shutdown state (clean shutdown).

 

SIGNAL_DOWN

SIGNAL_DOWN <executable>

Ability to launch an application when the FairCom Server comes down. This keyword takes as its argument the name of an executable that will be launched when the FairCom Server has been successfully terminated. Supported by FairCom Server for Unix and Windows.

This configuration option can include an environment variable name that will be substituted with its value when the configuration file is read.

Default: OFF

See Also

SIGNAL_READY

 

SIGNAL_READY

SIGNAL_READY <executable>

Ability to launch an application when the FairCom Server comes up. This keyword takes as its argument the name of an executable, which will be launched when the FairCom Server is ready (i.e., automatic recovery is completed). Supported by FairCom Server for Unix and Windows.

This configuration option can include an environment variable name that will be substituted with its value when the configuration file is read.

Default: OFF

See Also

SIGNAL_DOWN

 

STACK_DUMP

STACK_DUMP {OFF | STACK_ONLY | CONTEXT | FULL_DUMP }

A server crash triggered by the Windows Exception Handler now defaults to generating a full dump (similar to a Unix core), while other diagnostic stack trace generation creates a smaller dump without heap memory. Prior to this change, a full dump was only generated if DIAGNOSTICS FULL_DUMP was enabled. A new server keyword has been added to control stack generation:

  • OFF - Disables all diagnostic stack generation (available on Windows & unix systems).
  • STACK_ONLY - all diagnostic stack generation is stack only (available on Windows & unix systems).
  • CONTEXT - Default. Special diagnostic situations may trigger a full dump. (behaves as STACK_ONLY on unix)
  • FULL_DUMP - All stack generation triggers a full dump (behaves as STACK_ONLY on Unix)

STACK_DUMP FULL_DUMP is equivalent to the preexisting keyword DIAGNOSTICS FULL_DUMP on Windows. DIAGNOSTICS FULL_DUMP should be considered deprecated, and may be removed in future versions.

The server admin can change STACK_DUMP during runtime.

Compatibility Note: This is a Behavior Change.

 

USER_SIGNAL_DOWN

USER_SIGNAL_DOWN my_parameter

Developers using the c-tree Server SDK may define functionality to occur at Server shutdown.

This keyword passes my_parameter to a user-defined function in ctclbk.c, which the developer should alter to suit the needs of the custom server:

NINT ctusersig_down(TEXT mystring)

This keyword can be specified multiple times with different parameters to accomplish different tasks provided the user-defined function is implemented accordingly.

Default: OFF

See Also

USER_SIGNAL_READY

SIGNAL_DOWN

SIGNAL_READY

 

USER_SIGNAL_READY

USER_SIGNAL_READY my_parameter

Developers using the c-tree Server SDK may define functionality to occur at Server startup.

This keyword passes my_parameter to a user-defined function in ctclbk.c, which the developer should alter to suit the needs of the custom server:

NINT ctusersig_ready(TEXT mystring)

This keyword can be specified multiple times with different parameters to accomplish different tasks provided the user-defined function is implemented accordingly.

Default: OFF

See Also

USER_SIGNAL_DOWN

SIGNAL_DOWN

SIGNAL_READY

 

WAIT_ON_SHUTDOWN_SEC

WAIT_ON_SHUTDOWN_SEC <seconds>

Permits explicit control on how long to wait for server shutdown. If all of the wait loops have been exhausted, and if it appears that some users are still not disconnected or that some files are still pending close, and if the wait specified with this key word has not been exceed, the server will retry its shut down loops. The new key word defaults to zero: no additional waiting. A negative values means to wait forever. A positive value specifies the time to wait. Due to sleeps within the shutdown loops, the actual wait time might exceed the specified time by an amount on the order of fifteen seconds, possibly more.

 

DIAGNOSTICS SHUTDOWN_COMM

DIAGNOSTICS SHUTDOWN_COMM

Logs messages showing the operations performed at server shutdown to disconnect client connections.

Entries logged via this diagnostic option start with the text

shutdown_diag:

Additionally, with this option, the FairCom Server logs the details for each active thread that exists when the server begins to shut down, in the same format produced when using the DIAGNOSTICS REMAINING_THREADS keyword.

 

Cache and Memory

FairCom DB allows extremely fine tuned cache and memory management beyond basic data cache and index cache pool sizes. This section covers options that control this granularity, including per user memory limits.

 
NONTRAN_DATA_FLUSH_SEC, NONTRAN_INDEX_FLUSH_SEC, TRAN_DATA_FLUSH_SEC, TRAN_INDEX_FLUSH_SEC

Configure a fixed rate of background flushing of updated data cache pages and index cache.

 
BUFBLK_RATIO

Specifies the number of index cache pages in each block list mutex.

 
BUFFER_RUNLENGTH

Specifies the number of consecutive write operations performed while walking a list of buffer/cache pages before allowing other threads to acquire control of the list.

 
BUFR_MEMORY

Specifies the size of memory blocks the FairCom Server uses in conjunction with data and index caches.

 
COMPATIBILITY LARGE_CACHE

Permits the DAT_MEMORY and IDX_MEMORY values to be reinterpreted as megabytes instead of bytes.

 
CACHE_STAT_ARRAY_SIZE

Override the number of cache hit counters.

 
COMPATIBILITY MINIMUM_INDEX_BUFFERS

Restores behavior prior to V11 where the index cache memory was expanded past the specified limit to allow more concurrent index threads.

 
DATA_LRU_LISTS

Specifies how many LRU lists are maintained for data cache pages. Note: The LRU algorithm is no longer used for the data cache.

 

Dynamic Data and Index Cache

Allows changing data and index cache sizes without restarting the FairCom Server.


GUEST_MEMORY

Specifies the memory usage limit in bytes for a user without a User ID.

 
INDEX_LRU_LISTS

Specifies how many LRU lists are maintained for index cache pages.

 
LIST_MEMORY

Specifies the size of memory “chunks” the FairCom Server uses for various internal data structures.

 
LMT_MEMORY

Sets the maximum size for a single allocation using the FairCom DB memory suballocator.

 
MEMORY_HASH

Causes 8 times the specified number of lists to be created (8 for each internal memory suballocator).

 
MPAGE_CACHE

When set to a non-zero value, N, causes records falling within N+2 cache pages to be stored entirely within the cache.

 
NONTRAN_FILESYS_FLUSH_OFF

When set to Yes, suppresses calls to flush updated file system cache pages to disk for all non-TRNLOG data and index files.

 
NO_CACHE

Specifies files that are NOT be cached.

 
PRIME_CACHE and PRIME_INDEX (PRIME_CACHE, Prime Cache)

Specifies data and index files to be added to the priming list and the number of bytes to be loaded into cache when physically opening the file.

 

PRIME_CACHE_AT_STARTUP

Specifies data and index files to be added to the priming list and the number of bytes to be loaded into cache when the server starts up.

 
PRIME_CACHE_BY_KEY

Prime be the data cache from the specified file with the specified number of bytes by the specified index in forward or reverse order.

 
SORT_MEMORY

Specifies the size of sort buffers used by the FairCom Server.

 
SPECIAL_CACHE_FILE

Dedicates a specified amount of cache memory to a particular Extended data file.

 
TOT_MEMORY

Note: TOT_MEMORY is a deprecated keyword. FairCom does not recommend setting a total memory limit.

Specifies the total number of bytes the system will attempt to allocate for all uses (including index and data caches specified by the IDX_MEMORY and DAT_MEMORY keywords).

 
USR_MEM_RULE

Sets the system default rule for FairCom Server action when a user exceeds his/her memory limit.

 
USR_MEMORY

Specifies the system default limit of memory (in bytes) available to each user.

 

*_FLUSH_SEC background flush rate reduces contention

In FairCom DB V11.0 and later, the following background flush thread configuration options remove the dirty cache page flushing overhead from the checkpoint logic, and place this important requirement on these new dedicated background threads:

NONTRAN_DATA_FLUSH_SEC
NONTRAN_INDEX_FLUSH_SEC
TRAN_DATA_FLUSH_SEC
TRAN_INDEX_FLUSH_SEC

This change reduces the time that other threads are blocked waiting to acquire the update list mutex and has smoothed out performance curves for high-speed systems. If you would like a more thorough refresher on this change, please review this topic in the V11.0 Update Guide: Controls for Performance AND Safety of Non-Transaction Updates.

Configuring background flush at a given rate

Starting with FairCom DB V11.5, it’s now possible to configure a fixed rate of background flushing of updated data cache pages and index buffers, which provides the ability to further smooth out performance curves, reducing periodic drops in performance. The two parameters that can be specified for the background flushing are:

  • msec - The time in milliseconds to defer after flushing, and
  • nfls - The number of flushes after which the defer occurs.

With this new change, the keywords now support specifying these new parameters using the syntax rate=<msec>/<nfls>.

For example, to defer for 1 millisecond after every two flushes of updated TRNLOG data cache pages, use this option:

TRAN_DATA_FLUSH_SEC rate=1/2

The rate value sets a maximum speed at which the background flush threads will write updated buffers to disk. The goal is to flush updated pages quickly enough that the total number of updated buffers does not become extremely large (which could cause the number of transaction logs to increase and could cause checkpoints to take more time to build the list of updated pages and their corresponding transaction numbers and write them to disk), without flushing at too fast a rate, which would impact performance. The msec and nfls values can be used to set the maximum rate of flushing. FairCom suggests starting with rate=1/1, which means delay for one millisecond after every buffer flush. In our testing, we have found 1/1, or 1/2 to be the optimal settings.

 

BUFBLK_RATIO

BUFBLK_RATIO <ratio of index cache pages to block list mutexes>

The default ratio is 64. This means a block list mutex for every 64 index cache pages. The BUFBLK_RATIO keyword can override the default. A ratio of one (1) means a mutex for every cache page. A configuration entry of zero is ignored (and the compile-time default is used). The advantage of the ratio specification is that the BUFBLK configuration entry does not have to be changed when the IDX_MEMORY entry is changed.

Note: Contact FairCom for details on this extremely advanced configuration option as this can severely impact online performance.

 

BUFFER_RUNLENGTH

BUFFER_RUNLENGTH <number of write operations>

This setting should be changed only at the request of your application developer. BUFFER_RUNLENGTH specifies the number of consecutive write operations performed while walking a list of buffer/cache pages before allowing other threads to acquire control of the list. A negative value is ignored.

Default: 10

 

BUFR_MEMORY

BUFR_MEMORY <bytes>

Specifies the size of memory blocks the FairCom Server uses in conjunction with data and index cache buffers. To minimize interaction with the underlying system memory manager, the FairCom Server manages its own blocks of memory out of which the buffer pages are allocated. The FairCom Server acquires one large block of memory and allocates smaller pieces as needed. If you are attempting to limit memory use by reducing IDX_MEMORY and/or DAT_MEMORY, set BUFR_MEMORY to about one eighth of the smaller of IDX_MEMORY and DAT_MEMORY.

Default: 64000

See Also

 

CACHE_STAT_ARRAY_SIZE

CACHE_STAT_ARRAY_SIZE <number>

By default, cache hit counters are allocated for each CPU available to the server. In v11.0 and later, you can override the number of cache hit counters by specifying a lower number with this keyword. For example, adding CACHE_STAT_ARRAY_SIZE 1 would limit the server to a single cache hit counter.

 

COMPATIBILITY LARGE_CACHE

COMPATIBILITY LARGE_CACHE

To configure large data and index cache sizes, add COMPATIBILITY LARGE_CACHE to the FairCom Server configuration file. This keyword permits the DAT_MEMORY and IDX_MEMORY values to be reinterpreted as megabytes instead of bytes.

If the byte value in the configuration file is less than or equal to 64000, then the value is reinterpreted as megabytes. This permits up to 64GB of index or data cache to be requested. If the value is greater than 64000, it is interpreted as bytes (just as without the LARGE_CACHE option). If the LARGE_CACHE option is not used, the values for DAT_MEMORY and IDX_MEMORY are interpreted as bytes, regardless of their values.

Example

COMPATIBILITY LARGE_CACHE

IDX_MEMORY 100000000

DAT_MEMORY 4096

Requests 100 million bytes of index cache, and 4 GB of data cache.

Limitations

  • The FairCom Server does not check that the specified amount of memory actually exists as available physical memory on the system. To avoid FairCom Server startup errors or performance degradation due to memory swapping, ensure that enough physical memory is available to accommodate the specified data and index cache sizes.
  • The FairCom Server does not support this option on systems that do not support LARGE_CACHE. These systems are identified as 32-bit systems that do not have SYS_LONG8 defined in their ctcmpl.h include file.

 

COMPATIBILITY MINIMUM_INDEX_BUFFERS

COMPATIBILITY MINIMUM_INDEX_BUFFERS

In V11.1 and later, the FairCom Server will prevent the index cache memory from going higher than the value specified by the IDX_MEMORY keyword by limiting the number of threads that can concurrently work on index updating, if necessary.

Add COMPATIBILITY MINIMUM_INDEX_BUFFERS to the ctsrvr.cfg file to restore the previous behavior where the index cache memory was expanded past the specified limit to allow more concurrent index threads.

 

DAT_MEMORY

DAT_MEMORY <bytes>

The memory allocated to the data cache, specified in bytes. Within the memory constraints of the hardware, there is no effective limit.

Default: 100 MB

Note: Prior to V11, the default value for both the standard FairCom DB Server and the FairCom DB SQL Server was 600 * PAGE_SIZE. Assuming a default page size of 8192, the default DAT_MEMORY would be 4915200.

See Also

 

DATA_LRU_LISTS

DATA_LRU_LISTS <number of lists>

Note: The LRU algorithm is no longer used for the data cache.

To reduce mutex contention, the cache control model permits the configuration keywords DATA_LRU_LISTS and INDEX_LRU_LISTS to specify how many LRU lists are maintained for data cache pages and index cache pages, respectively.

On Windows, Solaris, and AIX, the default is based on the number of available CPUs on the system and the CPU limit specified in the license file. Otherwise, DATA_LRU_LISTS defaults to 4.

See Also

INDEX_LRU_LISTS

 

GUEST_MEMORY

GUEST_MEMORY <bytes>

If greater than zero, this is the memory usage limit in bytes for a user without a User ID (i.e., a GUEST user).

Default: 0


 

 

IDX_MEMORY

IDX_MEMORY <bytes>

The memory allocated to the index cache, specified in bytes. Within the memory constraints of the hardware, there is no effective limit. High-speed buffer search routines ensure quick access to the entire cache.

Default: 100 MB

Note: Prior to V11, the default value for both the standard FairCom DB Server and the FairCom DB SQL Server was 600 * PAGE_SIZE. Assuming a default page size of 8192, the default DAT_MEMORY would be 4915200.

See Also

 

INDEX_LRU_LISTS

INDEX_LRU_LISTS <number of lists>

To reduce mutex contention, the new cache control model permits the configuration keywords DATA_LRU_LISTS and INDEX_LRU_LISTS to specify how many LRU lists are maintained for data cache pages and index cache pages, respectively.

On Windows, Solaris, and AIX, the default is based on the number of available CPUs on the system and the CPU limit specified in the license file. Otherwise, INDEX_LRU_LISTS defaults to 4.

See Also

DATA_LRU_LISTS

 

LIST_MEMORY

LIST_MEMORY <bytes>

Indicates the size of the memory blocks that are allocated by FairCom Server for internal in-memory data structures. It does not represent the actual memory size of a specific table and/or structure.

To conserve memory, this keyword can be set to a low value, such as 4096.

In situations with large amounts of available memory, the value can be increased beyond the default up to the maximum limit. This can improve performance at the expense of increased memory usage.

The vast majority of our customers never set this value to more than 1MB, which is a good compromise between memory usage and performance gains.

Maximum: 10MB

Default: 16384

 

LMT_MEMORY

LMT_MEMORY <limit>

Sets the maximum size for a single allocation using the FairCom DB memory suballocator. If this limit is exceeded a message is output to CTSTATUS.FCS and a NULL memory pointer is returned.

Default: 2GB

Note: A terr(7491) occurs and an informative message is sent to CTSTATUS.FCS.

In FairCom DB V11 and later:

Prior to this modification, FairCom Server's LMT_MEMORY configuration option defaulted to 128MB, meaning that a single memory allocation could not exceed 128MB. However, this limit restricted the size of variable-length records from FairCom Server and limited the amount of memory that could be allocated with the RECOVER_MEMLOG recovery option.

This limit has been disabled by default. If LMT_MEMORY is not specified, FairCom Server does not place a limit on the size of a single memory allocation. If desired, LMT_MEMORY can be specified in ctsrvr.cfg setting a desired maximum allocation size.

Note: This modification results in a behavior change.

This change also applies to standalone mode: #define ctMEMLMT is set to zero by default, meaning no memory allocation size limit. If desired, FairCom DB can be compiled with ctMEMLMT defined to a non-zero value.

 

MEMORY_HASH

The FairCom DB internal memory suballocator utilizes 11 lists, each dedicated to a particular range of allocation size and each controlled by a single mutex. An expanded model improves scalability, especially when a large number of memory allocation or free operations take place at once.

The server configuration keyword MEMORY_HASH <N> causes 11N lists to be created, with N dedicated to a particular range of allocation size. On Windows, Solaris, and AIX, the default is based on the number of available CPUs on the system and the CPU limit specified in the license file. Otherwise, MEMORY_HASH defaults to 4.

The MEMORY_HASH configuration requires aligned memory boundaries. If a particular server build is compiled without the proper alignment property, a messages is logged to CTSTATUS.FCS indicating this when this keyword is active:

- User# 00001 Configuration error: ctsrvr.cfg, line 3: This c-tree Server does not meet the compile-time requirements to support the MEMORY_HASH keyword.

 

MPAGE_CACHE

MPAGE_CACHE <bytes>

The FairCom DB data cache uses the following approach to cache data record images:

  • If the data record fits entirely within one or two cache pages (PAGE_SIZE bytes per cache page), then the entire record is stored in the cache.
  • If the data record image covers more than two cache pages, then the first and last segments of the record are store in the cache, but the middle portion is read from or written to the disk. These direct I/O’s are efficient operations since they are aligned and are for a multiple of the cache page size.

The nature of this approach can be modified. Set MPAGE_CACHE to a value greater than zero, N, to store records falling within N+2 cache pages entirely within the cache. The default value is zero, behaves as described above.

Note: Setting MPAGE_CACHE greater than zero does NOT ensure faster system operation. It is more likely to be slower than faster. It does cause more of a record to be in cache, but there is increased overhead managing each individual cache page. The cache pages for consecutive segments of a record (where a segment fills a cache page) are completely independent of each other. They are not stored in consecutive memory and I/O is performed separately for each cache page. This configuration option should only be used for special circumstances with careful, realistic testing.

Note: Even a record smaller than a single cache page may require two cache pages because the record position is generally not aligned on a cache page boundary.

Default: 0

 

NO_CACHE

NO_CACHE <data file name>

In some cases, it might be beneficial to define that a certain file NOT be cached. For example, if a file contains very large variable length records (BLOBS), it might be more efficient to bypass the cache and rely solely on the operating systems cache support. The FairCom Server does not store the full variable length record in cache, but retains the first and last page of the variable length record. This prevents large blocks of data from consuming the cache and also alleviates the management of a large number of cache pages for any one particular record. NO_CACHE disables cache for a given file.

Note: <data file name> may include a wildcard pattern using ‘?’ for a single character and ‘*’ for zero or more characters. See FairCom DB Standard Wildcards. The Server Administrator can specify multiple NO_CACHE configuration entries.

Caching can only be turned off for entire superfiles (i.e., the superfile host), not for individual superfile members. Index files require the use of index cache pages and must be cached.

Default: Cache files

 

NONTRAN_FILESYS_FLUSH_OFF

NONTRAN_FILESYS_FLUSH_OFF <YES | NO>

FairCom DB suppresses calls to flush updated file system cache pages to disk for all non-TRNLOG data and index files, except during a call to CTFLUSH(). This is a performance enhancement for non-transaction and PREIMG files.

Note that this default behavior may introduce a vulnerability to possible data loss in the event of a system crash if updates to a FairCom DB data or index file have been written to the file system cache but not yet written to disk. This can be mitigated by installing a battery backup (UPS) on the system so the file-system cache can still be flushed in case of a power failure. Note that this does not introduce any vulnerability involving abnormal termination of the FairCom DB Server process, as it only affects file system caching, not c-tree caching behavior.

YES suppresses the flush calls, and NO enables the flush calls. This option can also be changed at runtime.

 

PRIME_CACHE

The FairCom Server optionally maintains a list of data files and the number of bytes of data cache to be primed at file open. When priming cache, the server reads the specified number of bytes for the given data file into data cache when physically opening the data file.

Data files are added to the priming list with configuration entries of the form:

PRIME_CACHE <data file name>#<bytes primed>

For example, the following keyword instructs the server to read the first 100,000 bytes of data records from customer.dat into the data cache at file open:

PRIME_CACHE customer.dat#100000

A dedicated thread performs cache priming, permitting the file open call to return without waiting for the priming to be accomplished.

Use PRIME_CACHE with the SPECIAL_CACHE_FILE keyword to load dedicated cache pages at file open.

A <data file name> or <index file name> can be a wildcard specification using a ‘?’ for a single character and a ‘*’ for zero or more characters. See FairCom DB Standard Wildcards.

Default: No priming

See Also

PRIME_CACHE_AT_STARTUP

PRIME_INDEX (PRIME_INDEX, Prime Index)

PRIME_CACHE_BY_KEY

 

PRIME_CACHE_AT_STARTUP

These features are available beginning with V13.

FairCom Server technology supports configuration options that are used to prime the server's data and index caches when the server starts up. The functionality is similar to cache priming configuration options PRIME_CACHE, PRIME_CACHE_BY_KEY, and PRIME_INDEX, except that those options take effect only when an application opens the files.

This feature relies on atomic operations. If atomic operation support is off at compile time, the feature will be disabled.

The new configuration options are specified in JSON format, such as in the following example:

subsystem cache prime_cache_at_startup {

"allow_connections": true,

"thread_count": 8,

"prime_cache": [

{"file": "filename1.dat", "size": "1 gb"},

{"file": "filename2.dat"}

],

"prime_cache_by_key": [

{"file": "filename1.dat", "size" : "1 gb", "index": 1, "reverse": false},

{"file": "filename2.dat", "size" : "1 gb", "index": 1}

],

"prime_index": [

{"file": "filename1.dat", "size": "1 gb", "index": 1},

{"file": "filename2.dat", "size": "1 gb", "index": 1}

]

}

Supported attributes:

  • allow_connections is a boolean value that indicates if connections to the server are allowed while the cache priming is performed at server startup. Defaults to false.
  • thread_count is an integer value that sets the number of threads to use to prime the cache. It defaults to 4. Maximum is 255.
  • prime_cache is an array of names of data files that are to be read into the cache in physical order, and an optional size indicating the maximum number of bytes to read into data cache for the file. The file name is a string. The file name can include wildcard characters (for example, *.dat). The wildcard characterdoes not recurse into subdirectories. The size can include a suffix, such as kb, mb, gb, tb (for example, "1 gb"). If size is not specified, the entire file is read into the data cache.
  • prime_cache_by_key is an array of names of data files that are to be read into the cache in the order of the specified index. The index number is a positive value, where 1 means the first index. If the index number is omitted, the first index is used. Size has the same definition as for prime_cache. Reverse is a boolean indicating whether the key traversal is in ascending or descending key order.
  • prime_index is an array of names of index files that are to be read into the index cache. Size and index have the same meaning as for prime_cache_by_key.

In addition to the specified size limits, the data and index cache sizes limit the cache priming as follows:

prime_cache and prime_cache_by_key stop if the data cache becomes full.

prime_index stops if the index cache becomes full.

The SUBSYSTEM CACHE PRIME_CACHE_AT_STARTUP configuration option can be specified in a server settings file. If it is used in a settings file, the option cannot also be used in the configuration file. In that case, the subsystem is considered blocked and the configuration file options are ignored. Likewise, if this subsystem is specified more than once in the configuration file, only the first occurrence of the subsystem block takes effect. The other occurrences are ignored.

The subsystem can be commented out by placing a semicolon at the start of the SUBSYSTEM line. However, individual lines within the subsystem block cannot be commented out. Attempting to do so will cause a syntax error.

By default, the server logs information about the files that it loads into cache to CTSTATUS.FCS. The configuration option CTSTATUS_MASK PRIME_CACHE_AT_STARTUP can be used to disable this logging.

See Also

PRIME_INDEX (PRIME_INDEX, Prime Index)

PRIME_CACHE

PRIME_CACHE_BY_KEY

 

PRIME_INDEX

The FairCom Server optionally maintains a list of data and index files and the number of bytes of data and/or index cache to be primed at file open. When priming cache, the server reads the specified number of bytes for the given data file into data cache when physically opening the data file.

To prime index files, use configuration entries of the form:

PRIME_INDEX <idx file name>#<bytes primed>[#<member no>]

If the optional <member no> is omitted, all index members are primed. If an index member number is specified, only that member is primed. For example, the following keyword instructs the server to read the first 100,000 bytes of index nodes in customer.idx into the index buffer space at file open:

PRIME_INDEX customer.idx#100000

The nodes are read first for the host index, and then for each member until the entire index is primed or the specified number of bytes has been primed.

The following example restricts the priming to the first member (the index after the host index):

PRIME_INDEX customer.idx#100000#1

A <data file name> or <index file name> can be a wildcard specification using a ‘?’ for a single character and a ‘*’ for zero or more characters. See FairCom DB Standard Wildcards.

Default: No priming

See Also

PRIME_CACHE (PRIME_CACHE, Prime Cache)

PRIME_CACHE_BY_KEY

 

PRIME_CACHE_BY_KEY

PRIME_CACHE_BY_KEY <data_file_name>#<data_record_bytes_to_prime>#<index_number>

The PRIME_CACHE configuration option supports priming the data cache with the specified number of bytes of data from the specified data file, in physical order from the start of the data file. PRIME_CACHE_BY_KEY supports priming the data cache in forward AND reverse order by index.

  • data_file_name specifies the name of the c-tree data file whose records are to be read into the FairCom Server’s cache. The file name may include wildcard characters (see FairCom DB Standard Wildcards).
  • data_record_bytes_to_prime specifies the maximum number of bytes of data records to read into the FairCom Server’s cache.
  • index_number specifies the relative key number of the index to use when reading the data records. Specify 1 to indicate the first index, 2 to indicate the second index, etc., based on the index definitions stored in the data file’s IFIL resource. Specify a negative value to indicate that records should be read in reverse key order by that index.

Example

PRIME_CACHE_BY_KEY mark.dat#100000000#-1

Primes up to 100,000,000 bytes from mark.dat reading by the first index in reverse key order.

See Also

PRIME_CACHE and PRIME_INDEX

 

SET_CACHE_OPTIONS

Memory caching of data is one of the most important subsystems of a database server, including FairCom DB. Caching allows the database process to optimally serve clients with data directly from memory when possible. Separate independent memory caches are used for data and indexes (buffers). Proper cache sizing is a critical performance tuning task of the database administrator. Too little memory, and the database engine becomes bottlenecked with persisted storage I/O. Too much, and not enough memory is made available to the operating system and other applications running on the host machine.

Cache resizing is a powerful feature for performance tuning with increasing database loads. Adding additional client connections, thus increasing user concurrency, frequently benefits from larger caches. Another situation is a very large ad-hoc database load or query where temporarily having a larger memory cache improves overall performance. Changing a cache size requires restarting the FairCom DB server process which is not an easy task in the 24/7 enterprise environment.

FairCom DB "hard" allocates memory for caches at server startup directly from the OS memory heap. Once allocated, the memory is permanently associated with the database for the life of the process. Allocated memory is chunked into page size blocks within the memory cache subsystem, historically making it difficult to resize as needed. An additional complication is how to handle existing data residing in cache. Losing that "hot" data will likely result in performance loss for connected applications until a runtime steady state is again achieved over time.

FairCom has had increasing requests for ability to change cache sizes at runtime and this release introduces dynamic cache resizing. Now, you can fine tune data and index caches as performance demands based on database connections and load avoiding costly database down time.

dynamic_cache_resize_flat_wide

How to Resize Your Current Cache

The server administrator utility, ctadmn, supports a new configuration option set_cache_options as a parameter. This is followed with a null-terminated JSON string with desired options. Supported cache options are as follows:
 

  • "timeout": <timeoutInSeconds> where <timeoutInSeconds> is the maximum number of seconds to wait for active transactions to complete when quiescing the server in order to change the cache sizes. The default timeout is 1 second.
     
  • "dat_memory": "<new_data_cache_size>" where <new_data_cache_size> is an integer cache size followed by optional suffix such as mb for megabytes or gb for gigabytes. For example, "dat_memory": "100 mb". If not specified, the data cache size is not changed.
     
  • "idx_memory": "<new_index_cache_size>" where <new_index_cache_size> is an integer cache size followed by optional suffix such as mb for megabytes or gb for gigabytes. For example, "idx_memory": "200 mb". If not specified, the index cache size is not changed.
     
  • "keep_cached_data": "<yes_or_no>" where <yes_or_no> is either yes, which means the currently-cached data is kept in the data cache, or no, which means the currently-cached data is removed from the data cache. The default is yes.
     
  • "keep_cached_nodes": "<yes_or_no>" where <yes_or_no> is either yes, which means the currently-cached nodes are kept in the index cache, or no, which means the currently-cached nodes are removed from the index cache. The default is yes.

Administrator Utility Usage

From ctadmn, choose option 10 "Change the specified configuration option"


Change Server Settings:

 

1. Configure function monitor

2. Configure checkpoint monitor

3. Configure memory monitor

4. Configure request time monitor

5. Change dynamic dump sleep time

6. Change dynamic dump sleep interval

7. Enable or disable a status log mask option

8. Change advanced encryption master password

9. Change a DIAGNOSTICS option

10. Change the specified configuration option

11. Change Logon Block Settings

 

Enter your choice (1-11), or 'q' to return to previous menu>> 10

 

Enter the configuration option and its value >> set_cache_options {"dat_memory": "200 mb"}

 

Successfully changed the configuration option.

 

 

Press RETURN to continue...

Expected Status Log Messages

The resize request triggers an internally generated server quiesce state with the following common messages.


Mon Jun 13 13:47:51 2022 - User# 00030 ctQUIET: attempt quiet transaction state with action: 1100a0x timeout: 1 sec

Mon Jun 13 13:47:51 2022 - User# 00030 ctQUIET: blocking call with action: 641a2x

Mon Jun 13 13:47:54 2022 - User# 00030 Transaction aborted at ctQTaborttran for user# 33: 817

Mon Jun 13 13:47:54 2022 - User# 00030 Transaction aborted at ctQTaborttran for user# 40: 817

Mon Jun 13 13:47:54 2022 - User# 00030 Transaction aborted at ctQTaborttran for user# 47: 817

Mon Jun 13 13:47:54 2022 - User# 00030 Transaction aborted at ctQTaborttran for user# 52: 817

Mon Jun 13 13:47:54 2022 - User# 00030 Transaction aborted at ctQTaborttran for user# 58: 817

Mon Jun 13 13:47:54 2022 - User# 00030 Transaction aborted at ctQTaborttran for user# 65: 817

Mon Jun 13 13:47:54 2022 - User# 00030 ctQUIET: end of blocking call

Mon Jun 13 13:47:54 2022 - User# 00030 Using 3 index node LRU lists with 3962 buffers per list

Mon Jun 13 13:47:54 2022 - User# 00030 ctQUIET: unblocking call with action: 809e00x

Mon Jun 13 13:47:55 2022 - User# 00030 ctQUIET: end of unblocking call

Examples

  1. Set data cache size to 100 MB and keep existing data in cache (since "keep_cached_data" defaults to "yes"). No change to index cache. In this example, if data cache is already 100 MB, no action is taken:

set_cache_options {"dat_memory": "100 mb"}
 

  1. Set data cache size to 100 MB and remove all data from data cache:

set_cache_options {"dat_memory": "100 mb", "keep_cached_data": "no"}
 

  1. Keep current data cache size and remove all data from data cache:

set_cache_options {"keep_cached_data": "no"}
 

  1. Set index cache size to 200 MB and keep existing nodes in cache:

set_cache_options {"idx_memory": "200 mb"}
 

  1. Set index cache size to 200 MB and remove all nodes from index cache:

set_cache_options {"idx_memory": "200 mb", "keep_cached_nodes": "no"}
 

  1. Keep current index cache size and remove all nodes from index cache:

set_cache_options {"keep_cached_nodes": "no"}
 

This example shows actions on both data and index cache:

set_cache_options {"dat_memory": "500 mb", "idx_memory": "400 mb", "keep_cached_nodes": "no", "timeout": 5}
 

Direct SDK API

An application that is logged in as the ADMIN user can change data and/or index caches by calling the ctSETCFG() API function with option of setcfgCONFIG_OPTION and value set to:

set_cache_options {<cache_options>}

where <cache_options> is the null-terminated string in JSON format.
 

This example showing how to change the cache sizes in C or C++ code by calling the ctSETCFG() API function:

NINT rc;

rc = ctSETCFG(setcfgCONFIG_OPTION, "set_cache_options {\"dat_memory\": \"100 mb\"}");
 

Diagnostic Logs

The configuration option DIAGNOSTICS RESIZE_CACHE, which can be specified in ctsrvr.cfg and changed at runtime, causes cache resize diagnostic messages to be logged to CTSTATUS.FCS.

 

SORT_MEMORY

SORT_MEMORY <bytes>

Specifies the size of sort buffers used by the FairCom Server. To conserve memory, set this value to 8192 or 4096. If large amounts of memory are available, the value can be increased significantly beyond the default. This value must be less than the maximum segment size in segmented architectures.

The SORT_MEMORY keyword specifies the memory size in bytes and can use the MB and GB keywords (unlike MAX_K_TO_USE).

The maximum SORT_MEMORY value is:

  • 4 TB - 1 for 64-bit FairCom DB
  • 4 GB - 1 for 32-bit FairCom DB

As the SORT_MEMORY option is more intuitive, its use is recommended over MAX_K_TO_USE. (MAX_K_TO_USE remains available for backward compatibility). If both SORT_MEMORY and MAX_K_TO_USE are specified in ctsrvr.cfg, only the one that is specified last in the configuration file takes effect.

Default: 100 MB

See Also

 

SPECIAL_CACHE_FILE

SPECIAL_CACHE_FILE <datafilename>#<bytes to cache>

Note: This keyword was removed in V11 and later (notice this impacts FairCom RTG V2.0 and later). We are in the process of reintroducing this support into V12 (FairCom RTG V3.0). This keyword is still accepted by the parsing engine, and the Server engine will start, however the support is inactive so there are no benefits to adding this keyword at this time.

Dedicates a specified amount of cache memory to a particular Extended data file. This allows the Server Administrator to specify files that are critical to maintain in cache memory at the expense of the “least-recently-used” (LRU) approach, where a new cache page replaces the LRU existing page.

For example, the following keywords specify 100,000 bytes of dedicated cache for customer.dat and 400,000 bytes for data\inventory.dat:

SPECIAL_CACHE_FILE customer.dat#100000

SPECIAL_CACHE_FILE data\inventory.dat#400000

The <datafilename> can be a wildcard specification using a ‘?’ for a single character and a ‘*’ for zero or more characters. See FairCom DB Standard Wildcards.

 

Default: None

See Also

SPECIAL_CACHE_PERCENT

 

SPECIAL_CACHE_PERCENT

SPECIAL_CACHE_PERCENT <percentage>

Note: This keyword was removed in V11 and later (notice this impacts FairCom RTG V2.0 and later). We are in the process of reintroducing this support into V12 (FairCom RTG V3.0). This keyword is still accepted by the parsing engine, and the Server engine will start, however the support is inactive so there are no benefits to adding this keyword at this time.

Specifies the percentage of the overall data cache space that may be dedicated to individual files. For example, the following keyword would permit up to 10% of the total data cache pages to be assigned to files on the special cache file list:

SPECIAL_CACHE_PERCENT 10

To disable any special cache, enter -1 for the percentage. The percentage defaults to 50% and the maximum amount that can be specified with the keyword is 90%.

 

Default: 50%

See Also

SPECIAL_CACHE_FILE

 

TOT_MEMORY

TOT_MEMORY <bytes>

This keyword has been Deprecated.

If greater than zero, the total number of bytes the system will attempt to allocate for all uses (including index and data caches specified by the IDX_MEMORY and DAT_MEMORY keywords). If the system usage exceeds this level, attempts will be made to reduce discretionary allocations. If zero, no memory limit is imposed.

The TOT_MEMORY option will cause an operation to fail with an insufficient memory error such as TSHD_ERR (72) or QMEM_ERR (92) when the memory limit is reached. If this limit is exceeded, it may cause a user to flush preimage memory, but it will cause a TSHD_ERR (72) if the system limit is exceeded during preimage operations.

Memory management attempts to permit the server to survive exceeding the optional TOT_MEMORY limit. Although every effort is made to avoid this situation, it is possible that using this option could cause FairCom Server to terminate if it needs memory in a critical situation and cannot get memory, even if memory is available on the system. For these reasons, the use of this option can be risky.

Default: 0

See Also

BUFR_MEMORY

DAT_MEMORY

IDX_MEMORY

USR_MEMORY

 

USR_MEM_RULE

USR_MEM_RULE <GUIDELINE | ABSOLUTE>

The system default rule for FairCom Server action when a user exceeds his/her memory limit. This rule is employed only if the System Administrator has not assigned a rule specifically to the user or the user’s primary group.

Valid values are:

  • ABSOLUTE - The memory limit set for a user is to be applied as given, so no additional memory beyond the established limits will be allocated if it is requested.
  • GUIDELINE - The memory limit set for a user guides memory allocation as follows: allow the user to have requested memory beyond the limit set, if it is available, and when another user needs that memory, then it reduces the amount of memory used back down toward the guideline as soon as possible (e.g., by moving memory resident information to disk).

Default: GUIDELINE

See Also

USR_MEMORY

 

USR_MEMORY

USR_MEMORY

If greater than zero, this is the system default limit of memory (in bytes) available to each user. Zero means no user system default limit is imposed. The Administrator overrides this setting for a particular user by assigning a different value to the user or to the user’s primary Group.

Default: 0

See Also

 

Transaction Processing

Full ACID transaction processing of data is the gold standard for ensuring data integrity. Maintaining database changes in write-ahead logs to secure data is a complex and intricate process. As such, multiple features and options are available to fine tune this process for the best performance vs. integrity.

 
AUTO_PREIMG

Allows newly created non-transaction files to be created in PREIMG mode.

 

AUTO_RESTORE_POINT (SUBSYSTEM)

Supports a configuration option to automatically perform restore points.


AUTO_TRNLOG

Extends the automatic transaction support to include recoverable transactions without any application change.

 
AUTO_TRNLOG_LIGHT

Automatic transactions will be considered “light weight” so the transaction log is not flushed to disk on an automatic commit.

 
AUTOTRAN_ON_CREATE

A transaction will automatically be started when creating a transaction-controlled ISAM file.

 
CHECKPOINT_FLUSH

Sets the maximum number of checkpoints to be written before a buffer (data or index) holding an image for a transaction controlled file will be flushed.

 
CHECKPOINT_IDLE

Specifies the time in seconds between checkpoint checks.

 
CHECKPOINT_INTERVAL

Sets the interval between checkpoints (which can speed up recovery at the expense of performance during updates).

 
CHECKPOINT_PREVIOUS

If the checkpoint used for automatic recovery does not appear to be valid, enables the server to attempt to start recovery at the location of the next to last checkpoint.

 

CHECK_SYSTEM_FILEID

 Distinguishes different filesystem-level copies of files and prevent transaction recovery from applying corrections to an incorrect copy of a data or index file following a crash.


CHKPDFC_LOG_LIMIT

Specifies how many consecutive logs may be processed without a checkpoint until the FairCom Server terminates.

 
COMMIT_DELAY

Controls the time, in milliseconds, the transaction manager waits after a transaction completes before flushing the transaction to disk.

 
COMMIT_DELAY_BASE

Determines the rate at which the nominal commit delay time is adjusted as the number of cohorts increases or decreases.

 
COMMIT_DELAY_MINIMUM

Minimum time allowable for commit delay to be overridden - Do not use unless instructed to by FairCom.

 
COMMIT_DELAY_SCALE

For advanced control of the intricate commit delay timing statistics by adjusting the commit delay time calculation.

 
COMMIT_DELAY_USEC

Same as COMMIT_DELAY, but interpreted as microseconds.

 
COMMIT_LOCK_DEFER_MS

Provides an additional tuning mechanism for the COMMIT_READ_LOCK retry value.

 
COMPATIBILITY LOG_WRITETHRU

Instructs the FairCom Server to open its transaction logs in synchronous write mode.

 
COMPATIBILITY TDATA_WRITETHRU

Forces transaction controlled data files to be written directly to disk, skipping the calls to flush their OS buffers.

 
COMPATIBILITY TINDEX_WRITETHRU

Forces transaction controlled index files to be written directly to disk, skipping the calls to flush their OS buffers.

 
FIXED_LOG_SIZE

Disables the FairCom Server from automatically adjusting the size of transaction log files to accommodate long records.

 
FORCE_LOGIDX

Allows LOGIDX index file mode support to be forced on, off, or disabled.

 
KEEP_LOGS

Specifies the number of non-active transaction log files kept on disk in addition to the active log files.

 
KEEP_RESTORE_POINTS

Allows the server to maintain information about the last N Restore Points.

 
LOG_COMPRESSION_FACTOR

Affects how compression is applied to log entries: if the compression does not fit in a buffer of size (<factor> * input_size / 100), then no compression takes place. Not currently supported.

 
LOG_COMPRESSION_THRESHOLD

Affects how compression is applied to log entries: if the variable region is less than this threshold, no compression is attempted. Not currently supported.

 
LOG_EVEN

The alternative name for even numbered transaction log files.

 
LOG_ODD

The alternative name for odd numbered transaction log files.

 
LOG_PAGE_SIZE

Changes the page size block of the transaction log buffer.

 
LOG_SPACE

Specifies the number of megabytes of disk space allocated to storing active transaction logs.

 
LOG_TEMPLATE

Enables transaction log templates.

 
LOG_TEMPLATE_COPY_SLEEP_PCT

Specifies the percentage of data that is written to the target transaction log file after which the copy operation sleeps for the number of milliseconds specified for the LOG_TEMPLATE_COPY_SLEEP_TIME option.

 
LOG_TEMPLATE_COPY_SLEEP_TIME

Causes the copying of the log template to pause for the specified number of milliseconds each time it has written the percentage of data specified by LOG_TEMPLATE_COPY_SLEEP_PCT to the target transaction log file.

 
LONG_TRANSACTION_MS

Any transaction that exceeds the elapsed transaction time specified will be considered a long transaction for monitoring purposes.

 
MAX_USER_LOG_ENTRY_BYTES

Specifies an optional limit for how many active transaction logs a transaction spans before it is aborted or abandoned.

 
MAX_USER_LOGS

Controls how many logs a transaction can span before attempts are made to abort or abandon the transaction.

 
PREIMAGE_FILE

The alternative name for the file containing preimages swapped to disk.

 
START_EVEN

The alternative name for even numbered start file.

 
START_ODD

The alternative name for odd numbered start file.

 
SUPPRESS_LOG_FLUSH

Causes transaction begin and commit operations to skip the flushing of the log file when its argument is YES.

 
SUPPRESS_LOG_SYNC

Skips the sync'ing to disk from a log flush operation.

 
TRAN_HIGH_MARK

Specifies a transaction number threshold value.

 
TRAN_OVERFLOW_THRESHOLD

Allows the server administrator to determine when the server will issue a warning that its transaction number is approaching the limit.

 
TRAN_TIMEOUT

Sets a time limit on a transaction after which the transaction is aborted.

 
TRANSACTION_FLUSH

Controls the maximum number of updates to a buffer (data or index) before it is flushed.

 
UNBUFFERED_LOG_IO

Enables separate unbuffered I/O for transaction logs.

 

AUTO_CLNIDXX

AUTO_CLNIDXX YES

Optionally permits automatic CLNIDXX() during file open when a transaction high water mark, hghtrn, is found at file open to exceed the current transaction number.

The disadvantage of this approach is that it is necessary to traverse all the index leaf nodes, writing those to disk that have been cleaned. For a very large index, this could be time consuming. Only customers that have experienced problems with HTRN_ERR (520) are candidates to use this configuration option. Also, internal, administrative requests to open the file read only (say as part of a dynamic dump or ctFILBLK() processing) are denied if the file is in the middle of an on the fly CLNIDXX().

CTSTATUS.FCS receives messages concerning on the fly CLNIDXX(). Both success and failure are noted.

 

AUTO_PREIMG

AUTO_PREIMG <filespec>

Allows newly created non-transaction files to be created in PREIMG mode. These will automatically switch back to non-transaction when accessed by a non-transaction application. Files already created, but opened by a server with an applicable AUTO_PREIMG will be switched to PREIMG unless the file is an index without room for key level locks. Such a failed conversion at open is noted in CTSTATUS.FCS. filespec may contain wildcards.

Not only are files switched to PREIMG mode, but automatic ISAM PREIMG transactions will be launched. This permits an application to be run without any code change, and only a change to the configuration file if it is desired to use PREIMG files.

If a file is included in both AUTO_PREIMG and AUTO_TRNLOG, entries, then the AUTO_PREIMG entry will prevail.

Note: Consistency between data files cannot be ensured unless explicit transactions that preserve atomicity of updates are implemented by the application.

This also supports automatic transactions for low level operations if and only if the file in question has been opened under transaction control because of AUTO_PREIMG or AUTO_TRNLOG, configuration entries. By low level operations we mean updates to a data or index file that result from non-ISAM level API calls such as WRTREC(), NEWVREC() or ADDKEY(). Even if the file is included in one of these configuration entries, automatic low level transactions will not occur if the file is opened with inherent transaction attributes.

The server configuration keyword PREIMAGE_DUMP causes PREIMG files included in a dynamic dump to be automatically changed to TRNLOG files during the dump. Therefore, files converted by AUTO_PREIMG can be included in a dynamic dump that invokes the PREIMAGE_DUMP option. Each data file and associated indexes will be restored to a consistent point.

Note: AUTO_PREIMG accepts wildcard file specifications (see FairCom DB Standard Wildcards).

Files that already have transaction attributes are not affected by the configuration entries. An index file or c-tree Superfile host created without transaction support (and without these keywords) will not be able to be switched at open to transaction support. If such a file is included in the configuration lists for these key words, then the open will cause a CTSTATUS.FCS warning message with the name of the file.

See Also

AUTO_TRNLOG

AUTO_TRNLOG_LIGHT

DIAGNOSTICS AUTO_TRNLOG_CHECKLOCK

DIAGNOSTICS AUTO_PREIMG_CHECKLOCK

DIAGNOSTICS AUTO_TRNLOG_CHECKREAD

DIAGNOSTICS AUTO_PREIMG_CHECKREAD

PREIMAGE_DUMP

 

AUTO_RESTORE_POINT (SUBSYSTEM)

FairCom Server supports a configuration option to automatically perform restore points. This option can be set in the configuration file using the SUBSYSTEM TRNLOG AUTO_RESTORE_POINT block. The supported sub-options are:

  • LOG_INTERVAL N, where is the number of logs between each automatic restore point. Specify 1 to write an automatic restore point to every log. Specify 0 to turn off automatic restore points. LOG_INTERVAL defaults to zero (no automatic restore points).
  • TIMEOUT T, where T is a time in seconds that the automatic restore point waits for active to transactions to commit. TIMEOUT defaults to 2 seconds.
  • FAIL_AFTER_TIMEOUT F, can be YES or NO: YES indicates that if transactions remain active after the restore point timeout period, the restore point call fails; NO indicates that if transactions remain active after the restore point period, those transactions are aborted and the restore point is logged. FAIL_AFTER_TIMEOUT defaults to NO.
  • CHECKPOINT C, where C is YES or NO. YES indicates that a checkpoint is to be logged with the restore point; NO indicates that no checkpoint is to be logged with the restore point. CHECKPOINT defaults to NO.

Example:

SUBSYSTEM TRNLOG AUTO_RESTORE_POINT {

; write an automatic restore point every 2 logs

LOG_INTERVAL 2

 

; wait for up to 3 seconds for transactions to finish

TIMEOUT 3

 

; fail if transactions remain active after timeout

FAIL_AFTER_TIMEOUT YES

 

; write a checkpoint

CHECKPOINT YES

}

Changing automatic restore point settings at runtime

Automatic restore point settings can be changed at runtime by using the ctSETCFG() API function. For example:

rc = ctSETCFG(setcfgCONFIG_OPTION, "subsystem trnlog auto_restore_point {\n\

log_interval 2\n\

timeout 3\n\

fail_after_checkpoint yes\n\

checkpoint yes\n}");

ctadmn use of ctSETCFG()

The ctadmn utility's "Change the specified configuration option" option uses this function, and it now detects when a SUBSYSTEM configuration option is specified. In that situation, it prompts for the SUBSYSTEM sub-options. Here is an example demonstrating how to use ctadmn to turn off automatic restore points at runtime:

10. Change Server Settings

10. Change the specified configuration option

Enter the configuration option and its value >> subsystem trnlog auto_restore_point {

Enter the SUBSYSTEM options you wish to change, one per line.

Finish with a line containing only a closing curly brace: }

To cancel, enter a line containing only an asterisk: *

Enter next line >> log_interval 0

Enter next line >> }

Successfully changed the configuration option.

 

If an error occurs when changing a SUBSYSTEM option using the ctSETCFG() function, the function returns an error code and may log a descriptive error message to CTSTATUS.FCS. Here is an example, showing a typo in which log_interval0 is specified instead of log_interval 0:

Enter the configuration option and its value >> subsystem trnlog auto_restore_point {

 

Enter the SUBSYSTEM options you wish to change, one per line.

Finish with a line containing only a closing curly brace: }

To cancel, enter a line containing only an asterisk: *

 

Enter next line >> log_interval0

 

Enter next line >> }

 

Error: Failed to change the configuration option: 749

The following error message will be logged to CTSTATUS.FCS:

Wed Jan 18 14:42:53 2017

- User# 00018 Configuration error: ctSETCFG(), line 2: The option LOG_INTERVAL0 is not supported in the TRNLOG AUTO_RESTORE_POINT subsystem block.

Monitoring automatic restore points

The system snapshot structure, ctGSMS, now includes fields for the automatic restore point settings. The system snapshot version has been updated from 19 to 20:

LONG sarplogint; /* auto restore point log interval */

LONG sarptimout; /* auto restore point tran timeout */

LONG sarplogint; /* auto restore point log interval */

LONG sarptimout; /* auto restore point tran timeout */

 

/* Auto restore point options bits (ctGSMS sarpoptions field): */

#define ctARP_FAIL_AFTER_TIMEOUT 0x00000001 /* fail if trans active after timeout */

#define ctARP_WRITE_CHECKPOINT 0x00000002 /* write a checkpoint */

A text snapshot now also includes the automatic restore point settings:

automatic restore point interval: 2

active transaction time limit: 3

fail if trans active after timeout: yes

write checkpoint: no

log of last automatic restore point: 81

 

The ctsnpr utility (included in FairCom DB PRO packages in the source directory) has been updated to support the latest version of the text snapshot output format.

 

AUTO_TRNLOG

AUTO_TRNLOG <filespec>

Extends the automatic transaction support to include recoverable transactions without any application change. AUTO_TRNLOG, is intended to permit transaction support for applications that do not make transaction calls. See the entry on AUTO_PREIMG for more details.

If a file is included in both AUTO_PREIMG and AUTO_TRNLOG, entries, then the AUTO_PREIMG entry will prevail.

Note: AUTO_TRNLOG accepts wildcard file specifications (see FairCom DB Standard Wildcards).

Files that already have transaction attributes are not affected by the configuration entries. An index file or c-tree Superfile host created without transaction support (and without these keywords) will not be able to be switched at open to transaction support. If such a file is included in the configuration lists for these key words, then the open will cause a CTSTATUS.FCS warning message with the name of the file.

See Also

AUTO_PREIMG

AUTO_TRNLOG_LIGHT

DIAGNOSTICS AUTO_TRNLOG_CHECKLOCK

DIAGNOSTICS AUTO_PREIMG_CHECKLOCK

DIAGNOSTICS AUTO_TRNLOG_CHECKREAD

DIAGNOSTICS AUTO_PREIMG_CHECKREAD

PREIMAGE_DUMP

 

AUTO_TRNLOG_LIGHT

AUTO_TRNLOG_LIGHT YES

AUTO_TRNLOG is intended to permit transaction support for applications that do not make transaction calls. In some instances, while the transaction support is desired, it may not be necessary to incur the full performance hit intrinsic with TRNLOG support. Adding AUTO_TRNLOG_LIGHT YES to a server configuration file means that the automatic transactions will be considered “light weight” which means that the transaction log entries are not required to be flushed to disk on an automatic commit. The default is NO: automatic transactions will invoke the strict transaction log management of regular transaction calls.

When AUTO_TRNLOG or AUTO_PREIMG are in effect, it may be desirable to know whether or not a legacy application is making “expected” lock calls

Default: NO

See Also

AUTO_PREIMG

AUTO_TRNLOG

DIAGNOSTICS AUTO_TRNLOG_CHECKLOCK

DIAGNOSTICS AUTO_PREIMG_CHECKLOCK

DIAGNOSTICS AUTO_TRNLOG_CHECKREAD

DIAGNOSTICS AUTO_PREIMG_CHECKREAD

PREIMAGE_DUMP

 

AUTOTRAN_ON_CREATE

AUTOTRAN_ON_CREATE

In v11.5 and later, when creating a transaction-controlled ISAM file, a transaction will automatically be started if one is not open to avoid a possible deadlock caused by starting the transaction in the middle of the file create.

Default: On

 

CHECKPOINT_FLUSH

CHECKPOINT_FLUSH <# of checkpoints>

This keyword sets the maximum number of checkpoints to be written before a buffer (data or index) holding an image for a transaction controlled file will be flushed. The default value is 2. A value of zero causes the buffer to be flushed at least by the occurrence of the first checkpoint written after the buffer update. Reducing the value of this system parameter reduces the amount of buffering, slowing system performance, but decreases the amount of work to be performed during recovery.

Note: Enabling background transaction flush threads disables this checkpoint flush operation.

Default: 17

See Also

CHECKPOINT_INTERVAL

TRAN_DATA_FLUSH_SEC

TRAN_INDEX_FLUSH_SEC

 

CHECKPOINT_IDLE

CHECKPOINT_IDLE <# of seconds | -1>

Specifies the time in seconds between checkpoint checks. A checkpoint is an entry in the transaction log which lists open files, active transactions and transactions that are vulnerable due to pending buffer flushes. By default, every 300 seconds the FairCom Server checks if there has been any transaction activity, and if so, if there are any current active transactions. If there has been activity since the last checkpoint, but there is currently no active transaction, a checkpoint occurs. This strategy will not create extra checkpoints when the FairCom Server is idle, with respect to transactions, or when the FairCom Server is busy with transactions.

It is important to note that if an application routinely calls Begin() whether or not updates are imminent, this “idle” checkpoint will be inhibited because there appears to be an active transaction. The purpose of this feature is to increase the likelihood of a clean checkpoint occurring in the transaction log, thus speeding automatic recovery. Ordinarily, checkpoints occur at predetermined intervals in the transaction log. A value of negative one (-1) will disable the idle checkpoint feature.

Default: 300

 

CHECKPOINT_INTERVAL

CHECKPOINT_INTERVAL <interval in bytes or MB>

This keyword can speed up recovery at the expense of performance during updates. The interval between checkpoints is measured in bytes of log entries. It is ordinarily about one-third (1/3) the size of one of the active log files (L000....FCS). Reducing the interval speeds automatic recovery at the expense of performance during updates. The entry is interpreted as bytes if greater than 100 or as megabytes if less than 100. For example, CHECKPOINT_INTERVAL 2 sets an approximate 2MB interval, while CHECKPOINT_INTERVAL 150000 causes checkpoints about every 150,000 bytes of log file.

Default: 10 MB

See Also

CHECKPOINT_FLUSH

 

CHECKPOINT_PREVIOUS

CHECKPOINT_PREVIOUS <YES | NO >

When automatic recovery begins, FairCom DB examines S0000000.FCS and S0000001.FCS to determine the location of the last checkpoint; which is the starting point for the automatic recovery. If the checkpoint does not appear to be valid (errors 64, RLEN_ERR and 66, RCHK_ERR), it is possible to have the server attempt to start the recovery at the location of the next to last checkpoint.

Default: NO

 

CHECK_SYSTEM_FILEID

CHECK_SYSTEM_FILEID <YES/NO>

CHECK_SYSTEM_FILEID YES is intended to distinguish different filesystem-level copies of files and prevent transaction recovery from applying corrections to an incorrect copy of a data or index file following a crash. Operation sequences are as follows:

  1. update A.dat
  2. close A.dat
  3. Filesystem level copy A.dat to B.dat
  4. update B.dat

These sequences are vulnerable to recovery errors if CHECK_SYSTEM_FILEID NO is disabled.
Some distributed file systems or containerized environments do not provide a stable device or inode id and will result in additional CTSTATUS.FCS messages like "reassigning file ID (sysid changed)..." when opening a file, even if the file has not been copied.

Default: Yes

 

CHKPDFC_LOG_LIMIT

CHKPDFC_LOG_LIMIT <max logs w/o checkpoint>

Ordinarily, several checkpoints are expected within each FairCom Server transaction log file and the FairCom Server would terminate with error CHKP_ERR (529) when two consecutive log files without these checkpoints were encountered. The FairCom Server has been modified with respect to this absence of checkpoints. This keyword permits additional log files to be written without checkpoints. A short wait is introduced for each non-checkpoint log write, allowing a checkpoint to occur and resolving any possible race conditions.

CHKPDFC_LOG_LIMIT specifies how many consecutive logs may be processed without a checkpoint until the FairCom Server terminates. The default number of transaction logs is five log files and this may be lowered to as few as four log files or raised to any reasonable limit.

Once the checkpoint deficiency reaches two logs, the first write of each transaction commit to the transaction logs is slightly deferred. This improves the chances that the FairCom Server checkpoint thread is allotted a slice of time. Once the checkpoint is eventually written, this write log defer is removed.

 

CLEANUP_ABLIST_ON_ABORT

CLEANUP_ABLIST_ON_ABORT <YES | NO>

When key mark cleanup optimizations are enabled (NXTMARKS, UPDMARKS) and if a great many aborted transactions, checkpoint size becomes large due to many abort node list entries. Possible symptoms could include:

  • automatic recovery could fail with RCHK_ERR due to a checkpoint that exceeded 16 MB
  • slow performance

When a transaction aborts, transaction marks are now automatically cleaned in updated nodes. This behavior is on by default (YES) and can be disabled for prior compatibility.

CLEANUP_ABLIST_ON_ABORT NO

This option can be set in your server configuration file or dynamically modified at runtime.

 

COMMIT_DELAY

COMMIT_DELAY <milliseconds | -1>

Controls the length of time in milliseconds after a given transaction completes that the transaction manager waits before flushing the transaction to disk. By waiting, more than one transaction (that is, the first one and all others that complete before the delay period expires) may be committed at the same time reducing disk-access overhead. On average, the longer the delay, the larger the number of transactions committed.

Note: Keep this delay in mind when setting a time limit for aborting transactions.

A value of "-1" disables this support.

Note: The best practice is to consider the type of storage device your transaction logs are sitting on.

Disable this support when using Solid State Disks (SSDs).

SSD use: COMMIT_DELAY -1

Enable it If you are running on a rotating hard disk.

HDD use: COMMIT_DELAY 1

Default:

Windows 2 ms.

Unix/Linux - This value defaults to 1 ms for best performance.

See Also

 

COMMIT_DELAY_BASE

COMMIT_DELAY_BASE <cohort size measure>

For advanced control of the intricate commit delay timing statistics, additional controls are available for the commit delay time calculation.

The cohort size measure determines the rate at which the nominal commit delay time is adjusted as the number of cohorts increases or decreases. Increasing this value tends to reduce the amount of change in the blocking time as the number of cohorts changes.

It is recommended that these values be carefully profiled as they can impact performance in many unexpected ways.

Default: 50

See Also

COMMIT_DELAY

COMMIT_DELAY_SCALE

COMMIT_DELAY_USEC

 

COMMIT_DELAY_MINIMUM

COMMIT_DELAY_MINIMUM <time in microseconds>

Do not use this unless instructed to by FairCom.

In V11.0 and later, allows the minimum time allowable for commit delay to be overridden. Time specified is in microseconds. Example:

COMMIT_DELAY_MINIMUM 500

Default: 1000 microseconds or 0 depending on environment.

 

COMMIT_DELAY_SCALE

COMMIT_DELAY_SCALE <ratio of block to clear time>

For advanced control of the intricate commit delay timing statistics, additional controls are available for the commit delay time calculation. The ratio of block to clear time cannot be smaller than 1. As this value increases, the amount of time waiting to permit commit delay cohorts to flow past their mutual block is decreased.

It is recommended that these values be carefully profiled as they can impact performance in many unexpected ways.

Default: 2

See Also

COMMIT_DELAY

COMMIT_DELAY_BASE

COMMIT_DELAY_USEC

 

COMMIT_DELAY_USEC

COMMIT_DELAY_USEC <microseconds> | -1>

Same as COMMIT_DELAY, but interpreted as microseconds. If both forms of this keyword are specified, then the last entry in the configuration file prevails.

Note: Not all systems support arbitrarily short sleep times. FairCom has found, for example on the Solaris operating system, unless using real-time capabilities of the operating system, the minimum achievable sleep time is 10 milliseconds, even if a short sleep time is requested.

See Also

COMMIT_DELAY

COMMIT_DELAY_BASE

COMMIT_DELAY_SCALE

 

COMMIT_LOCK_DEFER_MS

COMMIT_LOCK_DEFER_MS <defer time in milliseconds>

Provides an additional tuning mechanism for the COMMIT_READ_LOCK retry value.

The length of the defer value can be varied from zero to 100 milliseconds.

Internal tests demonstrated the effect of this change on CPU utilization was dramatic as a reader attempted to retry its read commit lock. Of course, actual performance increases will be variable, depending on any particular server environment. The trade-off with this method is introducing an unnecessary defer (i.e. if the next retry without a non-zero defer would have succeeded). In practice, this was not found to impede performance.

Commit write locks held by the transaction (i.e., locks that block read attempts during the actual commit process) are held during the entire commit. This has no direct impact upon the transaction commit, however, can cause longer delays for a read attempt when the transaction itself is comprised of a large number of write operations (e.g., committing thousands of ADDREC()s)

Default: 10

See Also

COMPATIBILITY NO_COMMIT_READ_LOCK

 

COMPATIBILITY LOG_WRITETHRU

COMPATIBILITY LOG_WRITETHRU

Instructs the FairCom Server to open its transaction logs in synchronous write mode. In this mode, writes to the transaction logs go directly to disk (or disk cache), avoiding the file system cache, so the server is able to avoid the overhead of first writing to the file system cache and then flushing the file system. As of FairCom DB Version 9, this is applicable to both Windows and Unix Systems.

Note: On the Solaris operating systems, COMPATIBILITY LOG_WRITETHRU uses the O_DSYNC mode to implement synchronous log writes when available. (Direct I/O with O_SYNC is still used on those systems not supporting O_DSYNC.)

Default: OFF

Also See

 

COMPATIBILITY TDATA_WRITETHRU

Similar to the strategy used in transaction log flushing, the FairCom Server can avoid excessive flushing of data and index files under transaction control. Two additional keywords affect this behavior:

COMPATIBILITY TDATA_WRITETHRU and COMPATIBILITY TINDEX_WRITETHRU force transaction controlled data files and index files, respectively, to be written directly to disk (whenever c-tree determines that they must be flushed from the c-tree buffers), and the calls to flush their OS buffers are skipped. These keywords cause transaction controlled files to be written through the OS file system cache, rather than written into the file system cache and later explicitly flushed at a database checkpoint. This behavior allows I/O costs to be evenly amortized, reducing the amount of I/O that must be done at a database checkpoint. This results in a smaller variance in transaction times, and potentially greater total transaction throughput. For scenarios without heavy and continuous write activity, this alternate behavior frequently results in reduced throughput.

TDATA_WRITETHRU uses the file system cache. The file is placed into a mode that causes the write to go to file system cache and then to disk before returning; the data still resides in file system cache. Compare to UNBUFFERED_IO, which completely avoids the file system cache.

See Also

COMPATIBILITY TINDEX_WRITETHRU

 

COMPATIBILITY TINDEX_WRITETHRU

Similar to the strategy used in transaction log flushing, the FairCom Server can avoid excessive flushing of data and index files under transaction control. Two additional keywords affect this behavior:

COMPATIBILITY TDATA_WRITETHRU and COMPATIBILITY TINDEX_WRITETHRU force transaction controlled data files and index files, respectively, to be written directly to disk (whenever c-tree determines that they must be flushed from the c-tree buffers), and the calls to flush their OS buffers are skipped. These keywords cause transaction controlled files to be written through the OS file system cache, rather than written into the file system cache and later explicitly flushed at a database checkpoint. This behavior allows I/O costs to be evenly amortized, reducing the amount of I/O that must be done at a database checkpoint. This results in a smaller variance in transaction times, and potentially greater total transaction throughput. For scenarios without heavy and continuous write activity, this alternate behavior frequently results in reduced throughput.

See Also

COMPATIBILITY TDATA_WRITETHRU

 

COMPATIBILITY LOCK_EXCL_TRAN

Skipping locks on exclusively opened TRNLOG files is enabled by default. It can be disabled by specifying the option COMPATIBILITY LOCK_EXCL_TRAN in ctsrvr.cfg.

 

DELAYED_DURABILITY

DELAYED_DURABILITY <N>

DELAYED_DURABILITY <N> (default 0) controls whether or not to use a modified log syncing strategy.

With delayed durability enabled transaction logs are no longer sync'd to persisted storage on each commit (or other internal log buffer flush events) and instead, transaction log data is allowed to be written to the filesystem cache, and a background thread then periodically and consistently syncs transaction log contents to disk.

By allowing committed transaction entries to be written to filesystem cache and deferring the file flush can result in a very large performance gain in many cases. However, there is a trade off as a window of potential data loss vulnerability is then introduced. The period of time that transaction log contents are present in volatile filesystem cache before the flush could mean transactions already reported to the application as committed, in rare cases, might not make it to persisted storage.

With many modern storage devices there is a limited presumption that available capacitance on the system and storage device hardware that data is usually persisted even in a power outage situation, though this is not guaranteed. Thus alternate recovery strategies should be considered.

One strategy to coordinate the known state of committed database transactions with a known application state can be achieved with restore points. Restore points can be triggered by an application to create a known point in time where the application and the database are in sync. A restore point creates a special database transaction log checkpoint that can be later referenced by the application as a known good start point.

With delayed durability enabled, it is recommended to consider the use of restore points for a robust recoverable solution.

  • When DELAYED_DURABILITY set to 0 disables delayed durability/
  • When DELAYED_DURABILITY is set to a positive value, <N>, the new strategy is in use and the log sync is guaranteed to occur within <N> seconds. A setting of 1 second is recommended because it results in a good performance gain (higher values offer very little additional benefit). The following configuration options are set as shown below:
     

SUPPRESS_LOG_FLUSH

YES

(no idle flush of transaction files)

SUPPRESS_LOG_SYNC

YES

 

IDLE_TRANFLUSH

-1

 

COMMIT_DELAY

-1

(no commit delay)

FORCE_LOGIDX

ON

(all transaction indices use ctLOGIDX)

 

Note: If the configuration file has one or more of these configuration entries set inconsistently after the DELAYED_DURABILITY entry, the server logs a message to CTSTATUS.FCS and continues to start, disabling any incompatible options after processing the configuration file.


Warning

When DELAYED_DURABILITY is enabled, recently committed transactions could be lost if FairCom Server terminates abnormally. For automatic recovery to succeed after FairCom Server terminates abnormally, either of the following should be considered.

  1. The application must write a restore point to the log (using the ctflush utility or calling ctQUIET() with mode of ctQTlog_restorepoint) such that a restore point exists prior to the time the server terminated abnormally. In this case, automatic recovery recovers to that restore point.

or

  1. ctsrvr.cfg must contain the option RECOVER_TO_RESTORE_POINT NO, indicating that no restore point is needed. In this case, automatic recovery recovers to the last data that was written to the log on disk. This is the default configuration.

 

DELSTK_COMMIT_SEC

DELSTK_COMMIT_SEC

The DELSTK_COMMIT_SEC server configuration can be used to improve performance of committing record deletes in a fixed-length data file that uses the TDATA_WRITETHRU option. To use this option, specify the following in ctsrvr.cfg:

DELSTK_COMMIT_SEC nsec

When nsec is greater than zero, this option causes commits of fixed-length record deletes in files that use the TDATA_WRITETHRU option to write the delete stack value to the file's header at most every nsec seconds. This means that, in the event of a server crash, the delete stack value in the header can be out-of-date, not accounting for the last nsec seconds of deleted records. The only impact is that some space in the file will not be available for reuse after automatic recovery.

Default: 0 (disabled)

The maximum value that can be specified is 30.

Changing at Runtime

This option can be changed at runtime using either of these approaches:

Using the ctadmn utility:

Select menu option 10. Change Server Settings, then select 10. Change the specified configuration option, and then enter the configuration option and its value:

delstk_commit_sec 1

 

FIXED_LOG_SIZE

FIXED_LOG_SIZE

*** THIS KEYWORD IS NO LONGER SUPPORTED ***

 

FORCE_LOGIDX

FORCE_LOGIDX <ON | OFF | NO>

FORCE_LOGIDX allows LOGIDX support to be forced on, off, or disabled:

  • ON forces all indexes to use LOGIDX entries.
  • OFF forces all indexes not to use LOGIDX entries.
  • NO uses existing file modes to control LOGIDX entries.

The LOGIDX file mode is an index file mode permitting faster index automatic recovery during FairCom Server startup. Transaction controlled indexes with this file mode are recovered more quickly than with the standard transaction processing file mode TRNLOG. This feature can significantly reduce recovery times for large indexes and has not noticeably degraded the speed of index operations. LOGIDX is only applicable if the file mode also includes TRNLOG.

Note: The LOGIDX file mode is intended for index files only, and is ignored in data files. When adding the LOGIDX file mode to an existing index that is not under transaction control, be sure to rebuild the index to enable transaction control.

Default: ON

See Also

 

KEEP_LOGS

KEEP_LOGS <number of inactive logs>

If greater than zero, KEEP_LOGS specifies the number of non-active transaction log files kept on disk in addition to the active log files. When a greater-than-zero KEEP_LOGS value is exceeded, the FairCom Server automatically deletes the oldest inactive log file as new log files are needed. If KEEP_LOGS is zero, inactive log files are immediately deleted by the FairCom Server. If KEEP_LOGS is -1, no inactive log files are deleted by the FairCom Server.

KEEP_LOGS permits the archiving of transaction logs. Inactive log files may be safely moved, deleted, copied or renamed. An inactive log file which is not immediately deleted by the FairCom Server is renamed from the form L*.FCS to the form L*.FCA. The last character in the extension is changed from ‘S’ to ‘A’, with the rest staying the same.

Default: 0

 

KEEP_RESTORE_POINTS

KEEP_RESTORE_POINTS <N>

KEEP_RESTORE_POINTS <N> allows the server to maintain information about the last N Restore Points. This is somewhat like the KEEP_LOGS keyword. The last N Restore Points are referred to as the "Active Restore Points." It is possible to set N to zero which means there will be no Active Restore Points. If there are no Active Restore Points, then automatic recovery cannot rollback to a quiet transaction state. The list of Active Restore Points is stored in each checkpoint. In the case of a Checkpoint Restore Point, the checkpoint includes itself as the last Active Restore Point.

Note: When N is greater than zero, the server automatically maintains the transactions logs necessary to ensure that a rollback to any of the Active Restore Points is possible. However, KEEP_RESTORE_POINTS does not affect the existence of the Restore Point files. These files are quite small (128 bytes), and are not deleted by the server.

See Also

 

LEAF_NODE_READ_LOCK

LEAF_NODE_READ_LOCK YES | NO

Default: YES

When enabled, FairCom Server acquires a read lock on a leaf node if the index does not use key compression. If it finds that the node contains transaction marks, it releases the read lock and acquires a write lock on the node. This greatly improves scalability of leaf nodes reads.

This option is dynamically configurable at runtime using the ctadmn utility's option (menu option 10, and then menu option 10, Change the specified configuration option, again) to change a server configuration option value.

 

LOG_COMPRESSION_FACTOR

LOG_COMPRESSION_FACTOR <percent>

Default: 80

See Also

Note: Log compression is not currently supported.

 

LOG_COMPRESSION_THRESHOLD

LOG_COMPRESSION_THRESHOLD <bytes>

There are two parameters that control the manner in which the compression is applied to log entries.

  • The first is a size threshold:
    If the variable region is less than this threshold, no compression is attempted.
  • The second is a compression factor expressed as a percent:
    If the compression does not fit in a buffer of size (<factor> * input_size / 100), then no compression takes place.

Snapshot statistics include compression results.

Default: 100

See Also

Note: Log compression is not currently supported.

 

LOG_EVEN

LOG_EVEN <full_path>L

The alternative name for even numbered transaction log files. This name must be in the form of an optional directory path and the single character ‘L’ (e.g., D:\LOG0\L). The FairCom Server appends a seven-digit even number and the extension .FCS to the name given here.

If a relative path is specified for START_EVEN / START_ODD or LOG_EVEN / LOG_ODD, it is relative to the defined LOCAL_DIRECTORY path, not the startup directory of the server.

This configuration option can include an environment variable name that will be substituted with its value when the configuration file is read.

Note: The ability to give separate device and directory names for odd and even log files allows them to be directed to different physical storage devices.

Default: L

See Also

LOG_ODD (LOG_ODD, LOG_ODD)

 

LOG_ODD

LOG_ODD <full_path>L

The alternative name for odd numbered transaction log files. This name must be in the form of an optional directory path and the single character ‘L’ (e.g., D:\LOG1\L). The FairCom Server appends a seven-digit odd number and the extension .FCS to the name provided.

If a relative path is specified for START_EVEN / START_ODD or LOG_EVEN / LOG_ODD, it is relative to the defined LOCAL_DIRECTORY path, not the startup directory of the server.

This configuration option can include an environment variable name that will be substituted with its value when the configuration file is read.

Default: L

See Also

LOG_EVEN (LOG_EVEN, LOG_EVEN)

 

LOG_PAGE_SIZE

LOG_PAGE_SIZE <bytes>

The FairCom Server uses a transaction log buffer to manage log write requests and this is comprised of a number of page size blocks. The LOG_PAGE_SIZE configuration key word is used to change the page size, and ideally, the log page size should match the optimal size for the disk I/O subsystem. The maximum setting is 32K.

Default

The default is 8K.

See Also

 

LOG_SPACE

LOG_SPACE <Megabytes>

This is the number of megabytes of disk space allocated to storing active transaction logs, starting with a minimum of 2. The FairCom Server maintains up to 4 active log files, which consume, in the aggregate, up to LOG_SPACE megabytes of disk space. Log files are numbered consecutively starting with 1. The log file names are in the form L0000001.FCS.

For a server with existing transaction logs, If LOG_SPACE is changed and LOG_TEMPLATE is non-zero, the existing log templates will be the wrong size and should be removed. The log template (L0000000.FCT) is only created when the Log # 1 is created, so the transaction log reset procedure should be followed.

V12 Notes

The maximum allowed value for the LOG_SPACE keyword has been increased from 1GB to 4GB-1. This controls the initial size of transaction logs (of 4 logs specifically), so each log can now grow to just under 1GB. Each individual log can now grow up to 4GB if needed, although 3GB is expected to be the largest size, which will be a 1GB normal log size, plus a potential 2GB variable-length record in a transaction. Reducing the number of logs results in less log file churning with high velocity applications leading to faster consistent transaction throughput.

A change in logic allows us to avoid performing a long series of synchronous writes to the transaction log when we start the server in an empty transaction log directory.

This change significantly speeds up server startup on Linux when the file system has write barriers enabled.

Note: When write barriers are disabled on Linux, synchronous writes are much faster than with write barriers enabled, so FairCom highly recommends running with write barriers off and a battery backed power supply on the machine in production systems for best performance.

With this performance improvement, we have been able to increase LOG_SPACE to 1 GB and we have COMPATIBILITY LOG_WRITETHRU on by default.

The defaults in the Server Configuration File (ctsrvr.cfg) have been modified to optimize performance on modern systems.

  • LOG_SPACE has been increased from 120 MB to 1 GB

LOG_SPACE 1 GB

  • PAGE_SIZE has been increase from 8192 to 32768

PAGE_SIZE 32768

Warning: Changing the PAGE_SIZE is a maintenance task that should be done carefully and with a full reliable backup. Practice on a copy of your data and server folder until you are confident with the results. For procedures, see Adjusting PAGE_SIZE in the FairCom Installation Guide.

Note: A file created with a larger PAGE_SIZE cannot be opened by a server with a smaller PAGE_SIZE.

 

Default: 1 GB (prior to V12: 120 MB)

 

LOG_TEMPLATE

LOG_TEMPLATE <n>

Enables transaction log templates. <n> is the number of log templates for the server to maintain. A value of 0 means no use of log templates. A value of two (2) means that two blank logs (L0000002.FCT and L0000003.FCT) would be created at first server startup in addition to the template (L0000000.FCT). Log templates have been on by default since V9.

Before enabling log templates on a system that did not have them turned on, any existing transaction logs must be deleted so the server can create the log templates. To do this, shut down the server cleanly and delete Lnnnnnnn.FCS, S0000000.FCS, and S0000001.FCS. When the server is restarted after adding this keyword, initial startup may take longer due to creation of template log files (*.FCT), however, using the templates will result in better performance in high transaction volume environments.

Default: 2

See Also

 

LOG_TEMPLATE_COPY_SLEEP_PCT

LOG_TEMPLATE_COPY_SLEEP_PCT <percent>

When working with large log templates on high volume systems, the log template copy operation can consume excessive I/O time impacting performance. By periodically deferring the copy operation, this can smooth out I/O spikes. This option, when used with the LOG_TEMPLATE_COPY_SLEEP_TIME option specifies the percentage of data that is written to the target transaction log file after which the copy operation sleeps for the number of milliseconds specified for the LOG_TEMPLATE_COPY_SLEEP_TIME option.


Default: 15
Minimum value: 1
Maximum value: 99

See Also

 

LOG_TEMPLATE_COPY_SLEEP_TIME

LOG_TEMPLATE_COPY_SLEEP_TIME <milliseconds>

When working with large log templates on high volume systems, the log template copy operation can consume excessive I/O time impacting performance. By periodically deferring the copy operation, this can smooth out I/O spikes. This option causes the copying of the log template to pause for the specified number of milliseconds each time it has written the percentage of data specified by the LOG_TEMPLATE_COPY_SLEEP_PCT option to the target transaction log file.

If an error occurs using this method to copy the log template, the code logs an error message to CTSTATUS.FCS (look for "LOG_TEMPLATE_COPY: ...") and attempts to use the original log template copy method.

A suggested time is 5 ms to start with.

Default: 0 (disabled)
Minimum value: 0
Maximum value: 1000 (1 second sleep)

See Also

 

LONG_TRANSACTION_MS

LONG_TRANSACTION_MS <milliseconds>

A long transaction is any transaction that exceeds the elapsed transaction time specified. This will cause a message to be written to the SYSMON queue if the PERF_MONITOR configuration option is enabled.

See Also

 

MAX_DFRIDX_LOGS

MAX_DFRIDX_LOGS <max_logs>

Changes the limit FairCom Server sets for the number of active transaction logs that are kept for deferred index and Replication Agent processing.

In V12 and later, the default is 100; prior to V12, the default was 50.

Specifying a value of zero for <max_logs> removes the limit.

Tip - If you find error 96 on startup due to logs not found, it is likely be due to MAX_DFRIDX_LOGS or MAX_REPL_LOGS settings removing logs after the max is reached. Be sure to review your operational environment for appropriate settings.

See also:

 

Transaction log limit for replication and deferred indexing

Note: This is a Compatibility Change for FairCom DB V11.5 and later.

The Replication Agent and deferred index processing thread for TRNLOG files read transaction logs and inform the server of their minimum transaction log requirements respectively. In early V11 releases, FairCom DB retained all required logs indicated by these clients. In some cases, this resulted in the number of transaction logs to increase without limit, filling all drive space. A typical scenario is a Replication Agent taken offline without removing its minimum transaction log requirement from the server.

FairCom DB Server now limits by default the number of active transaction logs that are kept for Replication Agent and deferred index processing to 50. This default configuration is a deliberate trade off to avoid accumulating an unlimited number of active transaction logs and potentially running out of critical drive space.

The worst case scenario with this change is your Replication Agent or internal thread that is reading transaction logs can fail with error 96 when reconnecting and searching for a log that it expects present is no longer there. In this case, it will likely be necessary to resync your files through the Replication ReSync feature, a backup and restore, or manual file copy.

Two configuration options were introduced controlling these limits independently for these two features:

  • MAX_REPL_LOGS <max_logs> - Sets the maximum number of logs to be held specifically for replication.
  • MAX_DFRIDX_LOGS <max_logs> - Sets the maximum number of logs to be held specifically for the deferred indexing thread.

Use of either of these configuration settings does not impact your FairCom DB Servers’ ability to retain any necessary logs required for Automatic Recovery.

The more comprehensive KEEP_LOGS configuration keyword always overrides both MAX_DFRIDX_LOGS and MAX_REPL_LOGS configuration settings in either case.

When a new transaction log is created and one of these limits is in effect and the required number of logs exceeds the limit, FairCom DB logs one of the following messages to CTSTATUS.FCS and sets the minimum log requirement of the deferred index thread or Replication Agent to a larger value equal to the log limit:

- User# 00039 Deferred index log requirement (current=42, required=32) exceeds MAX_DFRIDX_LOGS limit. Setting lowlog to 33.

- User# 00038 Replication reader AGENT1 log requirement (current=43, required=32) exceeds MAX_REPL_LOGS limit. Setting lowlog to 33.

These keywords can be set at runtime by using the command-line tool ctadmn, option 10 (Change the specified configuration option) and setting the new value, like this:

10. Change the specified configuration option

Enter your choice (1-10), or 'q' to return to previous menu>> 10

Enter the configuration option and its value >> MAX_REPL_LOGS 75

Successfully changed the configuration option.

They can be set programmatically by calling the ctSETCFG() function. Examples:

/* Set maximum logs for deferred index thread to 100. */

ctSETCFG(setcfgCONFIG_OPTION, "MAX_DFRIDX_LOGS", "100");

/* Set maximum logs for replication agents to 0 (no limit). */

ctSETCFG(setcfgCONFIG_OPTION, "MAX_REPL_LOGS", "0");

 

MAX_PREIMAGE_DATA

MAX_PREIMAGE_DATA <limit> sets the maximum size of in‑memory data that is allocated by a transaction to <limit>. After that amount of data has been allocated, subsequent allocations are stored in a preimage swap file on disk. The default value is 1 GB.

See Also

MAX_PREIMAGE_SWAP (MAX_PREIMAGE_SWAP, MAX_PREIMAGE_SWAP)

Millions of Records per Transaction

 

MAX_PREIMAGE_SWAP

MAX_PREIMAGE_SWAP <limit> sets the maximum size of the preimage swap file on disk. If the file reaches its maximum size and a transaction attempts to allocate more space in the file, the operation fails with error TSHD_ERR (72). The default value is zero (meaning no limit).

See Also

MAX_PREIMAGE_DATA (MAX_PREIMAGE_DATA, MAX_PREIMAGE_DATA)

Millions of Records per Transaction

 

MAX_REPL_LOGS

MAX_REPL_LOGS <max_logs>

Changes the limit FairCom Server sets for the number of active transaction logs that are kept for deferred index and Replication Agent processing.

In V12 and later, the default is 100; prior to V12, the default was 50.

Specifying a value of zero for <max_logs> removes the limit.

Tip - If you find error 96 on startup due to logs not found, it is likely be due to MAX_DFRIDX_LOGS or MAX_REPL_LOGS settings removing logs after the max is reached. Be sure to review your operational environment for appropriate settings.

See also:

 

MAX_TRANSACTION_JUMP

MAX_TRANSACTION_JUMP <maximum transaction increase value>

MAX_TRANSACTION_JUMP limits the maximum increase in the server's transaction number when opening a transaction-controlled file. This can prevent a shutdown due to transaction number overflow.

MAX_TRANSACTION_JUMP specifies a maximum transaction increase value. When opening a transaction-controlled file, if the file's transaction high water mark in the file header exceeds the server's current transaction number by more than the specified value, the server fails the file open with error 533 (MTRN_ERR). In this situation, use the ctclntrn utility to clean the transaction marks in the file, allowing the server to open it.

A value of 0 disables the setting.

If you don't know what to set it to, we recommend starting with a value of 1,000,000,000.

Default: 0 (disables the setting)

See also:

Transaction High-Water Marks

 

MAX_USER_LOG_ENTRY_BYTES

MAX_USER_LOGS <# of logs>

An optional limit for how many active transaction logs a transaction spans before it is aborted or abandoned. The default, ZERO, disables the check for long transactions.

When specified, MAX_USER_LOGS takes as its argument the maximum number of logs a transaction may span. If a transaction exceeds the limit, an attempt is made to abort the transaction. If the transaction cannot be aborted (consider the case where an abort would cause the server to fail), the transaction is abandoned. This means the client thread will lose its connection to the server, and the application may receive errors ARQS_ERR (127) or ARSP_ERR (128). There is no guarantee that a transaction will not span more logs than the specified maximum, however, the transaction will end within a reasonable number of logs.

If the transaction is aborted, then the next call by the client will return error MLAB_ERR (821) to indicate the operation was not completed and the pending transaction has been aborted. (See the end note for a special case of this error condition.) A message of the following form will be made in CTSTATUS.FCS:

Sun Dec 03 08:53:21 2006

- User# 00011 Transaction aborted at ct_mul_abandon1 for user# 9: 821

If the transaction is abandoned (that is, no explicit abort written in the log), then the client will be disconnected from the server. CTSTATUS.FCS entries such as the following reflect logs growing from a transaction that is pending, then the detection of the long transaction, then the eventual abandonment:

Sun Dec 03 09:53:42 2006

- User# 00012 The number of active log files increased to: 5

Sun Dec 03 09:53:42 2006

- User# 00012 Transaction (started in log 1) still pending.

User# 11 |GUEST||

Sun Dec 03 09:53:55 2006

- User# 00012 The number of active log files increased to: 6

Sun Dec 03 09:53:55 2006

- User# 00012 Abandoned Transaction

Sun Dec 03 09:54:10 2006

- User# 00012 The number of active log files increased to: 7

Sun Dec 03 09:54:10 2006

- User# 00012 Abandoned Transaction2

Sun Dec 03 09:54:10 2006

- User# 00012 Abandoned transaction kill request posted against user #11

|GUEST||

Sun Dec 03 09:54:10 2006

- User# 00011 ctntio: send error - O11 bytes=0 pErr=127

|GUEST||: 168

Sun Dec 03 09:54:25 2006

- User# 00012 The number of active log files decreased to: 4

The number of logs continued to grow, and then shrink, as reflected in the above excerpt because in addition to a transaction sleeping on a blocked lock, another unrelated application was continuing to add records to its files and corresponding entries in the transaction logs.

Note: In some rare situations error TRAB_COD (-823) can be returned instead of MLAB_ERR. This indicates the requested operation was completed before the abort actually took place. Usually, this is the same condition as an MLAB_ERR, as the transaction is aborted. In practice, the TRAB_COD should be rare.

Default: 0

 

MAX_USER_LOGS

MAX_USER_LOGS <max number of logs>

MAX_USER_LOGS controls how many logs a transaction can span before attempts are made to abort or abandon the transaction. The default, ZERO, disables the check for long transactions.

If a transaction cannot be aborted (for example, a server fault would occur) the transaction is abandoned which means that the client thread loses its connection to the server. There is no guarantee that the transaction will not span more logs than the specified maximum, but the transaction will end within a reasonable number of logs.

If the transaction is aborted, then the next call by the client will return a MLAB_ERR (821) to indicate the operation was not completed and the pending transaction has been aborted. A message of the following form will be made in CTSTATUS.FCS:

Sun Dec 03 08:53:21 2006

- User# 00011 Transaction aborted at ct_mul_abandon1 for user# 9: 821

If the transaction is abandoned (which means no explicit abort written in the log), then the client will be disconnected from the server. CTSTATUS.FCS entries such as those shown below reflect logs growing from a transaction that is pending, then the detection of the long transaction, then the eventual abandonment:

Sun Dec 03 09:53:42 2006

- User# 00012 The number of active log files increased to: 5

Sun Dec 03 09:53:42 2006

- User# 00012 Transaction (started in log 1) still pending.

User# 11 |GUEST||

Sun Dec 03 09:53:55 2006

- User# 00012 The number of active log files increased to: 6

Sun Dec 03 09:53:55 2006

- User# 00012 Abandoned Transaction

Sun Dec 03 09:54:10 2006

- User# 00012 The number of active log files increased to: 7

Sun Dec 03 09:54:10 2006

- User# 00012 Abandoned Transaction2

Sun Dec 03 09:54:10 2006

- User# 00012 Abandoned transaction kill request posted against user #11

|GUEST||

Sun Dec 03 09:54:10 2006

- User# 00011 ctntio: send error - O11 bytes=0 pErr=127

|GUEST||: 168

Sun Dec 03 09:54:25 2006

- User# 00012 The number of active log files decreased to: 4

The number of logs continued to grow, and then shrink, as reflected in the above excerpt because in addition to a transaction sleeping on a blocked lock, another unrelated application was continuing to add records to its files and corresponding entries in the transaction logs.

 

PREIMAGE_FILE

PREIMAGE_FILE <Full_path>D

The alternative name for the file containing preimages swapped to disk. The format for this name is an optional directory path, which may include a Drive ID, followed by the single character ‘D’ (e.g., E:\SWAP\D). The FairCom Server appends a seven-digit number and the extension .FCS to the name provided here.

This configuration option can include an environment variable name that will be substituted with its value when the configuration file is read.

Default: D

 

START_EVEN

START_EVEN <full_path>S

The alternative name for even numbered start file. The start file contains the location at which the automatic recovery routines begin to scan the transaction logs. There are two start files (numbered zero and one) to reduce the risk of losing the starting point for automatic recovery. This name must be in the form of a directory path and the single character ‘S’ (e.g., C:\START\S). The FairCom Server appends a seven-digit even number and the extension .FCS to the name provided.

If a relative path is specified for START_EVEN / START_ODD or LOG_EVEN / LOG_ODD, it is relative to the defined LOCAL_DIRECTORY path, not the startup directory of the server.

This configuration option can include an environment variable name that will be substituted with its value when the configuration file is read.

Default: S

See Also

START_EVEN_MIRROR

START_ODD

START_ODD_MIRROR

 

START_ODD

START_ODD <full_path>S

The alternative name for odd numbered start file. The start file contains the location at which the automatic recovery routines begin to scan the transaction logs. There are two start files (numbered zero and one) to reduce the risk of losing the starting point for automatic recovery. This name must be in the form of a directory path and the single character ‘S’ (e.g., C:\START\S). The FairCom Server appends a seven-digit odd number and the extension .FCS to the name provided.

If a relative path is specified for START_EVEN / START_ODD or LOG_EVEN / LOG_ODD, it is relative to the defined LOCAL_DIRECTORY path, not the startup directory of the server.

This configuration option can include an environment variable name that will be substituted with its value when the configuration file is read.

Default: S

See Also

START_EVEN

START_EVEN_MIRROR

START_ODD_MIRROR

 

SUPPRESS_LOG_FLUSH

SUPPRESS_LOG_FLUSH <YES | NO>

Causes transaction begin and commit operations to skip the flushing of the log file when its argument is YES. The default is NO. Suppressing the log flush makes it impossible to perform a proper automatic recovery. However, a dynamic dump will capture the necessary log information to restore TRNLOG files to a clean, consistent state. Using this keyword without the PREIMAGE_DUMP keyword is not recommended

By turning on PREIMAGE_DUMP and using PREIMG files, your system can run much faster than with full transaction processing, and still perform on-line dynamic dumps which will permit restoring files to the time of the dump in a clean, consistent state. However, it will NOT be possible to roll forward from the restored files because transaction log entries are not maintained outside of the dump process. See also PREIMAGE_DUMP and Advanced - Faster Auto-Recovery.

Note: We do not recommend disabling this keyword, as your data integrity will suffer. Be sure you understand what you are doing if you plan to change the default setting of this keyword.

Default: NO

See Also

 

SUPPRESS_LOG_SYNC

SUPPRESS_LOG_SYNC

Skips the sync'ing to disk from a log flush operation. This only applies to transaction begin/end operations. There are other system operations that cause log flushes, however, these are not affected. These other log flushes should also be relatively low in number.

Note: We do not recommend disabling this keyword, as your data integrity will suffer. Be sure you understand what you are doing if you plan to change the default setting of this keyword.

See Also

 

TRAN_HIGH_MARK

TRAN_HIGH_MARK <long integer>

Specifies a transaction number threshold value. If a file is opened with a high-water mark value greater than this threshold, a message is placed in CTSTATUS.FCS listing the file name.

For example, the following configuration entry would cause any file whose high-water mark exceeds one million to have its name listed in CTSTATUS.FCS.

TRAN_HIGH_MARK 1000000

 

TRAN_OVERFLOW_THRESHOLD

TRAN_OVERFLOW_THRESHOLD <transaction_number>

This keyword causes the c-tree Server to log the following warning message to CTSTATUS.FCS and to standard output (or the message monitor window on Windows systems) when the current transaction number exceeds the specified transaction number:

WARNING: The current transaction number (####) exceeds the user-defined threshold.

The message is logged every 10000 transactions once this limit has been reached. The TRAN_OVERFLOW_THRESHOLD limit can be set to any value up to 0x3ffffffffffff, which is the highest 6‑byte transaction number that FairCom DB supports.

When FairCom DB supports 6‑byte transaction numbers it does not display transaction overflow warnings until the current transaction number approaches the 6‑byte transaction number limit. But if 4‑byte transaction number files are in use, a key insert or delete will fail if the current transaction number exceeds the 4‑byte transaction number limit (however, FairCom DB will continue operating). This keyword allows the server administrator to determine when the server will issue a warning that its transaction number is approaching the limit.

See Also

 

TRAN_TIMEOUT

TRAN_TIMEOUT <interval>

There are occasions where it is valuable to limit the time that a FairCom Server transaction is allowed to span. Long held transactions can cause a number of application-related issues. For example, holding locks on a record, or preventing updates to be available to other users in a timely manner.

TRAN_TIMEOUT sets a time limit on a transaction: when a transaction is started, once the time period passes, if the transaction is still active it is aborted regardless of what the user is doing (the user could be idle for example).

  • <interval> is specified in seconds.
  • The minimum value for the timeout <interval> is 10 seconds. Any value between 1 and 10 is the same as 10.
  • If the <interval> is set to 0 (or a negative number), this feature is turned off.

TRAN_TIMEOUT is also useful to avoid increases in the number of active transaction logs which can occur due to a user starting a transaction and then remaining idle without committing the transaction, while other transaction activity occurs. TRAN_TIMEOUT aborting the transaction releases locks acquired within the transaction.

Deferred Transaction Begins

A deferred begin transaction (a transaction started using ctDEFERBEG), only starts counting the transaction time when the transaction is converted to an actual transaction (typically on the first update made in that transaction). For example, if you start isql and do some SELECTS then look at the transaction time shown for the SQL connection by ctadmn, it will show '--' indicating the transaction is not yet an actual transaction (this is because SQL threads use ctDEFERBEG transactions). Once you perform an update, ctadmn will show the transaction time counting, and if TRAN_TIMEOUT is in effect, the transaction will be aborted if it does not commit before the TRAN_TIMEOUT limit.

Transaction Timeout Statistics

The USERINFO() function returns state information for a particular connection to the FairCom Server. Included in the state information is the elapsed transaction time for that connection. When a transaction is started with the ctDEFERBEG mode, the elapsed transaction time value returned by USERINFO() is based on the time at which the TRANBEG() call was made.

For a transaction whose begin has been deferred, USERINFO() returns an elapsed transaction time of zero until the transaction begin is converted to an actual transaction begin, at which point the elapsed transaction time is calculated from that time.

Default: No timeout

 

TRANSACTION_FLUSH

TRANSACTION_FLUSH <# of updates>

This keyword provides control for the maximum number of updates to a buffer (data or index) before it is flushed. The buffer may well be flushed prior to this number of updates because of the LRU (Least Recently Used) scheme (used for index caches but not data caches) or because of the checkpoint limit. This system parameter affects only buffers holding images for transaction controlled files. Reducing this value reduces the amount of buffering, slowing system performance; but decreases the amount of work to be performed during recovery. A value of zero causes the buffer to be flushed upon update.

Default: 500000

 

UNBUFFERED_LOG_IO

UNBUFFERED_LOG_IO <YES | NO>

Enable separate unbuffered I/O for transaction logs.

OS Support

This option is supported on the Windows operating system.

In V11 and later, support for direct I/O has been enabled on Linux systems. A value of 512-bytes is used for size and alignment for direct I/O.

This feature supports both c-tree data and index files, as well as transaction logs. Configuration options are provided for both.

  • UNBUFFERED_IO filename (enables direct I/O for the specified file; the filename can include wildcards, such as *.dat)
  • UNBUFFERED_LOG_IO YES (enables direct I/O for the transaction logs).

Note: This feature requires Linux kernel version 2.6 or later, FairCom Server logs an error message to CTSTATUS.FCS if these options are used on pre-2.6 Linux kernel systems. The error messages are:

The UNBUFFERED_IO option requires Linux kernel version 2.6 or later

The UNBUFFERED_LOG_IO option requires Linux kernel version 2.6 or later

See Also

 

Recovery

FairCom DB can completely recover from normal server shutdowns when data is under complete transaction processing control. These options control how recovery proceeds in various scenarios.

WARNING: Use caution when specifying options skipping files as they can result in data loss if you're not absolutely certain of the operation of your application regards to data file handling.


RECOVER_DETAILS

Enables logging of detailed information about the FairCom DB automatic recovery process.

 
RECOVER_FILES

Allows setting separate limits on the number of files used during automatic recovery and regular operations.

 
RECOVER_MEMLOG

Loads one or more transaction logs into memory during automatic recovery to speed the recovery process.

 
RECOVER_SKIPCLEAN

Causes files that appear to have been properly closed to not be updated during recovery.

 
RECOVER_TO_RESTORE_POINT

Causes automatic recovery to recover to the last Restore Point.

 
REDIRECT

Redirects filename references in the transaction logs during automatic recovery to the specified new filename.

 
REDIRECT_IFIL

Specifies a file containing a list of files to be altered using the filename redirection rules specified with REDIRECT options.

 
SKIP_INACCESSIBLE_FILES

Forces automatic recovery to skip any file that is not accessible.

 
SKIP_MISSING_FILES

If a user file required during automatic recovery is missing, this keyword causes an error to be logged so the FairCom Server will successfully start up.


TRANIDX_LOPN_ERR_CONTINUE

Forces automatic recovery to continue in an unusual situation in which index reconstruction fails during automatic recovery.

 

RECOVER_DETAILS

RECOVER_DETAILS <YES | NO>

This keyword enables logging of detailed information about the FairCom DB automatic recovery process. The time spent for each phase of automatic recovery in addition to the number of transactions processed for each phase is provided. This keyword adds minimal overhead to FairCom Server operations.

Below is an example of messages that can be found in CTSTATUS.FCS when LOGIDX is not used during automatic recovery. The description in square brackets indicates why LOGIDX was not used:

Mon Nov 23 09:32:44 2009

- User# 00001 Index repair time: 0 seconds.

Mon Nov 23 09:32:49 2009

- User# 00001 tranrcv: Reconstructing index mark.idx [LOGIDX not in file header]

Mon Nov 23 09:32:51 2009

- User# 00001 tranrcv: Reconstructing index mark.idx M#01 [LOGIDX not in file header]

Mon Nov 23 09:32:52 2009

- User# 00001 tranrcv: Reconstructing index mark.idx M#02 [LOGIDX not in file header]

Mon Nov 23 09:32:53 2009

- User# 00001 Index composition time: 9 seconds.

Below is an example of messages found in CTSTATUS.FCS when LOGIDX is used during automatic recovery:

Mon Nov 23 10:46:26 2009

- User# 00001 Index repair time: 0 second(s) for 1 repair(s).

Mon Nov 23 10:46:26 2009

- User# 00001 tranrcv: Recomposing index file FAIRCOM.FCS DI:

Mon Nov 23 10:46:26 2009

- User# 00001 tranrcv: Processing abort node list entries.

Mon Nov 23 10:46:26 2009

- User# 00001 tranrcv: Recomposing index file mark.idx:

Mon Nov 23 10:46:26 2009

- User# 00001 tranrcv: Processing LOGIDX node entries.

Mon Nov 23 10:46:26 2009

- User# 00001 tranrcv: Checking index delete stack.

Mon Nov 23 10:46:26 2009

- User# 00001 tranrcv: Recomposing index file mark.idx M#01:

Mon Nov 23 10:46:26 2009

- User# 00001 tranrcv: Processing LOGIDX node entries.

Mon Nov 23 10:46:26 2009

- User# 00001 tranrcv: Recomposing index file mark.idx M#02:

Mon Nov 23 10:46:26 2009

- User# 00001 tranrcv: Processing LOGIDX node entries.

Mon Nov 23 10:46:26 2009

- User# 00001 Index composition time: 0 second(s).

 

Default: YES

 

RECOVER_FILES

RECOVER_FILES <number of files | NO>

RECOVER_FILES makes it possible to set separate limits on the number of files used during automatic recovery and regular operations. The reason automatic recovery may require more files than regular operations is that during recovery files opened stay open until the end of recovery. RECOVER_FILES takes as its argument the number of files to be used during recovery. If this is less than the number used during regular operation specified by the FILES keyword, the number of recovery files is set equal to the regular files and the keyword has no affect. If the number of recovery files is greater than the number of operational files, the number of files is adjusted downward at the end of automatic recovery freeing memory used by the additional control blocks, about 900 bytes per logical file.

Default: NO

 

RECOVER_MEMLOG

RECOVER_MEMLOG <# of logs to load | NO>

Loads one or more transaction logs into memory during automatic recovery to speed the recovery process. The argument for this keyword specifies the maximum number of memory logs loaded into memory during automatic recovery.

Default: NO

 

RECOVER_TO_RESTORE_POINT

RECOVER_TO_RESTORE_POINT <YES | NO>

YES causes automatic recovery to recover to the last Restore Point.

When RECOVER_TO_RESTORE_POINT is YES, then automatic recovery (after a crash) comprises two steps:

  1. the recovery of all transactions committed before the crash; and
  2. the rollback of transactions to the last Active Restore Point.

If DELAYED_DURABILITY is in effect at the time of the crash, then in step 1 it is not guaranteed that all transactions committed after the last Restore Point have their transaction log entries on disk (i.e., permanent storage).

Note: If DELAYED_DURABILITY is in effect and RECOVER_TO_RESTORE_POINT is NO, then automatic recovery will attempt to recover all transactions that had committed before the crash; but some transactions committed after the Restore Point and before the crash may be recovered and others lost so that the files may be in an unexpected state. There is no way to predict which transactions may have been lost.

See Also

 

RECOVER_SKIPCLEAN

RECOVER_SKIPCLEAN <YES | NO>

This keyword may improve recovery times under certain circumstances. Files which appear to have been properly closed are not updated during recovery.

Note: For non-server systems, set the NINT global variable ctskpclnfil to 1 to enable this feature.

 

REDIRECT

The Redirect feature is a useful feature allowing a file originating in one directory structure to be repositioned into another directory location during dynamic dump restore. This support has been extended to FairCom DB autorecovery.

One or more of the following configuration entries are used to specify redirection rules in the server configuration file ctsrvr.cfg:

REDIRECT <old path> <new path>

REDIRECT redirects filename references in the transaction logs during automatic recovery to the specified new filename. This option is useful when c-tree data and index files are moved to a different location (on the same system or on another system) before running automatic recovery.

To specify an empty string for one of the !REDIRECT arguments use a pair of double quotes ("").

Examples

If a file originally existed with the name and path C:\Documents and Settings\Administrator\c-tree Data\customer.dat and now exists as the file D:\Documents and Settings\Guest\customer.dat, the following option will allow automatic recovery to proceed and find the file in its new location:

REDIRECT "C:\Documents and Settings\Administrator\c-tree Data" "D:\Documents and Settings\Guest"

Here's a similar example using Unix paths, where the original file is named /users/administrator/c-tree data/customer.dat and the file now exists as /users/guest/customer.dat:

REDIRECT "/users/administrator/c-tree data" "/users/guest"

Note: Use double quotes when a filename contains spaces.

See Also

REDIRECT_IFIL

 

REDIRECT_IFIL

REDIRECT_IFIL <filename>

As a result of redirection during automatic recovery, if the IFIL resource of the file contained a path, this path would be incorrect after the file was redirected to the new location. To support copying c-tree files from one directory location to another (on the same system or on a different system) and accessing them in their new location, it is necessary to update any filename paths in a c-tree data file's IFIL resource.

The FairCom DB configuration option REDIRECT_IFIL <filename> provides support for automatically modifying redirected files on the server. When this option is specified, on server start up (after automatic recovery completes) the file named <filename> is opened and its list of file names is read from it. <filename> is a text file containing one c-tree data file per line. For each file specified in <filename>, FairCom DB opens the file and uses the filename redirection rules (specified with one or more of the REDIRECT options) to change the data and index file paths in the IFIL resource of the file.

Refer to the FairCom DB ctredirect standalone utility to manually modify files that may have been moved.

See Also

REDIRECT

 

SKIP_INACCESSIBLE_FILES

SKIP_INACCESSIBLE_FILES YES

Forces automatic recovery to skip any file that is not accessible.

See Also

 

SKIP_MISSING_FILES

SKIP_MISSING_FILES <YES | NO>

This keyword is available for special FairCom Server startup conditions. If a user file required by the FairCom DB Server during automatic recovery was deleted, an error 12 might be returned and the FairCom Server would not continue. By adding SKIP_MISSING_FILES to the default ctsrvr.cfg file, the error will be logged and the FairCom Server will successfully start up.

SKIP_MISSING_FILES is not recommended as a permanent setting. Deleting files under transaction processing control adversely affects database integrity.

Default: NO

See Also

 

TRANIDX_LOPN_ERR_CONTINUE

TRANIDX_LOPN_ERR_CONTINUE

In unusual situations, index reconstruction during automatic recovery could fail with error LOPN_ERR (96) due to a missing transaction log (e.g., L*.FCS). Starting with FairCom DB V11.5, it is possible to use the configuration option TRANIDX_LOPN_ERR_CONTINUE to allow automatic recovery to continue by adding this keyword to ctsrvr.cfg and restarting the FairCom DB Server process.

If recovery then completes successfully, the only issues caused by the missing transaction log was an inability for the FairCom DB Server to properly update an index node on disk.

In this case, the data files under transaction logging control (e.g., with file mode ctTRNLOG) are fully intact, and only the indexes need to be rebuilt to ensure the data and index files are fully in sync. Note, this is expected to be an unusual situation and FairCom recommends using extreme caution with this keyword. FairCom does not recommend enabling this keyword by default. It should only be enabled when required to recover from a catastrophic situation.

To use this option, add TRANIDX_LOPN_ERR_CONTINUE to ctsrvr.cfg. When this option forces the automatic recovery to continue, the following message is logged to CTSTATUS.FCS:

WARNING: tranidx could not open previous log file: 96

Upon completion of automatic recovery in this situation, the following message is logged to CTSTATUS.FCS, and FairCom DB Server terminates with error 571 to indicate to the administrator that all indexes should be rebuilt:

NOTE: tranidx continued without required logs. Recovery completed but index rebuild is required.

Automatic recovery terminated with error: 571

If the automatic recovery does NOT complete successfully after adding this keyword, then the missing transaction log is preventing FairCom DB from being able to successfully recover from the catastrophic situation and a backup should be used to restore the data to a known state.

 

File Management

 
AUTO_CLNIDXX

Permits automatic CLNIDXX() during file open when a transaction high water mark, hghtrn, is found at file open to exceed the current transaction number.

 
AUTO_MKDIR

When creating a c-tree data or index file, causes FairCom DB to automatically create directories for the filename that do not exist.

 

BLOCKING_OPEN_RETRY_DEFER

When an application requests retrying a file open call that failed because the file's creation is pending, this option specifies the number of milliseconds between retry attempts.

 

BLOCKING_OPEN_RETRY_LIMIT

When an application requests retrying a file open call that failed because the file's creation is pending, this option specifies the maximum number of retries.

 

CHECK_FILENAME_VALIDITY (CHECK_FILENAME_VALIDITY, CHECK_FILENAME_VALIDITY)

Restore Driver-Relative path handling as prior to V12.


COALESCE_TRNLOG

Attempt to combine deleted space with adjacent deleted space in ctTRNLOG files that do not have a RECBYT index.

 
FILE_CREATE_MODE

Specifies the desired file permission mode assigned to files on Unix systems.

 
FILE_HANDLES

On Unix, changes the number of file handles (at O/S level) that the O/S allows to be used by the FairCom Server.

 
FILE_PERMISSIONS

Permits default file permissions to be assigned to one or more groups including two special groups: WORLD and OWNER.

 
INHERIT_FILE_PERMISSIONS

Enables or disables inheriting file permissions from world to group to owner.

 
KEEPOPEN_CLOSE_RETRY_LIMIT

Determines the number of times to retry the close operation before failing.

 
KEEPOPEN_LIST

Upon file creation or physical open, attaches the KEEPOPEN attribute to the data file (and its indexes) if the file is a data file that matches a <file spec> and the file creation/open is part of an ISAM creation or open.

 
MAX_DFRIDX_LOGS (MAX_DFRIDX_LOGS, MAX_DFRIDX_LOGS)

Changes the limit FairCom Server sets for the number of active transaction logs that are kept for deferred indexing.

 
MAX_FILES_PER_USER

Limits number of files per user when auto resizing comes into effect (e.g., a file operation uses a file number beyond the existing client file range or a new file number is assigned automatically).

 

MAX_KEEPOPEN_FILES

Sets a limit on the number of files that can be kept in the KEEPOPEN state (meaning the file has been closed by all connections, but the server is keeping the file open for reuse).

 
MAX_VIRTUAL_FILES

Specifies the maximum number of virtual files that may be opened at one time.

 
MEMFILE_MAX_BINS

Sets the maximum number of hash bins allowed for a memory file at run time.

 
MEMORY_FILE

Enables creating memory files if the file matches the specified file name.

 
SPLIT_NBR_OF_FILES

Sets the number of files when using the partitioning file rule.

 
TMPNAME_PATH

Sets the default directory for temporary files.

 
Compression

 
CMPREC_TYPE

Specifies the type of data compression type for files.

 
COMPRESS_FILE

Forces FairCom DB to create data files whose names match the specified name with data compression enabled.

 
FILESYS_COMPRESS_FILE

Enables Windows file system compression on specified data and index files.

 
Segmented Files

 
HUGE_TO_SEG_MB

Force any huge file to be created as a segmented file.

 
MATCHING_SEGMENT

Specifies behavior when an attempt to create a new file segment encounters an existing segment with the same name and the file ID matches the host file’s ID and other attributes.

 
NONMATCHING_SEGMENT

Specifies behavior when an attempt to create a new file segment encounters an existing segment with the same name and the file ID does not match the host file’s ID and other attributes.

 
Diagnostics

Diagnostics keywords are intended to be used to help collect data to be analyzed for troubleshooting. The use of these keywords should be avoided in normal operation as they may cause additional overhead (e.g., logging).

 
DIAGNOSTICS PTADMIN

Enables the filename and list of open instances of that file to be logged to CTSTATUS.FCS when a partition member purge fails with error 718.

 

AUTO_CLNIDXX

AUTO_CLNIDXX YES

Optionally permits automatic CLNIDXX() during file open when a transaction high water mark, hghtrn, is found at file open to exceed the current transaction number.

The disadvantage of this approach is that it is necessary to traverse all the index leaf nodes, writing those to disk that have been cleaned. For a very large index, this could be time consuming. Only customers that have experienced problems with HTRN_ERR (520) are candidates to use this configuration option. Also, internal, administrative requests to open the file read only (say as part of a dynamic dump or ctFILBLK() processing) are denied if the file is in the middle of an on the fly CLNIDXX().

CTSTATUS.FCS receives messages concerning on the fly CLNIDXX(). Both success and failure are noted.

 

AUTO_MKDIR

AUTO_MKDIR <YES | NO>

When creating a c-tree data or index file, FairCom DB can automatically create directories for the filename that do not exist.

Programmers can call the CreateFileXtd8 file create function and set the ctAUTOMKDIR bit in the splval field of the xcreblk parameter to cause directories that do not exist to be created when creating that file.

Default: No

 

BLOCKING_OPEN_RETRY_DEFER

BLOCKING_OPEN_RETRY_DEFER <# of milliseconds between retries>

 

Configures the delay in milliseconds between retries when retrying a failed file open.

NOTE: Specifying a large BLOCKING_OPEN_RETRY_DEFER can slow performance, so FairCom generally recommends using the default BLOCKING_OPEN_RETRY_DEFER setting, and instead tweaking the total number of retries using BLOCKING_OPEN_RETRY_LIMIT.

 

BLOCKING_OPEN_RETRY_LIMIT

BLOCKING_OPEN_RETRY_LIMIT <maximum # of retries>

 

Configures the maximum number of retries allowed when retrying a failed file open. You can tweak this number to find your preferred balance between the time spent retrying and the number of opportunities for success.

A value of 0 means infinite retries.

Retries will be stopped if the server shuts down or an administrator terminates the connection.

Default: 10

See Also: You can use BLOCKING_OPEN_RETRY_DEFER to configure the time delay between retries, though this is not generally recommended.

 

CHECK_FILENAME_VALIDITY

CHECK_FILENAME_VALIDITY YES | NO

FairCom DB V12 and FairCom RTG V3 forward no longer support “Drive-Relative” Paths by default. The purpose is to ensure predictable, safe, and secure behavior. and all files must be opened using an absolute file path. For backwards compatibility, you can restore prior behavior by adding the CHECK_FILENAME_VALIDITY NO configuration option to ctsrvr.cfg.

On Microsoft Windows,® FairCom uses the concept of a "Drive-Relative Path" as an easy way to specify a relative path to where the database is installed on a drive. The path includes a drive letter without a following backslash. For example, C:mydirectory\test.dat is a drive-relative path because there is not a backslash after the drive specification (C:). On the other hand, C:\mydirectory\test.dat is not a drive-relative path; it is an absolute path. A drive-relative path is relative to whatever happens to be the current working directory of the database on that drive. A process may have a current working directory for each drive.

For example, if the working directory on C: is C:\FairCom, then the drive-relative path C:mydirectory\test.dat is equivalent to C:\FairCom\mydirectory\test.dat while the absolute path C:\mydirectory\test.dat is unaffected.

Drive-Relative Paths can cause behavior that is unpredictable, unsafe, or unsecure. Thus, the database now returns an error when a Drive-Relative Path is specified in a call to create or open a file.

Compatibility Notes: This modification breaks compatibility by disallowing certain file names that used to be allowed. The preferred solution is to use a full path. (A less preferable solution is to use the configuration option CHECK_FILENAME_VALIDITY NO in ctsrvr.cfg. This option can also be changed at runtime. In standalone mode, this behavior is controlled by a field in the CTGVAR structure, ctCheckFileNameValidity. Setting it to a non-zero value enables the check; setting it to zero disables the check.)

 

 

CMPREC_TYPE

CMPREC_TYPE < TYPE >

Specifies the type of data compression type for files. Several algorithms are supported.

CMPREC_TYPE < ZLIB | RLE | USER >

The following compression types are currently supported:

  • ZLIB - General purpose compression from the zlib compression library.

Note: the ZLIB compression algorithm will impact performance. A Best Practice is to consider using RLE compression. It's quick and easy to test both ZLIB and RLE, but in most cases we have found RLE to be the better combination of reduced space and minimal performance overhead.

  • RLE - A fast proprietary run length encoding optimized for data that is null character, space or zero (0) padded (sparse data files).
  • USER - A user defined compression algorithm, requiring an associated .DLL (or shared object)

With USER compression, these additional keywords must be entered in the configuration file in the order shown below, and a DLL name is required.

CMPREC_TYPE < USER >

CMPREC_VERSION < a number >= 1 >

CMPREC_DLL < name of DLL >

See Also

 

COALESCE_TRNLOG

COALESCE_TRNLOG

Attempt to combine the deleted space with adjacent deleted space that already exists in ctTRNLOG files that do not have a RECBYT index (default is OFF). Combining deleted space can reduce fragmentation.

To enable this behavior, either:

  • Add the server keyword COALESCE_TRNLOG ON

or

  • Set the global variable ctcoaltran = YES in a standalone compile.

 

COMPRESS_FILE

COMPRESS_FILE <filename>

Forces FairCom DB to create data files whose names match the specified name with data compression enabled. The file name may include wildcard characters (see FairCom DB Standard Wildcards).

A file whose name matches the keyword is created as a variable-length data file even if the create option specifies that it is a fixed-length data file. Such a file is still restricted to containing records that have the defined fixed-record length.

The logic has been changed so that the COMPRESS_FILE keyword does not enable data compression for a data file that is created with resource support disabled. This prevents a rebuild from failing with error 484 (could not open sort work file).

See Also

  • CMPREC_TYPE in the c-tree Server Administrator’s Guide.

 

FILE_CREATE_MODE

FILE_CREATE_MODE <mode>

On Unix systems, FairCom DB defaults to a permission mode of 0660 (read/write access for owner and group; no access for world) for the files it creates.

When using FairCom DB, the permission mode assigned to files can be set with the server configuration keyword FILE_CREATE_MODE to specify the desired file permission mode.

Example

;Set read and write permission for owner

;and no permission for group and world.

FILE_CREATE_MODE 0600

Note: On Unix systems, the system’s umask setting also affects the permission mode assigned to a file when it is created. If the umask setting is non-zero, the specified permissions are removed from the file’s permission mode.

 

FILE_HANDLES

FILE_HANDLES

This keyword is used on Unix system to change the number of file handles (at O/S level) that the O/S allows to be used by the FairCom Server.

No Default

 

FILE_PERMISSIONS

FILE_PERMISSIONS groupID#pmodeA#...#pmodeZ

Permits default file permissions to be assigned to one or more groups including two special groups: WORLD and OWNER. The primary need for this capability is to enforce permission flags on files that have already been created without a permission mask (i.e., the permission mask is zero at file create). A zero permission mask is equivalent to granting everyone all rights:

OPF_ALL | GPF_ALL | WPF_ALL

Note: ALL does not include the special NOPASS flag that permits a file to be opened for reading without supplying the file password. To grant NOPASS permission, it must be included explicitly.

  • groupID is the name of a user group or the special groups WORLD and OWNER. The server does NOT verify that the groupIDs actually exist.
  • pmode entries are symbolic names for the possible permission flags: READ, WRITE, DEF, DELETE, ALL, NOPASS and NONE. NONE should not be used with any other permission flags. It indicates no permissions are granted. Granting a permission of WRITE, DEF or DELETE is equivalent to granting all of the lesser permissions, thus DELETE and ALL are equivalent. For example, #READ#WRITE is equivalent to #WRITE. The groupID and pmode entries are case insensitive.

The WORLD entry applies to file opens by a user whose group(s) do not match any of the specified groups for those files without an explicit permission mask. If there is no WORLD entry, then WORLD permissions default to ALL. The OWNER entry applies to file opens by the users that created the files without an explicit permission masks.

Consider the following entries, and assume all the files in use did not have explicit permission masks at creation. Files with explicit permission masks (except for OPF_ALL | GPF_ALL | WPF_ALL) at creation are not affected by these FILE_PERMISSIONS entries.

FILE_PERMISSIONS OWNER#DEF

FILE_PERMISSIONS inventory#WRITE

FILE_PERMISSIONS ACCOUNTING#write#nopass

FILE_PERMISSIONS WORLD#NONE

In this example, the owner of a file will have READ, WRITE and DEF permissions. The owner of the file cannot delete the file. Members of the INVENTORY group have READ and WRITE permissions. Members of the ACCOUNTING group have READ and WRITE permissions and may open a file without its password (and receive READ permission only). A user who is not the owner of a file and not a member of the ACCOUNTING or INVENTORY groups will be assigned WORLD permissions, which in this case is NONE. NONE means the file cannot be opened.

If a user belongs to multiple groups, and two or more of its groups are specified with the FILE_PERMISSIONS keyword, the permissions granted to the user will be the union of the individual group permissions. However, if the user is the OWNER of the file, it receives OWNER permissions that default to ALL.

 

FILESYS_COMPRESS_FILE

FILESYS_COMPRESS_FILE <filename>

The FairCom Server configuration option FILESYS_COMPRESS_FILE can be used to enable file system compression on files whose names match the specified filename, which can include wildcard characters. The compression is enabled at the time that the file is created. This option only affects data and index files, not transaction logs or CTSTATUS.FCS.

Limitations

Currently, support for file system level compression is implemented only on Windows systems, using the built-in compression feature of the NTFS file system.

https://docs.microsoft.com/en-us/windows/win32/fileio/file-compression-and-decompression

Example

 

FILESYS_COMPRESS_FILE custmast.dat

FILESYS_COMPRESS_FILE custordr.dat

FILESYS_COMPRESS_FILE ordritem.dat

FILESYS_COMPRESS_FILE itemmast.dat

 

HUGE_TO_SEG_MB

HUGE_TO_SEG_MB <segment size in MBs> [#<maximum number of segments>]

Note: Segmented Tables have been deprecated.

Force any huge file to be created as a segmented file.

On systems that do not support files greater than 2 GB or 4 GB, FairCom DB can still support huge files by creating tables as segmented files. The size of each segment stays below the OS maximum file size limit, but the aggregate size exceeds the limit.

The maximum number of segments is optional and defaults to sixteen (16). For example, to specify a segment size of 1 GB, and a maximum of 8 segments for a total file size of up to 8 GB, an entry would look like

HUGE_TO_SEG_MB 1024#8

If the file has been created with a maximum size in the XCREblk structure (see parameters for the extended create file function), then the number of segments will be computed to accommodate the maximum size.

Note: If dynamic dumps are used, then it would be appropriate to use the !EXT_SIZE script option so that the dump stream file would also be broken into automatic segments.

 

INHERIT_FILE_PERMISSIONS

INHERIT_FILE_PERMISSIONS YES | NO

By default, FairCom DB file permissions are inherited from world to group to owner. For example, if the SECURITY() function is called with a mode of SEC_FILEMASK and a permission mask of WPF_READ, GPF_READ and OPF_READ permissions are turned on. However, note that if GPF_NONE is specified, the permissions are not passed on to the group (and to the owner).

Note: Changing this option does not affect inheritance of permissions on files whose permissions have already been set. It only affects the inheritance of permissions when they are set at file create time or by calling the SECURITY() function with a mode of SEC_FILEMASK.

Default: YES

 

KEEPOPEN_CLOSE_RETRY_LIMIT

KEEPOPEN_CLOSE_RETRY_LIMIT <limit>

Determines the number of times to retry the close operation before failing.

KEEPOPEN_LIST logic has internal checks to determine if the file open or create function returned an insufficient file control block error. If so, it checks if a KEEPOPEN file is available to close, closes it, and retries the open or create operation. The FairCom Server configuration option KEEPOPEN_CLOSE_RETRY_LIMIT determines the number of times these functions retry the operation before failing.

Default: 3

The default value for KEEPOPEN_CLOSE_RETRY_LIMIT is appropriate for most situations. You may want to consider increasing it if you experience errors 165.

See Also

 

KEEPOPEN_FLUSH

KEEPOPEN_FLUSH YES | NO

When a data or index file is closed, the c-tree server will flush updated cache pages and set the update flag of the file to zero under the following conditions:

  • The file does not use the full transaction logging (ctTRNLOG) filemode.
  • No other users have the file opened.
  • The KEEPOPEN_LIST option is set to keep the file open.
  • The configuration option KEEPOPEN_FLUSH YES in ctsrvr.cfg is set..

Default: NO

 

KEEPOPEN_LIST

KEEPOPEN_LIST <file spec>

<file spec> can be a file name or a partial name including wildcard characters. See FairCom DB Standard Wildcards. Upon file creation or physical open, (1) if the file name matches a <file spec> and (2) if the file is a data file and (3) if the data file creation/open is part of an ISAM creation or open, then the KEEPOPEN attribute is attached to the data file and its indexes.

KEEPOPEN_LIST logic has internal checks to determine if the file open or create function returned an insufficient file control block error. If so, it checks if a KEEPOPEN file is available to close, closes it, and retries the open or create operation. The FairCom Server configuration option KEEPOPEN_CLOSE_RETRY_LIMIT determines the number of times these functions retry the operation before failing. It defaults to 3. The default value for KEEPOPEN_CLOSE_RETRY_LIMIT is appropriate for most situations. You may want to consider increasing it if you experience errors 165.

To specify multiple files, repeat the KEEPOPEN_LIST keyword for each file. You can specify KEEPOPEN_LIST as many times as you need. The only limitation is only one file per entry. For example:

KEEPOPEN_LIST custmast.dat

KEEPOPEN_LIST itemmast.dat

KEEPOPEN_LIST ordritem.dat

KEEPOPEN_LIST tell*.dat

Memory files have the option of staying open after all users have closed the file. The motivation for keeping memory files open is to avoid losing the contents of the file so that subsequent users can open the file and read and/or update the contents.

When a non-memory file is physically closed, c-tree removes the data cache and/or index buffer entries associated with the file. A file is physically closed when all users that have the file open close the file. For a non-memory file, keeping the file open even after all users have closed the file permits the associated cache/buffer entries to stay in memory. Then subsequent opens have the benefit of the cache contents.

ISAM data files and their associated indexes can also be designated as KEEPOPEN files. The motivation is to keep the files in the data cache and index buffers. It also eliminates a physical open when the next user opens the file. If all users have closed a KEEPOPEN file, then ctCLSNAM() can be called to close the data file and associated indexes.

Files to be treated in this manner are specified in the server configuration file with one or more entries of the form shown above.

Note: If a file is kept open by KEEPOPEN_LIST, a call to ctFILBLK does not block access to it. Calling CloseCtFileByName will close the file and it will remain closed until unblocked by a subsequent ctFILBLK call. (The FairCom DB Developer Guide explains the ctFILBLK and CloseCtFileByName functions.)

Behavior Change for V10.3.1 and Later

For a data or index file that does not use full transaction logging (ctTRNLOG), FairCom Server now flushes updated cache pages and sets the update flag to zero for the file when the last user closes the file and the KEEPOPEN_LIST option keeps the file open.

The configuration option KEEPOPEN_FLUSH NO can be used in ctsrvr.cfg to disable this flushing behavior and revert to the behavior prior to V10.3.1, although this is not recommended.

This is a change from previous behavior: When FairCom Server's KEEPOPEN_LIST configuration option was in effect for a c‑tree data or index file that was not under transaction control, FairCom Server kept that file open after the last user closed the file. Updated data and index cache pages remained and were not written to disk before the call to close the file returned to the caller. This caused unnecessary data integrity risk should the FairCom Server abnormally terminate while the file remained open. The file is likely to fail to open with an FCRP_ERR error, 14, under such scenarios.

See Also

 

LEAF_NODE_READ_LOCK

 

MATCHING_SEGMENT

MATCHING_SEGMENT <RENAME | DELETE | OVERWRITE | ERROR>

The segmented file logic behaved as follows when an attempt to create a new file segment encountered an existing segment with the same name:

  • If the existing segment matched the host file’s file ID and other attributes, then the existing segment was simply overwritten.
  • If the file ID did not match, then an error was returned and no more records could be added to the file.

Overwriting a matching segment could cause a problem because the existing data is simply left in place until new records overwrite the data.

In addition to different defaults, the behavior for a matching segment (i.e., segment’s file ID matches the host file’s unique ID), is quite different than for a non-matching segment. For a matching segment, if RENAME is in effect and the rename fails, then a delete is attempted. If a delete fails, then the segment is overwritten. The error option must be explicitly requested. For a non-matching segment, if either rename or delete are in effect and they fail, then an error occurs (and overwrite is not an option).

CTSTATUS.FCS entries are made when one of these unexpected segments are encountered. When a rename occurs, the segment’s name is modified by adding the hexadecimal representation of the system’s time in seconds to the end of the file name. For example,

mydata.s04

might become

mydata.s04.4465f728

where 0x4465f728 is the system time in seconds from some arbitrary starting point.

Default: RENAME

See Also

NONMATCHING_SEGMENT

 

MAX_FILES_PER_USER

Client file information, on both client and server side, is automatically resized when:

  • A file open or create uses a file number beyond the existing client file range.
  • A new file number is assigned with automatic file number assignment (for example, OpenFileWithResource() with a -1 filno).

A configurable limit on files per user is enforced when this auto resizing comes into effect. An open/create which returns a FINC_ERR (604) implies that the create succeeded on the FairCom Server, but the client could not allocate memory for the local file info, and the newly created file has been closed.

Stand-alone applications support automatic resizing of file control information up to the limit imposed by ctMAXFIL, which defaults in ctoptn.h to 110. If ctMAXFIL is not defined, the limit defaults to 1024 files/FCBs.

Note: If a filno beyond the existing file range causes a resizing, the new number of files supported goes from 0 to filno + MAXMEMB + 1, with FCBs allocated for all potential file numbers in the range. Use automatic file number assignment for maximum memory efficiency.

For example, if InitISAM() requests 100 files and OpenCtFile() uses file number 1000, resizing changes the number of files supported to 1000 + MAXMEMB + 1, or 1032. All the files between 100 and 1000 are now available. By contrast, if an automatic file number assignment causes resizing, the file number range is only extended by MAXMEMB + 1. If InitISAM() requests 100 files and OpenFileWithResource(-1,...) causes resizing, the number of files supported would increase to 132.

Default: The default value of MAX_FILES_PER_USER is the same as the server's maximum supported FILES value (which is update 1 million open files). You can use the MAX_FILES_PER_USER option to set a connection's maximum number of open files to a smaller value.

See Also

FILES

MAXMEMB

 

In This Section

Maximum Index Members per File (MAXMEMB)

Maximum Index Members per File (MAXMEMB)

The default for the MAXMEMB (the number of index members per single index file) has been updated to 127 allowing a larger number of segments per index.

We now define ctMAXMEMB in ctopt1.h instead of in ctopt2.h, because ctport.h references ctMAXMEMB and it is included before ctopt2.h.

We also define MAXMEMB to ctMAXMEMB in ctopt1.h.

 

MAX_KEEPOPEN_FILES

MAX_KEEPOPEN_FILES <maximum # of KEEPOPEN files>

 

Sets a limit on the number of files that can be kept in the KEEPOPEN state (meaning the file has been closed by all connections, but the server is keeping the file open for reuse).

This prevents potential negative performance impacts from keeping too many files in the KEEPOPEN state.

Default: 1000

 

MAX_REBUILD_QUEUE

MAX_REBUILD_QUEUE <max_queue_size>

FairCom Server supports an option to use a worker thread to sort the keys read from the data file. The rebuild thread reads records from the data file and constructs key values, which it passes to the sort thread using an inter-thread queue. After all the key values have been passed to the sort thread, the sort thread sorts the key values and passes them back to the rebuild thread in a second queue.

This option is enabled by specifying MAX_REBUILD_QUEUE <max_queue_size> in ctsrvr.cfg with a positive value. The value is a number in bytes indicating the maximum size of the queue used to pass the keys to the worker thread. MAX_REBUILD_QUEUE defaults to 100 MB. A 64-bit server has a limit of 4 TB - 1 for this setting, and a 32-bit server has a limit of 4 GB - 1 for this setting.

For example, in one test comparing V10 rebuild performance with its defaults (16,000 bytes of SORT_MEMORY and no MAX_REBUILD_QUEUE support) to this optimized rebuild available in V11, rebuilding a 17 GB data file completed in an average of 1,816 seconds, and the optimized rebuild completed in an average of 623 seconds, which is 66% faster (about 1/3 the time of the original rebuild).

<maximum_queue_size> is interpreted as bytes by default, or it can be specified with a suffix of KB, MB, or GB (e.g., 10 MB).

See Also:

 

MAX_VIRTUAL_FILES

MAX_VIRTUAL_FILES <Maximum files>

An integer argument specifying the maximum number of virtual files that may be opened at one time.

A <Maximum files> value of -1 forces all files as ctPERMANENT.

Default: 500

 

MEMFILE_MAX_BINS

MEMFILE_MAX_BINS <bins>

The maximum size of a memory file determines the number of hash bins that FairCom DB allocates for the memory file. However, there is a hard limit on the number of hash bins for a memory file. Previously, this limit was set at compile time to 65536. This configuration option is used to set the maximum number of hash bins allowed for a memory file at run time. This may be necessary for efficient access to very large memory files.

Default: 65537

 

MEMORY_FILE

The FairCom Server supports creating memory files using a server configuration keyword. This feature allows developers to create memory files using their existing application code, provided that the file is created using an Xtd8 create function such as CreateIFileXtd8(). To create a memory file using the server configuration keyword, specify one or more entries of the form:

MEMORY_FILE <file name>#<max size>

where the file name may include wildcard characters (see FairCom DB Standard Wildcards) and the maximum size is optional. If no maximum size is specified, then 4GB is used. If a file is being created and matches one of the MEMORY_FILE file name entries, then it will be created as a memory file unless it is a superfile host, superfile member, mirrored, segmented or partitioned file.

To cause all possible files to be created as memory files, add the following configuration entry:

MEMORY_FILE *

The MEMORY_FILE keyword is useful to quickly test how a file or set of files will behave as memory files.

 

NONMATCHING_SEGMENT

NONMATCHING_SEGMENT <RENAME | DELETE | ERROR>

The segmented file logic behaved as follows when an attempt to create a new file segment encountered an existing segment with the same name:

  • If the existing segment matched the host file’s file ID and other attributes, then the existing segment was simply overwritten.
  • If the file ID did not match, then an error was returned and no more records could be added to the file.

Overwriting a matching segment could cause a problem because the existing data is simply left in place until new records overwrite the data.

In addition to different defaults, the behavior for a matching segment (i.e., segment’s file ID matches the host file’s unique ID), is quite different than for a non matching segment. For a matching segment, if RENAME is in effect and the rename fails, then a delete is attempted. If a delete fails, then the segment is overwritten. The error option must be explicitly requested. For a non matching segment, if either rename or delete are in effect and they fail, then an error occurs (and overwrite is not an option).

CTSTATUS.FCS entries are made when one of these unexpected segments are encountered. When a rename occurs, the segment’s name is modified by adding the hexadecimal representation of the system’s time in seconds to the end of the file name. For example,

mydata.s04

might become

mydata.s04.4465f728

where 0x4465f728 is the system time in seconds from some arbitrary starting point.

Default: ERROR

See Also

MATCHING_SEGMENT

 

RECYCLE_BIN

The recycle bin is configured with SUBSYSTEM CTFILE RECYCLE_BIN . This subsystem configuration option supports the following options:

  • recycle_folder_name: directory name where the recycle bin is stored and can be absolute or relative. If relative, the directory is relative to the server's LOCAL_DIRECTORY configured directory or current working directory if LOCAL_DIRECTORY is not used.
  • purge_frequency_minutes: time in minutes between checks for files that should be purged from the recycle bin.
  • max_file_age_days: maximum number of days a file is kept in the recycle bin.
  • max_folder_storage_size: maximum total byte size of the files in the recycle bin. If deleting a file causes the recycle bin to go over the limit, files are deleted until the size is below the limit.

Example

subsystem ctfile recycle_bin {

recycle_folder_name deleted_files

purge_frequency_minutes 60

max_file_age_days 30

max_folder_storage_size 1 gb

}

MONITORING

The statistic utility, ctstat supports a deleted_files option listing the total size and detail list of files currently in the recycle bin.

Example

ctstat -deleted_files -u ADMIN -p ADMIN -s FAIRCOMS -i 1 -h 1 -t

 

Thu Dec 9 15:01:48 2021

Total file size: 917500 for 4 file(s)

Deleted file of size 131071 deleted\1639081086.20211209\qatranrepl097.sup.992

Deleted file of size 131071 deleted\1639081086.20211209\qatranrepl097.sup.998

Deleted file of size 327679 deleted\1639081086.20211209\qatranrepl097.sup.1017

Deleted file of size 327679 deleted\1639081086.20211209\qatranrepl097.sup.1026

NEW SERVER FILES

Two new files are required for tracking inactive files in the recycle bin. RECBINDT.FCS and RECBINIX.FCS are transaction-controlled data and index files retaining data about the current recycle bin state. The data file contains a state record for each deleted file, and a state record that holds the total space in use by deleted files. The index enables the background thread to find files that were deleted from the oldest to newest timestamp.

REPLICATION AGENT CHANGES

The replication agent supports a configuration option to enable whether the agent uses the recycle bin any time it deletes a file on the target server. The ctreplagent.cfg option is delete_to_recycle_bin yes | no and is on by default.

 

SPLIT_NBR_OF_FILES

SPLIT_NBR_OF_FILES <# of files>

When using the partitioning file rule:

<file_part_ind> = ( <int_unique_key> % <nbr_of_files> ) + 1

<nbr_of_files> is configured by the SPLIT_NBR_OF_FILES configuration entry.

Note: Partitioning is currently only supported with a custom build containing the partition rule. Please contact your nearest FairCom office for availability.

 

TMPNAME_PATH

TMPNAME_PATH <path>

The TMPNAME_PATH location becomes the default directory for temporary files. On startup, if a TMPNAME_PATH entry is encountered in ctsrvr.cfg, the FairCom Server tests the validity of the path. If there is an error, the FairCom Server terminates. Whether or not successful, the FairCom Server enters the path name in the CTSTATUS.FCS file.

This configuration option can include an environment variable name that will be substituted with its value when the configuration file is read.

Default: Current server directory

 

DIAGNOSTICS PTADMIN

DIAGNOSTICS PTADMIN

When a partition member purge fails with error 718, this enables the filename and list of open instances of that file to be logged to CTSTATUS.FCS. Below is an example. For each connection we list the task ID, user name, node name, and user file number.

Mon Dec 12 12:40:33 2011

- User# 00012 PT_ADMIN: purge failed, partition .\ctreesql.dbs\admin_pt.20111129.015307.dat is open (2 open instances):

Mon Dec 12 12:40:39 2011

- User# 00012 PT_ADMIN: Connection 16: ADMIN(SQL:CTREESQL) 64

Mon Dec 12 12:40:44 2011

- User# 00012 PT_ADMIN: Connection 17: ADMIN(SQL:CTREESQL) 45

A process stack is also created when this occurs. This option can also be enabled via SETCONFIG() and through the ctadmn utility.

 

Locking

 
AUTO_LOCK_RETRY

Enables automatic retries of data record locks when a c-tree function call fails with a data record lock error DLOK_ERR.

 
AUTO_LOCK_RETRY_SLEEP

Set the sleep time between retries.

 
BLOCKING_LOCK_TIMEOUT_SEC

Avoids excessively long blocking lock waits by returning error UTIM_OUT (827) to the caller of the lock request.

 
CHECKLOCK_FILE (CHECKLOCK_FILE, CHECKLOCK_FILE)

Enable or disable ctCHECKLOCK mode for specified data files.

 
COMPATIBILITY LKISAM_MODES

Disables error if the lokmod parameter includes any modifier bits intended for FairCom use only.

 
ITIM_RETRY_DEFER

Introduces a delay before internally retrying an ISAM record read operation when an ITIM_ERR (160) is encountered.

 
ITIM_RETRY_LIMIT

Enables retrying the operation the specified number of times before returning ITIM_ERR (160) if an index is out-of-sync with the data temporarily while another user is performing an update.

 
Diagnostics

Diagnostics keywords are intended to be used to help collect data to be analyzed for troubleshooting. The use of these keywords should be avoided in normal operation as they may cause additional overhead (e.g., logging).

 
DIAGNOSTICS DLOK_ERR

Enables logging of DLOK_ERR (42) lock error information to CTSTATUS.FCS.

 
DIAGNOSTICS LOCK_DUMP

Enable the use of the LockDump() function for non ADMIN users.

 

AUTO_CHECKLOCK

CHECKLOCK_FILE <YES/NO>

Available in version 13.0.3 onwards:

If YES (default), ctCHECKLOCK is enabled on all files.

If NO, ctCHECKLOCK is not enabled (which is the behavior before 13.0.3).

You can enable or disable this feature for individual files using CHECKLOCK_FILE.

Breaking Change: As of version 13.0.3, the server prevents a record from being updated if it is not locked. This has always been the intended behavior, but previous versions did not enforce it. Use AUTO_CHECKLOCK NO to revert to the previous behavior.

 

AUTO_LOCK_RETRY

AUTO_LOCK_RETRY <retries>

Enables automatic retries of data record locks when a c-tree function call fails with a data record lock error DLOK_ERR.

Default: 0 (retries).

 

AUTO_LOCK_RETRY_SLEEP

AUTO_LOCK_RETRY_SLEEP <milliseconds>

Set the sleep time between retries.

Default: 100 ms

 

BLOCKING_LOCK_TIMEOUT_SEC

BLOCKING_LOCK_TIMEOUT_SEC <timeoutSEC>

BLOCKING_LOCK_TIMEOUT_SEC avoids excessively long blocking lock waits. When used, this feature returns error UTIM_OUT (827) to the caller of the lock request. The function ctLOKTIMOUT() is used to set, change and clear this timeout feature.

  • timeoutSEC is specified in seconds, and determines the amount of time to wait before returning the UTIM_OUT error.

This configuration entry is equivalent to a member of the ADMIN group making the call ctLOKTIMOUT(-1, ctLTOallusers | ctLTOdiagnostic, timeoutSEC).

Note: The effect of the configuration entry can be turned off by a call of the form ctLOKTIMOUT(-1, ctLTOallusers, 0).

If a user calls ctLOKTIMOUT() with a datno equal to -1 in order to set a timeout value on all data files for the user, the user can selectively change or turn off the timeout by making additional calls to ctLOKTIMOUT() specifying the data file number.

Lock Statistics

Locking statistics have an inconsistency when a lock request is removed from a list of waiting lock requests. When a lock request times out with this new feature, it is removed from the wait list. For instance, if a thread is waiting for a lock and it is killed by ctadmn, the lock is removed from the waiting list, however, the lock statistics do not reflect this. In fact, the count of currently blocked locks will be off (too high) by one for each lock request removed from a wait list. A new lock statistic has been added to account explicitly for lock requests that have been removed from the wait list: “killed.” It is treated in the same manner as the deadlock category.

 

CHECKLOCK_FILE

CHECKLOCK_FILE

Enables or disables ctCHECKLOCK mode for specified data files. This file mode can be invoked a number of ways. A file can be created with this set or it can be opened with this set. In V11.5 and later, you can use this server keyword to enable it dynamically.

Note: In V13.0.3 onwards, we enable ctCHECKLOCK on all files by default, since AUTO_CHECKLOCK is set to YES, overriding CHECKLOCK_FILE. You can change this behavior by setting AUTO_CHECKLOCK to NO.

When enabled, the server will block all updates to the file without a write lock, returning an error 57. This allows you to debug situations where two processes might attempt to update the same record in an overlapping manner. This is primarily used in non-transaction files, as transaction-controlled files always require a write lock for updates. You can use the wildcard character "*" to specify multiple files.

The following FairCom Server configuration option enables ctCHECKLOCK mode for data files whose names match filespec:

CHECKLOCK_FILE +filespec

  • where filespec is the name of a file, which can include wildcards, as described in FairCom DB Standard Wildcards. filespec needs to match the actual file name including extension.

This option takes effect immediately: all currently open and subsequently opened or created data files whose name match filespec have ctCHECKLOCK enabled.

The following FairCom Server configuration option is used to undo the effect of the CHECKLOCK_FILE +filespec:

CHECKLOCK_FILE -filespec

This option disables the ctCHECKLOCK mode for data files whose name match filespec (which can include wildcards) and whose ctCHECKLOCK option was turned on by the ctCHECKLOCK +filespec.

This option takes effect immediately: all currently open data files whose names match filespec have ctCHECKLOCK disabled, and subsequently opened or created data files whose names match filespec will not have ctCHECKLOCK enabled (unless another CHECKLOCK option has been specified that matches the data file name, or the file mode at file open or create time specifies the ctCHECKLOCK mode).

This feature is also available at runtime via the ctSETCFG() API call.

Default: Off

 

COMPATIBILITY LKISAM_MODES

COMPATIBILITY LKISAM_MODES

LockISAM() will return BMOD_ERR if the lokmod parameter includes any modifier bits that are intended for FairCom use only.

In V11.0 and later, adding COMPATIBILITY LKISAM_MODES to the ctsrvr.cfg file will disable this.

Default: Off

Do not use this keyword unless instructed to by FairCom.

 

ITIM_RETRY_DEFER

ITIM_RETRY_DEFER <defer_time>

Introduces a delay before internally retrying an ISAM record read operation when an ITIM_ERR (160) is encountered. <defer_time> specifies the time in milliseconds for which the server sleeps a thread that encounters error ITIM_ERR during an ISAM record read operation before retrying the ISAM record read operation. As before, the maximum number of ITIM_ERR retries for a particular ISAM record read operation is determined by the ITIM_RETRY_LIMIT configuration option.

ITIM_RETRY_DEFER -1 disables the delay between ITIM_ERR retries.

Comments

If you frequently encounter ISAM record read operations failing with error ITIM_ERR, consider what the error code is revealing about your application’s design: if you properly use record locking, ITIM_ERR can still occur if many users are updating the same records in sequence (that is, each of a number of threads reads the record with a lock, updates the record--changing the key value--and unlocks the record). In this case, increasing the ITIM_RETRY_LIMIT and ITIM_RETRY_DEFER settings can help avoid the ITIM_ERR errors, however, this may be at the expense of application performance, by introducing additional retries and delays between retries. In such a situation, consider ways to change the application to reduce the number of users that are attempting to update the same records at the same time.

Default: -1

See Also

ITIM_RETRY_LIMIT

 

ITIM_RETRY_LIMIT

ITIM_RETRY_LIMIT <# of retries before returning ITIM_ERR>

In a multi-user environment, it is possible that an index may become out of sync with the data temporarily while another user is performing an update operation. Typically, error ITIM_ERR (160) is returned under these circumstances. It may be practical in some situations to retry the operation as the index is eventually updated. To accomplish this, the ITIM_ERR retry limit is configurable.

In addition, SNAPSHOT output now contains the value of the limit and the number of failed retry loops. Before this change, only the number of retries was reported by the SNAPSHOT.

Default: Typically 10 or 20

See Also

ITIM_RETRY_DEFER

 

DIAGNOSTICS DLOK_ERR

DIAGNOSTICS DLOK_ERR

Enables logging of DLOK_ERR (42) lock error information to CTSTATUS.FCS.

The log entry shows the filename, data record offset, and the lock owner.

Example output:

Mon Jun 05 15:18:42 2006

- User# 00012 DLOK_ERR: file=vcusti offset=0x0000-00002899 owner=11

 

DIAGNOSTICS LOCK_DUMP

DIAGNOSTICS LOCK_DUMP

Enable the use of the LockDump() function for non ADMIN users. The ADMIN user account can call the LockDump() function without this keyword enabled.

Default: Disabled

 

I/O Control

 
COMPATIBILITY DIRECT_IO

Reverts to the previous behavior of using direct I/O instead of O_DSYNC synchronous writes (or O_SYNC if O_DSYNC is not defined) for transaction logs on Solaris.

 
COMPATIBILITY FDATASYNC

For Unix systems, enables the optional use of fdatasync() instead of fsync().

 
COMPATIBILITY FORCE_WRITETHRU

Forces the automatic addition of the WRITETHRU mode to all files opened without the TRNLOG file mode.

 
COMPATIBILITY PREV610A_FLUSH

Provides a balance between update performance and recoverability of data in the event of an abnormal FairCom Server termination affecting non-transaction files.

 
COMPATIBILITY WTHRU_UPDFLG

Disables the ‘update’ flag on files with the WRITETHRU file mode.

 
DEFAULT_CHANNELS

Changes the number of I/O channels assigned to a file with ctDUPCHANEL in its file mode at open, unless the file is in the SET_FILE_CHANNELS list.

 
IDLE_NONTRANFLUSH and IDLE_TRANFLUSH

Deprecated: Sets the interval FairCom DB waits before checking to see if the server is idle before flushing data and index caches during idle time. These keywords have been replaced by the following:

 
IO_ERROR_BLOCK_RETRY

Specifies the maximum number of failed IO_ERROR_BLOCK_SIZE-sized I/O operations that must occur before the I/O operation is considered to have failed.

 
IO_ERROR_BLOCK_SIZE

Causes a read or write operation that fails with Windows system error 1450 (ERROR_NO_SYSTEM_RESOURCES) to be retried in blocks of the specified size.

 
IO_ERROR_BLOCK_SLEEP

Specifies a time in milliseconds between IO_ERROR_BLOCK_RETRY retry attempts.

 
SET_FILE_CHANNELS

Permits the number of I/O channels to be explicitly set for the named file regardless of whether the file mode, at open, includes ctDUPCHANEL.

 
UNBUFFERED_IO

Enables unbuffered I/O for the specified file on Windows systems.

 
Diagnostics

Diagnostics keywords are intended to be used to help collect data to be analyzed for troubleshooting. The use of these keywords should be avoided in normal operation as they may cause additional overhead (e.g., logging).

 
DIAGNOSTICS DIRECT_IO

Enables a check on each write operation for a file for which direct I/O is requested that the properties of the write operation meet the direct I/O requirements.

 
DIAGNOSTICS LOWL_FILE_IO (DIAGNOSTICS LOWL_FILE_IO, DIAGNOSTICS LOWL_FILE_IO)

Logs low-level system errors into the server status file, CTSTATUS.FCS.

 

COMPATIBILITY DIRECT_IO

COMPATIBILITY DIRECT_IO

The FairCom Server for Solaris uses O_DSYNC synchronous writes for the transaction logs when the COMPATIBILITY SYNC_LOG or COMPATIBILITY LOG_WRITETHRU configuration options are specified in the server configuration file.

Furthermore, it is expected the O_DSYNC writes are more efficient than O_SYNC writes. The FairCom Server uses O_DSYNC on systems that define this file open mode and uses O_SYNC on systems that do not define the O_DSYNC file open mode.

COMPATIBILITY DIRECT_IO, is available to revert to the previous behavior of direct I/O.

When the FairCom Server starts up, it writes either the message "Transaction logs using direct I/O." or "Transaction logs using synchronous I/O." to CTSTATUS.FCS to indicate which method of synchronous writes is in use. If neither COMPATIBILITY SYNC_LOG nor COMPATIBILITY LOG_WRITETHRU is specified in ctsrvr.cfg, neither of these messages is written to CTSTATUS.FCS as in that case the server performs asynchronous writes that are flushed by a separate call.

Default: OFF

Also See

COMPATIBILITY LOG_WRITETHRU

COMPATIBILITY SYNC_LOG

 

COMPATIBILITY FDATASYNC

COMPATIBILITY FDATASYNC

For Unix systems, enables the optional use of fdatasync() instead of fsync().

 

COMPATIBILITY FORCE_WRITETHRU

COMPATIBILITY FORCE_WRITETHRU

COMPATIBILITY FORCE_WRITETHRU enables the WRITETHRU filemode for all non-transaction files (including PREIMG files, which are transaction controlled but do not have a transaction log).

Default:

This option is off by default. Be sure to check your FairCom Server configuration file, as it might be enabled there.

Note: The performance impact of the WRITETHRU filemode depends on whether COMPATIBILITY PREV610A_FLUSH is enabled. See COMPATIBILITY PREV610A_FLUSH for details.

 

COMPATIBILITY PREV610A_FLUSH

COMPATIBILITY PREV610A_FLUSH

COMPATIBILITY PREV610A_FLUSH suppresses the flushing of updated file system cache pages to disk when a non-transaction WRITETHRU file is updated. See COMPATIBILITY FORCE_WRITETHRU.

Default:

This option is off by default. Be sure to check your FairCom Server configuration file, as it might be enabled there.

The performance impact of WRITETHRU depends on whether COMPATIBILITY PREV610A_FLUSH is enabled:

  • When COMPATIBILITY PREV610A_FLUSH is NOT enabled, each update to a non-transaction WRITETHRU file is flushed to disk. Both c-tree and operating system (OS) caches are flushed. This mode, while extremely safe, can significantly slow down performance of updates to non-transaction WRITETHRU files.
  • When COMPATIBILITY PREV610A_FLUSH is enabled, each update to a non-transaction WRITETHRU file is flushed to the OS file system cache, but the updated pages in the OS file system cache are not flushed at the time of the update. This mode performs much faster than when each update flushes the file system cache updates to disk, but note that the contents of updated file system cache pages can be lost if the system loses power before the operating system has written the updated file system cache pages to disk. Installing a power supply on the system can reduce the likelihood of losing data in the event that a system power loss occurs by permitting time for the operating system to write updated file system cache pages to disk.

 

COMPATIBILITY WTHRU_UPDFLG

COMPATIBILITY WTHRU_UPDFLG

Disables the ‘update’ flag on files with the WRITETHRU file mode. If COMPATIBILITY WTHRU_UPDFLG is not in its configuration file and if non-transaction files are opened without WRITETHRU in the file mode, a warning is issued in CTSTATUS.FCS concerning the vulnerability to FCRP_ERR (14).

Default: Not present

 

DEFAULT_CHANNELS

DEFAULT_CHANNELS <nbr of I/O channels>

DEFAULT_CHANNELS changes the number of I/O channels assigned to a file with ctDUPCHANEL in its file mode at open, unless the file is in the SET_FILE_CHANNELS list. The default number of channels is not limited by the NUMCHANEL value.

Note: Multiple I/O channels are disabled for newly created files. The multiple I/O channels take affect only on an open file call. Also, depending on the default number of I/O channels, a superfile host not in the SET_FILE_CHANNELS will use no more than 2 * NUMCHANEL I/O channels.

See Also

SET_FILE_CHANNELS

 

IDLE_NONTRANFLUSH and IDLE_TRANFLUSH

Note: As of FairCom DB V11, these keywords have been replaced by the following keywords:
TRAN_DATA_FLUSH_SEC
NONTRAN_DATA_FLUSH_SEC
TRAN_INDEX_FLUSH_SEC
NONTRAN_INDEX_FLUSH_SEC


IDLE_TRANFLUSH <idle check interval seconds>

IDLE_NONTRANFLUSH <idle check interval seconds>

FairCom DB flushes data and index caches during idle time, launching two idle thread processes at start-up: One thread flushes transaction-file buffers and the other flushes non-transaction-file buffers. The threads wake-up periodically and check if the FairCom Server is idle to begin flushing. Subsequent activity terminates the flushes. Low priority background threads, such as the delete node thread, do not affect the idle state, however, FairCom DB clients and transaction checkpoints modify the idle status.

Filesystem Flush Performance

Starting with V8 the default behavior of the idle flush threads was changed to skip internal filesystem flush calls for better performance when performing the idle flush operation. Flushing the filesystem buffers guarantees data is secured to disk at a performance cost. To revert this behavior, add the #SAVE option after the checkpoint time which will ensure data safety in nearly all cases. Note that flushing filesystem buffers will cause measurable delays when large caches are in use, and you may notice transaction slowdowns during this period.

IDLE_TRANFLUSH <idle check interval in seconds>#SAVE

IDLE_NONTRANFLUSH <idle check interval in seconds>#SAVE

The default interval is 15 seconds. Setting the interval to zero or a negative value disables the thread.

Default: 15 seconds

See Also

 

IO_BLOCK_SIZE

IO_BLOCK_SIZE <size>

Splits disk read and write operations larger than the specified size into individual operations of the specified size. For example, specifying IO_BLOCK_SIZE 16 KB causes a 1 MB write request to be performed as 64 16 KB write operations.

See Also

 

IO_ERROR_BLOCK_RETRY

IO_ERROR_BLOCK_RETRY <retries>

Specifies the maximum number of failed IO_ERROR_BLOCK_SIZE-sized I/O operations that must occur before the I/O operation is considered to have failed. If the IO_ERROR_BLOCK_SIZE-sized I/O operations that are being attempted for a particular I/O operation fail more than <retries> times, the FairCom Server writes a READ_ERR (36) or WRITE_ERR (37) message to CTSTATUS.FCS and considers the I/O operation to have failed.

A value of -1 signifies infinite retries. The default is 0, which means that the I/O operation is tried only once in IO_ERROR_BLOCK_SIZE-sized blocks, and if any of these I/O operations fails, the entire I/O operation is considered to have failed. As another example, if IO_ERROR_BLOCK_RETRY is set to 20 and IO_ERROR_BLOCK_SIZE is set to 65536, if a 327680-byte write is retried as 5 65536-byte write operations, then the I/O operation fails if there are 20 failures to perform those 5 write operations.

See Also

 

IO_ERROR_BLOCK_SIZE

IO_ERROR_BLOCK_SIZE <size>

When the Windows kernel has allocated all of its paged-pool memory, it will not be able to perform many tasks and instead returns a STATUS_INSUFFICIENT_RESOURCES (0xC000009A) message. This is a restriction of 32-bit addressing (only 2GB addressable within the kernel), regardless of the amount of memory available in the system.

When the FairCom Server configuration option IO_ERROR_BLOCK_SIZE option is specified in the FairCom Server configuration file, a read or write operation that fails with Windows system error 1450 (ERROR_NO_SYSTEM_RESOURCES) is retried in blocks of the specified size. If any one of those read or write operations fails, the FairCom Server fails the read or write operation.

See Also

 

IO_ERROR_BLOCK_SLEEP

IO_ERROR_BLOCK_SLEEP <time>

Specifies a time in milliseconds between IO_ERROR_BLOCK_RETRY retry attempts. The default is zero, which means that retries are attempted immediately.

See Also

 

NONTRAN_DATA_FLUSH_SEC

NONTRAN_DATA_FLUSH_SEC <time_limit_in_seconds>

Sets the time limit in seconds that a data cache page can remain dirty before it is written to the file system cache.

  • Specify IMMEDIATE to cause dirty pages to be written immediately.
  • Specify OFF to disable time limit-based flushing.

Default: IMMEDIATE

See Also

 

NONTRAN_INDEX_FLUSH_SEC

NONTRAN_INDEX_FLUSH_SEC <time_limit_in_seconds>

Sets the time limit in seconds that an index buffer can remain dirty before it is written to the file system cache.

  • Specify IMMEDIATE to cause dirty pages to be written immediately.
  • Specify OFF to disable time limit-based flushing.

Default: IMMEDIATE

See Also

 

OPEN_FILES_ALERT_THRESHOLD

OPEN_FILES_ALERT_THRESHOLD <files>

Default: 0

FairCom Server now supports logging a diagnostic message to CTSTATUS.FCS whenever its total number of open files exceeds the specified threshold.

<files> is the number of open files at which FairCom Server should start logging messages to CTSTATUS.FCS. This option defaults to zero (no logging).

Once the limit is reached, a message is logged each time the current number of open files exceeds the previous high water mark. So for example, in the following situation:

OPEN_FILES_ALERT_THRESHOLD 100

Current open files = 99

1. Open a file: current open files = 100: message logged

2. Open a file: current open files = 101: message logged

3. Open a file: current open files = 102: message logged

4. Close a file: current open files = 101

5. Open a file: current open files = 102: no message logged because already logged 102

This option can be changed at runtime via ctadmn.

 

OPTIMIZE_FILE_OPEN

OPTIMIZE_FILE_OPEN YES | NO

Default: YES

Enables file open optimizations for improved performance and scalability. Currently the options can only be set in the configuration file. They cannot be changed at run time.

The following messages in CTSTATUS.FCS indicate that these optimizations are on:

File open optimization is enabled.

The following messages in CTSTATUS.FCS indicate that these optimizations are off:

File open optimization is off.

See Also

OPTIMIZE_FILE_CLOSE

PENDING_FILE_OPEN_RETRY_LIMIT

SYSTEM_FILE_ID_LIST

DIAGNOSTICS SYSTEM_FILE_ID_LIST

 

OPTIMIZE_FILE_CLOSE

OPTIMIZE_FILE_CLOSE YES | NO

Default: YES

Enables file close optimizations for improved performance and scalability. Currently the options can only be set in the configuration file. They cannot be changed at run time.

The following messages in CTSTATUS.FCS indicate that these optimizations are on:

File close optimization is enabled.

The following messages in CTSTATUS.FCS indicate that these optimizations are off:

File close optimization is off.

See Also

PENDING_FILE_OPEN_RETRY_LIMIT

OPTIMIZE_FILE_OPEN

SYSTEM_FILE_ID_LIST

DIAGNOSTICS SYSTEM_FILE_ID_LIST

 

PENDING_FILE_OPEN_RETRY_LIMIT

PENDING_FILE_OPEN_RETRY_LIMIT <limit>

Default: 0 (wait forever) (before V12, 100000)

Sets the pending open retry limit. Normally, it is not expected a file open or create to exceed the pending file open retry limit, but this limit is provided to ensure the calling function returns an error after a limited number of retries in the unexpected case that a file remains in a pending open state for a long period of time.

It is possible to change the PENDING_FILE_OPEN_RETRY_LIMIT server setting at runtime in the usual ways (ctadmn and the ctSETCFG() API function).

See Also

OPTIMIZE_FILE_OPEN

OPTIMIZE_FILE_CLOSE

SYSTEM_FILE_ID_LIST

DIAGNOSTICS SYSTEM_FILE_ID_LIST

 

SET_FILE_CHANNELS

SET_FILE_CHANNELS <file name>#<nbr of I/O channels>

Without this feature, the ctDUPCHANEL file mode bit enables a file to use NUMCHANEL simultaneous I/O channels, where NUMCHANEL is set at compile time, and is by default, set to two (2). For superfile hosts with ctDUPCHANEL, 2* NUMCHANEL I/O channels are established. The default is not to turn on ctFeatCHANNELS.

SET_FILE_CHANNELS permits the number of I/O channels to be explicitly set for the named file regardless of whether the file mode, at open, includes ctDUPCHANEL. A value of one (1) for the number of I/O channels effectively disables ctDUPCHANEL for the file. A value greater than one (1) turns on DUPCHANEL and determines the number of I/O channels used. The number of I/O channels is not limited by the compile-time NUMCHANEL value. You may have as many SET_FILE_CHANNELS entries as needed.

The <file name> can be a wildcard specification using a ‘?’ for a single character and a ‘*’ for zero or more characters. See FairCom DB Standard Wildcards.

Note: Multiple I/O channels are disabled for newly created files. The multiple I/O channels take affect only on an open file call. Also, depending on the default number of I/O channels, a superfile host not in the SET_FILE_CHANNELS will use no more than 2 * NUMCHANEL I/O channels.

See Also

DEFAULT_CHANNELS

 

SYSTEM_FILE_ID_LIST

SYSTEM_FILE_ID_LIST YES | NO

Default: YES

Enables the system file ID list, which is used to detect files being opened using different aliases. It can be turned on or off at runtime when the server is in a quiesced state.

See Also

OPTIMIZE_FILE_OPEN

OPTIMIZE_FILE_CLOSE

PENDING_FILE_OPEN_RETRY_LIMIT

DIAGNOSTICS SYSTEM_FILE_ID_LIST

 

DIAGNOSTICS SYSTEM_FILE_ID_LIST

DIAGNOSTICS SYSTEM_FILE_ID_LIST

Enables logging of adds/deletes to the system file ID list to the file SYSIDHASH.FCS in the server's LOCAL_DIRECTORY directory. Can be turned on or off at runtime.

See Also

OPTIMIZE_FILE_OPEN

OPTIMIZE_FILE_CLOSE

PENDING_FILE_OPEN_RETRY_LIMIT

SYSTEM_FILE_ID_LIST

 

TRAN_DATA_FLUSH_SEC

TRAN_DATA_FLUSH_SEC <time_limit_in_seconds>

Sets the time limit in seconds that a data cache page can remain dirty before it is written to the file system cache.

  • Specify IMMEDIATE to cause dirty pages to be written immediately.
  • Specify OFF or -1 to disable the time limit-based flushing.
  • In V11.4 and later, a rate limiting parameter can be specified as follows: "rate=<msec> / <number of flushes>"
    For example, to defer for 1 millisecond after every two flushes of updated TRNLOG data cache pages, use this option:
    TRAN_DATA_FLUSH_SEC rate=1/2

System snapshot 19 and later includes fields referencing background flush state structure, BGFLSS, which is in the system snapshot structure, ctGSMS. When a background flush thread is set to flush at a particular rate, the text snapshot shows the rate. For example:

time limit for dirty non-transaction data pages : rate=1/1

This option can be changed using the ctSETCFG() API function or the ctadmn utility.

Note: Enabling this option disables checkpoint flush operations.

Default: -1 (disabled)

See Also

CHECKPOINT_FLUSH

TRAN_INDEX_FLUSH_SEC

NONTRAN_DATA_FLUSH_SEC

NONTRAN_INDEX_FLUSH_SEC

 

TRAN_INDEX_FLUSH_SEC

TRAN_INDEX_FLUSH_SEC <time_limit_in_seconds>

Sets the time limit in seconds that an index buffer can remain dirty before it is written to the file system cache.

Also, attempts to do routine optimization of index nodes as they are flushed to disk by background index flush. This is intended to improve overall index lookup performance and distinct key estimate accuracy.

  • Specify IMMEDIATE to cause dirty pages to be written immediately.
  • Specify OFF or -1 to disable the time limit-based flushing.
  • In V11.4 and later, a rate limiting parameter can be specified as follows: "rate=<msec> / <number of flushes>"
    For example, to defer for 1 millisecond after every two flushes of updated TRNLOG data cache pages, use this option:
    TRAN_DATA_FLUSH_SEC rate=1/2

System snapshot 19 and later includes fields referencing background flush state structure, BGFLSS, which is in the system snapshot structure, ctGSMS. When a background flush thread is set to flush at a particular rate, the text snapshot shows the rate. For example:

time limit for dirty non-transaction data pages : rate=1/1

This option can be changed using the ctSETCFG() API function or the ctadmn utility.

Note: Enabling this option disables checkpoint flush operations.

Default: -1 (disabled)

See Also

CHECKPOINT_FLUSH

COMPATIBILITY DISABLE_BACKGROUND_CLEANUP

TRAN_INDEX_FLUSH_SEC

NONTRAN_DATA_FLUSH_SEC

NONTRAN_INDEX_FLUSH_SEC

 

UNBUFFERED_IO

UNBUFFERED_IO <filename>

FairCom Server supports the use of unbuffered disk I/O operations on a per-file basis. Unbuffered I/O bypasses the file system cache and avoids double caching of data in the FairCom Server and the file system cache. The file name may include wildcard characters (see FairCom DB Standard Wildcards)

The UNBUFFERED_IO configuration option enables unbuffered I/O for the specified file. When the file is opened, the sector size of the disk on which the file resides is determined and it stores that sector size in the new file control block member.

Windows enforces the following restrictions for I/O when using unbuffered I/O:

  1. The file offset for the I/O operation must be a multiple of the disk sector size.
  2. The amount of data to be read or written must be a multiple of the disk sector size.
  3. The address of the buffer used in the I/O operation must be aligned on a disk sector size boundary.

For files that use unbuffered I/O, c-tree's file I/O function checks that these requirements are met. If not, logic is in place that makes the necessary adjustment by allocating a temporary buffer that is used in the I/O operation.

When a file is configured to use unbuffered I/O, the sector size of the disk on which the file is stored is checked and if it exceeds the server's page size. If so, the following message is logged to CTSTATUS.FCS and unbuffered I/O is not used on that file:

If an existing file is being opened:

mbopen: File <filename> disk sector size (<disk_sector_size>) exceeds page size (<page_size>)

If a new file is being created:

mbcratx: File <filename> disk sector size (<disk_sector_size>) exceeds page size (<page_size>)

Note: Unbuffered I/O is not available for encrypted or segmented files and is ignored for those file types.

UNBUFFERED_IO completely avoids the file system cache. Compare to COMPATIBILITY TDATA_WRITETHRU, which uses the file system cache and then to disk before returning.

OS Support

This option is supported on the Windows operating system.

In V11 and later, support for direct I/O has been enabled on Linux systems. A value of 512-bytes is used for size and alignment for direct I/O.

This feature supports both c-tree data and index files, as well as transaction logs. Configuration options are provided for both.

  • UNBUFFERED_IO filename (enables direct I/O for the specified file; the filename can include wildcards, such as *.dat)
  • UNBUFFERED_LOG_IO YES (enables direct I/O for the transaction logs).

Note: This feature requires Linux kernel version 2.6 or later, FairCom Server logs an error message to CTSTATUS.FCS if these options are used on pre-2.6 Linux kernel systems. The error messages are:

The UNBUFFERED_IO option requires Linux kernel version 2.6 or later

The UNBUFFERED_LOG_IO option requires Linux kernel version 2.6 or later

See Also

 

DIAGNOSTICS DIRECT_IO

DIAGNOSTICS DIRECT_IO

Enables a check on each write operation for a file for which direct I/O is requested that the properties of the write operation meet the direct I/O requirements. If not, the server logs one of the following messages to the server status log:

directIOdiag: Buffer address (<address>) not properly aligned for direct I/O...

directIOdiag: Write length (<length>) not properly sized for direct I/O...

directIOdiag: File offset (<offset>) not properly aligned for direct I/O...

 

DIAGNOSTICS LOWL_FILE_IO

DIAGNOSTICS LOWL_FILE_IO

The DIAGNOSTICS LOWL_FILE_IO server keyword logs low-level system errors into the server status file, CTSTATUS.FCS. Although client applications have access to system errors through sysiocod, it is useful to see these errors logged on the server side. Activating this feature causes a high decrease in performance.

This feature is also available at run time via the ctSETCFG() API call and passing in (setcfgDIAGNOSTICS, "LOWL_FILE_IO")

From the FairCom Server administrator utility, ctadmn, choose option 10, "Change Server Settings" and then option 9, "Change a DIAGNOSTICS option". Then enter LOWL_FILE_IO to enable. Precede with a '~' character to disable.

Default: Disabled

 

Logging and Monitoring

 
CHECKPOINT_MONITOR

Determines if each occurrence of an internal FairCom Server checkpoint will cause a time stamp message to be sent to the FairCom Server console screen and to the CTSTATUS.FCS file.

 
CTSTATUS_MASK (CTSTATUS_MASK, CTSTATUS_MASK)

Allows certain types of entries in CTSTATUS.FCS to be suppressed.

 
CTSTATUS_SIZE

Controls the size of the FairCom Server status file.

 
DISK_FULL_ACTION

Enables FairCom DB to monitor available disk space and to shut down the database engine when the disk space falls below the specified limit.

 
DISK_FULL_LIMIT

Activates a disk space threshold mechanism to detect when a disk volume is getting full (the specified number of bytes must remain available on a disk volume after a file has been extended).

 
DISK_FULL_VOLUME

Allows volume-specific disk full checks.

 
FUNCTION_MONITOR

Causes the client number, function number, function name, and file name are displayed in a scrolling fashion on the FairCom Server console screen.

 
HEAP_DEBUG_LEVEL

Enables additional tracking and checking of internal memory suballocations - Consult with FairCom support team as this option can significantly impact performance in certain use cases.

 
LOCK_MONITOR

Deprecated: Monitors the number of active record locks.

 
MEMORY_MONITOR

Sends a message to the console whenever allocated memory exceeds the next memory threshold.

 
MEMORY_TRACK

Sends debug output to the console every time the net memory allocation count changes by a multiple of the threshold value.

 
MONITOR_MASK

Suppress the message sent to the system console if a file without a matching name does match the unique file ID when a file open is attempted.

 
PERF_MONITOR

Allows entries to be placed on a queue for client side processing and monitoring of server events.

 
REQUEST_TIME_MONITOR

Specifies a request time in seconds for monitoring function that exceed the specified time.

 
SNAPSHOT_FILENAME

Captures user information pertaining the to file specified to SNAPSHOT.FCS in addition to the system snapshot.

 
SNAPSHOT_INTERVAL

Enables automatic snapshots at specified intervals.

 
SNAPSHOT_LOCKWAIT_USEC

Changes the default histogram intervals (box width) for the lock waiting time histograms.

 

SNAPSHOT_LOGFLUSHTIME_USEC

Controls the width of the fixed transaction log flush time histogram, and the initial width of the adaptive transaction log flush time histogram.

 
SNAPSHOT_TRANTIME_USEC

Changes the default histogram intervals (box width) for the transaction time histogram.

 
SNAPSHOT_USERID

Captures user information to SNAPSHOT.FCS in addition to the system snapshot.

 
SYSLOG (SYSLOG, SYSLOG)

Specifies a keyword indicating contents to be stored in the System Event Log.

 
SYSVIEW_WHAT

Enables system status reports triggered by the specified event.

 
SYSVIEW_WHEN

Enables system status reports triggered by the specified event.

 
Diagnostics

Diagnostics keywords are intended to be used to help collect data to be analyzed for troubleshooting. The use of these keywords should be avoided in normal operation as they may cause additional overhead (e.g., logging).

 
DEADLOCK_MONITOR

Causes a time stamp message goes to the FairCom Server console screen each time the FairCom Server detects and resolves a dead lock.

 
DIAGNOSTICS SNAPSHOT_AUTOMATIC

Write system snapshots to the human-readable SNAPSHOT.FCS text file.

 
DIAGNOSTICS SNAPSHOT_IOTIME

Enables collecting disk read and write timings on a per-file basis when high-resolution timer support is activated.

 
DIAGNOSTICS SNAPSHOT_SHUTDOWN

Write system snapshots to the human-readable SNAPSHOT.FCS text file.

 
DIAGNOSTICS SNAPSHOT_WORKTIME

Enables collecting FairCom DB function call counts and timings on a per-c-tree file basis.

 

CHECKPOINT_MONITOR

CHECKPOINT_MONITOR <YES | NO | DETAIL>

This keyword takes one of three arguments: YES, NO, and DETAIL. If YES, each occurrence of an internal FairCom DB Server checkpoint will cause a time stamp message to be sent to the FairCom DB Server console screen and to the CTSTATUS.FCS file. The checkpoint is a snapshot of the FairCom DB Server at an instance in time and is used during automatic recovery. The checkpoint provides for a measure of the system activity. The DETAIL argument causes six intermediate milestones to be output for each checkpoint in addition to the beginning and ending checkpoint messages. These intermediate outputs aid in analyzing how the checkpoint procedure interacts with applications. If there is no system activity, no checkpoints will occur. This keyword should be used for debugging purposes only since performance may be compromised.

Default: NO

 

CTSTATUS_MASK

CTSTATUS_MASK <mask>

Allows certain types of entries in CTSTATUS.FCS to be suppressed.

Accepted <mask> values

DYNAMIC_DUMP_FILES

Suppress the logging of the names of the files backed up by a dynamic dump operation.

MATCH_FILE_ID

Suppresses "Matching file Ids" messages. Such messages can be output several situations:

  • If the files share the same FairCom 12-byte file ID, but are different files in which case an open error should result.
  • If the files are the same file, but have been opened with different names (or paths).
  • When the file ID is reassigned because the ID was changed, for example, the file is a copy of an original file.

PRIME_CACHE_AT_STARTUP

Suppress log messages while cache priming is enabled.

WARNING_AUTO_TRNLOG

Suppresses the logging of the message:

"WARNING: could not turn on AUTO_PREIMG/AUTO_TRNLOG for ... (filename)"

when the AUTO_PREIMG or AUTO_TRNLOG configuration option matches the name of a c-tree index file that was not created with support for transaction control.

WARNING_FCRP_ERR

Eliminates FCRPT_ERR (14) errors in CTSTATUS.FCS.

WARNING_PAGESIZE

Disables logging PAGE_SIZE warning messages to CTSTATUS.FCS,

WARNING_PAGESIZE_SEEALL

Logs all PAGE_SIZE warnings to CTSTATUS.FCS for debugging.

WRITE_ERR

Suppresses WRITE_ERR messages.

See DIAGNOSTICS WRITE_ERR_DUMP

VDP_ERROR

Suppresses logging of communications errors.

Default: Log all messages.

 

CTSTATUS_SIZE

CTSTATUS_SIZE <file_size | negative_file_size | 0>

CTSTATUS_SIZE controls the size of the FairCom DB Server status file. The argument to CTSTATUS_SIZE is the approximate maximum size in bytes for CTSTATUS.FCS. When this limit is reached, CTSTATUS.FCS is renamed to T0000001.FCS and a new status file is created. The T#.FCS file numbers increase each time the limit is reached, similar to the transaction log files, i.e., the next time the maximum size is reached, CTSTATUS.FCS is renamed to T0000002.FCS.

To limit the number of archived status logs, set a negative value for CTSTATUS_SIZE. Only T0000001.FCS will be kept, being replaced each time CTSTATUS.FCS is archived.

A value of 0 allows the file to expand to a size limited by the operating system and storage availability.

Default: -32000000

 

DBENGINE_CHECK

In V11 and later, this Replication Agent configuration keyword enables monitoring of changes to the FairCom DB "engine":

DBENGINE_CHECK = 1

Enables tracking changes to the ctsrvr.cfg, CTSTATUS.FCS, *.lib, and *.dll.

Schedules a future action for double checking the FairCom DB API Engine changes. It is scheduled with a delay of 5 seconds by default, and all the pending checks for a given c-tree installation are grouped to avoid several re-checks. The action execution is able to change an existing installation, add a new one, or delete an old one.

 

DEADLOCK_MONITOR

DEADLOCK_MONITOR <YES | NO>

If YES, each time the FairCom DB Server detects and resolves a dead lock situation, a time stamp message goes to the FairCom DB Server console screen.

Note: This keyword is used primarily for debugging since this feature consumes additional overhead.

Default: NO

 

DISK_FULL_ACTION (Original)

DISK_FULL_ACTION <action> <volume> <limit>

Enables FairCom DB to monitor available disk space and to shut down the database engine when the disk space falls below the specified limit.

This configuration option can include an environment variable name that will be substituted with its value when the configuration file is read.

You can include more than one DISK_FULL_ACTION in a server configuration.

Scriptable actions are supported. See DISK_FULL_ACTION Script (DISK_FULL_ACTION (SUBSYSTEM), DISK_FULL_ACTION (SUBSYSTEM)).

This keyword can be specified multiple times.

This keyword is independent of the DISK_FULL_LIMIT and DISK_FULL_VOLUME keywords.

Windows Examples

DISK_FULL_ACTION shutdown D:\ 500 MB

DISK_FULL_ACTION shutdown "C:\Users\Administrator\My Documents" 1 GB

Unix Examples

DISK_FULL_ACTION shutdown /users/administrator 500 MB

DISK_FULL_ACTION shutdown "/users/administrator/my documents" 1 GB

Messages

The following messages appear in CTSTATUS.FCS when this option is used:

FairCom DB logs a message for each DISK_FULL_ACTION option it finds in ctsrvr.cfg:

- User# 00001 Configuration info : DISK_FULL_ACTION threshold set for volume S:\ to 7516192768 bytes

FairCom DB logs a message to indicate that the available disk space monitoring thread has started:

- User# 00009 Thread Start: ctDISKFULLactionthrd

FairCom DB logs a message when it detects disk space below the specified threshold which causes the database engine to shut down:

- User# 00009 DISK_FULL_ACTION: Space on volume S:\ is 5338173440, which is below threshold of 7516192768. Initiating database engine shutdown.

See Also

 

DISK_FULL_ACTION (SUBSYSTEM)

FairCom Server supports a configuration option to call an external script when a specified DISK_FULL_LIMIT or DISK_FULL_VOLUME limit is reached. This allows server administrator to configure an external process to run when a disk-full limit is reached, for example, the process could write information to a log or notify the administrator.

To configure an external process to run when the space on the specified volume is below the specified limit, set the DISK_FULL_ACTION configuration option in ctsrvr.cfg with the run action.

The supported syntax is:

SUBSYSTEM EVENT DISK_FULL_ACTION {

volume VOLUME

limit LIMIT

run EXE [OPTIONS]

freq FREQUENCY

maxruntime MAXRUNTIME

}

The volume, limit, and run parameters are required. The freq and maxruntime are optional.

  • VOLUME is the name of the disk volume to check: a drive name (for example, C:\) on Windows systems, or a directory name (for example, /users/faircom/data) on Unix/Linux systems.
  • LIMIT is the threshold of available space that triggers the running of the script. The KB, MB, GB, TB, and PB suffixes can be used for this value (for example: "limit 100 GB" means 100 gigabytes).
  • EXE is the name of an executable, batch file, or Unix shell script to run, and OPTIONS are optional command-line options to pass to the external program.
  • FREQUENCY indicates the frequency at which this condition is checked. The default is to check the condition every 60 seconds. Minimum frequency is 1; maximum frequency is 32,000,000.
  • MAXRUNTIME indicates the maximum amount of time, in seconds, that the external script is permitted to run. If the external script has not terminated after the specified amount of time, the server terminates the script. The default is 60 seconds. A setting of 0 means the script will never be forced to terminate.

Note: When setting a MAXRUNTIME value, consider that no other DISK_FULL_ACTION checks will take place until the script completes, regardless of the FREQ setting. This is of particular importance if more than one DISK_FULL_ACTION is created.

 

In V12 and later, disk full monitoring keywords have been added to the default ctsrvr.cfg. These keywords are present in this config file, but they have been commented out for so they are there if you need them, but they are NOT enabled.

 

; SUBSYSTEM EVENT DISK_FULL_ACTION {

volume VOLUME

limit LIMIT

run EXE [OPTIONS]

freq FREQUENCY

maxruntime MAXRUNTIME

}

 

Example DISK_FULL_ACTION with external process action

The following configuration option causes the batch file diskfull.bat to be run when writing to a c-tree data or index file detects that the space on C:\ has dropped below 1 GB. This disk-full condition is checked once every 60 seconds.

SUBSYSTEM EVENT DISK_FULL_ACTION {

volume C:\

limit 1 GB

run diskfull.bat

freq 60

maxruntime 120

}

Reading parameters sent from the server to the external process

FairCom Server passes a set of ASCII key/value pairs to the external process using standard input, where the input format is key=value, one per line. The keys that FairCom Server passes to the external process are:

  • volume - The VOLUME setting from the DISK_FULL_ACTION configuration option.
  • limit - The disk-full limit in bytes that was specified for that volume.
  • available - The amount of disk space in bytes that is currently available on that volume.

Writing parameters from the external process to the server

The external process can optionally pass ASCII key/value pairs back to the server by writing them to standard output in the format key=value, one entry per line. FairCom Server recognizes the following keys:

  • action=continue - (indicating to continue FairCom Server operation; this is the default)

or

  • action=shutdown - (indicating to shut down FairCom Server)
  • comments=MESSAGE - A user-defined message that will be written to CTSTATUS.FCS.

Note: FairCom Server reads only the first 1024 bytes of the output data returned by the script. All data after the first 1024 bytes of output data is ignored.

If the external script's output is not in the supported format, a message is written to CTSTATUS.FCS. Example:

DISK_FULL_ACTION: Command diskfull.bat output does not match format var=value: line 3 column 8

 

 

Unlimited MAXRUNTIME script

An unlimited script runtime can be set with MAXRUNTIME 0. When configured as unlimited and a script is run due to the LIMIT and RUN options, the script will never be forced to terminate.

Note: When setting a MAXRUNTIME value, consider that no other DISK_FULL_ACTION checks will take place until the script completes, regardless of the FREQ setting. This is of particular importance if more than one DISK_FULL_ACTION is created.

 

DISK_FULL_LIMIT

DISK_FULL_LIMIT <bytes available>

FairCom DB Servers for Unix and Windows support the DISK_FULL_LIMIT keyword, which activates a disk space threshold mechanism to detect when a disk volume is getting full. The DISK_FULL_LIMIT configuration keyword takes as its argument the number of bytes that must remain available on a disk volume after a file has been extended. If the update operation fails, a message is written in CTSTATUS.FCS naming the file involved.

FairCom DB Servers that do not support this feature ignore the DISK_FULL_LIMIT keyword.

Note: When the disk is full, the FairCom DB files cannot be extended. The FairCom DB operations that attempt to add or update data in a file and require the files to be extended will fail with specific errors. This diagnostic keyword is used to put supplemental information in the status file and alert the user.

Default: No disk full check

See Also

DISK_FULL_VOLUME

DISK_FULL_VOLUME /path

Allows volume-specific disk full checks. DISK_FULL_VOLUME takes as its argument a concatenated volume name and limit. A path separator must occur between the volume name and the threshold limit, which may be zero.

In Unix this is in the form /name/<limit>. The following example places a disk full threshold of one million bytes on the volume /home:

DISK_FULL_VOLUME /home/1000000

For Windows, the form of the argument is <DRIVE>:\<limit>. The following example places a 1MB threshold on drive E:

DISK_FULL_VOLUME e:\1048576

Note: When the disk is full the FairCom DB files cannot be extended. The c-tree operations that attempt to add or update data in a file and require the files to be extended will fail with specific errors. This diagnostic keyword is used to put supplemental information in the status file and alert the user.

Default: Off

See Also

FUNCTION_MONITOR

FUNCTION_MONITOR <YES | NO | file_name>

If YES, the client number, function number, function name, and file name are displayed in a scrolling fashion on the FairCom DB Server console screen. Alternatively, the same information, along with the return value and error codes for each function, can be routed to a file by specifying a file name. This keyword should be used primarily for debugging since this feature consumes additional overhead.

Note: Activate the function monitor dynamically under the FairCom DB Server for Windows by selecting View > Function Monitor Window.

Default: NO

Notes:

FUNCTION_MONITOR can be enabled without restarting the server using the ctadmn command-line tool as follows:

  1. Start the ctadmn tool and connect to the server.
  2. Select the following from the menu:

10 "Change Server Settings"

  1. Select the following from the next menu:

1 "Configure function monitor"

  1. Enter fmon.log at the prompt:

Enter the new function monitor value.
Allowed values are: YES or NO or filename

Function monitor information will be written to the FairCom DB process working directory in a text file named fmon.log.

When you are done, be sure to shut off function monitoring: Repeat the steps above, but disable function monitoring by entering NO in the final step.

 

 

 

HEAP_DEBUG_LEVEL

FairCom Database Engine heavily utilizes memory operations to optimize performance. To avoid frequent OS memory requests, it maintains a sophisticated memory suballocator. This internal subsystem allocates larger blocks of memory from the O/S and sub allocates them as needed. All memory gets and puts from this suballocator system are tagged, tracked and checked. On rare occasions, heap memory corruption can occur resulting in an eventual illegal memory access attempt, ultimately terminating FairCom DB operations. Debugging these conditions is extremely complex. FairCom DB V12 and FairCom RTG V3 enhance memory diagnostics when required.

Debugging options can now be enabled when corrupted memory is suspected triggering additional tracking and checking of internal memory suballocations. Use of these options should only be considered in consultation with your FairCom support team as these can significantly impact performance in certain use cases.

HEAP_DEBUG_LEVEL <level> with values 0-3 (Default 0):

  • HEAP_DEBUG_LEVEL 0 uses the default memory allocator; no checks are performed.
  • HEAP_DEBUG_LEVEL 1 enables the debug allocator, with some detection for memory buffer write overruns or use-after-free bugs. There is no additional memory overhead, and the CPU overhead is small.
  • HEAP_DEBUG_LEVEL 2 does the checks from HEAP_DEBUG_LEVEL 1 and adds a small redzone before/after each allocation, which is checked at free. This may detect some buffer write overruns, write underruns, or double frees. This option uses an additional 16 bytes of memory on each allocation.

Levels 1 and 2 generate a CTSTATUS entry and stack trace at free when a memory fault is detected.

  • HEAP_DEBUG_LEVEL 3 uses the system's virtual memory subsystem to immediately detect illegal memory overruns (both reads and writes) by aligning allocations at the end of a 4K page. The following types of errors may immediately generate a segmentation fault (core dump) on the invalid access: memory read/write overrun, double free, and use-after-free.

Memory write underruns or some small write overruns may instead be detected at free and generate a CTSTATUS message and stack trace.

Memory allocation failures are logged to CTSTATUS logging when HEAP_DEBUG_LEVEL 3 is enabled.

Because Level 3 debugging uses an extra 4K-8K bytes for all allocations, it is possible to restrict this to particular size(s) of allocations using HEAP_DEBUG_EXCLUSION_LIST <N>.

Be sure to see the Performance Note below.

HEAP_DEBUG_EXCLUSION_LIST <N> [,<N> ...] - When HEAP_DEBUG_LEVEL 3 (only) is specified, it is possible to have particular allocation sizes use the default (non-debug) allocator to reduce the overall memory overhead of this debugging method. By default, HEAP_DEBUG_LEVEL applies to all allocation sizes. The particular values to specify would typically be recommended by FairCom support based on analysis of prior core dumps.

 

HEAP_DEBUG_EXCLUSION_LIST # allocation size range (in bytes):

# Bytes

1 <=16

2 17-32

3 33-64

4 65-128

5 129-256

6 257-512

7 513-1024

8 1025-2048

9 2049-4096

10 4097-8192

Limitations: When Level 3 debugging is enabled, memory usage statistics are not tracked for those bins.

Performance Note

HEAP_DEBUG_LEVEL 3 has a negative impact on performance on any machines with 4 or more CPU cores. FairCom does not recommend the use of Level 3 on any machines with 4 or more CPU cores where performance is important.

If performance is an issue, FairCom recommends using the Level 2 version of heap debug on any location where you've seen a memory-related crash occur and where performance is important. Our testing has not revealed a noticeable performance impact with Level 2, even on a large test box with 72 cores.

Note 1:

If allocation stack traces are enabled (such as with ctstat -mt +ALL), an additional stack is dumped showing the allocation location of the buffer.

A use-after-free might cause a segmentation fault (core dump).

Note 2:

HEAP_DEBUG_LEVEL 2 has a benefit to stability: If the buffer overrun is 8 bytes or less, the heap will NOT be corrupted because only the extra redzone memory is modified. The server will stay up and only a stack trace will be generated.

Linux

On Linux, the HEAP_DEBUG_LEVEL 3 configuration option requires raising the kernel limit vm.max_map_count to be twice the number of allocations. FairCom can help you to determine the minimum value to set the Linux kernel parameter, vm.max_map_count. (This value will generally rise and fall with the amount of server activity, so include a safety factor based on how much busier it might be.) Setting vm.max_map_count too small will result in allocation failures if the number of allocations exceeds that limit, which could lead to a server crash.

This can be changed until next system reboot with the command:

sysctl -w vm.max_map_count=<N>

Example using HEAP_DEBUG_LEVEL 3 restricted to sublist #2:

Look at current memory usage at a busy server time using this command:

ctstat -ml -u admin -p ADMIN_PASSWD -s FAIRCOMS

The output will show sublist #2 as "PI2TYP." The next column shows the total allocations in bytes.

PI2TYP 98304 7400 0.01%

Divide the first column by 32 (the max size of this allocation range) to get the number of current allocations on this sublist: 98304/32=3072, and then double that: 6144.

You also need to include the MBATYP:

MBATYP 73388776- 73388776-

Divide the first column by 8192 (this would be the worst case assumption for this list), and double the result:

73388776/8192 * 2 = 17916

The sum of these values is 2x the allocation count: 17916+6144 = 24060. Apply a safety multiplier such as x10.

This is the minimum value you need to set as the Linux kernel parameter:

vm.max_map_count

This value will generally rise and fall with the amount of server activity, so include a safety factor based on how much busier it may become. Setting vm.max_map_count too small will result in allocation failures if the number of allocations exceeds that limit, which could lead to a server crash.

After setting the kernel value (Linux only) with vm.max_map_count, add the following server keywords to enable the debug suballocator on sublist #2 (PI2TYP) only:

 

HEAP_DEBUG_LEVEL 3

HEAP_DEBUG_EXCLUSION_LIST 1,3,4,5,6,7,8,9,10

 

 

Stack Dump Message

When a Stack Dump is generated, the following message will be logged to CTSTATUS.FCS.

"A Heap Fault was detected and stack dump created"

If you have this logic enabled, FairCom recommends routine reviews of CTSTATUS.FCS to determine if a Stack Dump has been created. If you see this message, please send the Stack Dump, and the CTSTATUS.FCS message to FairCom Support for inspection.

 

LOCK_MONITOR

Deprecated. See the notes below for other monitoring tools.

LOCK_MONITOR <threshold value>

Monitors the number of active record locks. This keyword, or the SetOperationState() function call, enables a lock monitor that indicates when the number of lock calls over unlocks equals a multiple of the threshold value, or if it goes below a threshold.

For example, LOCK_MONITOR 100 sends a message to the console each time the number of lock calls over unlocks equals a multiple of 100. Likewise, if the number of unbalanced lock calls falls below these thresholds, a message goes to the console. Ordinarily, when the number of locks are in balance (i.e., excess locks over unlocks equals zero) no message is routed to the console unless a message indicating an excess of locks has already been sent to the console. If you wish the message to be sent whenever the number of excess locks equals zero, enter the threshold value as a negative. For example, LOCK_MONITOR -100

Default: No lock monitor

Tools for Monitoring Locks

Several elements in the Snapshot Structure contain information about locks. For information about monitoring the state of locks, see the File Snapshot Structure in the FairCom DB Programmer's Reference Guide.

For a graphical view of locks and other system information, try using the FairCom DB Monitor and the FairCom DB Gauges available in your tools folder and in the Windows Start menu.

 

MEMORY_MONITOR

MEMORY_MONITOR <Bytes | NO>

Sends a message to the console whenever allocated memory exceeds the next memory threshold. The parameter specifies a size in bytes. For example, MEMORY_MONITOR 500000 sends a message every time memory consumption exceeds the next 500,000 byte range of memory. The message is also sent when memory usage decreases for each absolute memory block. This keyword should be used primarily for debugging, as there is some additional overhead for this feature.

Default: NO

 

MEMORY_TRACK

MEMORY_TRACK <allocation threshold value>

Sends debug output to the console every time the net memory allocation count changes by a multiple of the threshold value. The count is the number of memory allocation requests. See also DIAGNOSTICS TRACK_LOGON.

Default: 0 (indicates do not track)

 

MONITOR_MASK

MONITOR_MASK

When a file open is attempted, the FairCom DB Server checks to see if either a file with the same name has already been opened, or if a file with the same unique ID has already been opened. By default, if a file without a matching name does match the unique file ID FairCom DB sends a message to the system console indicating the names of the two files involved. Suppress this message by adding the following entry:

MONITOR_MASK MATCH_FILE_ID

Default: Enabled

 

MONITOR_MASK

MULTILINE_STATUS_LOG_MESSAGE YES | NO

Configure the server to write a single line message.
 

Thu Apr 11 17:07:04 2024 - User# 00001 Startup FairCom DB SQL Server - V13.0.0.125(Build-240406) OEM: 0x39

Thu Apr 11 17:07:04 2024 - User# 00001 For Windows 64bit Operating System

Thu Apr 11 17:07:04 2024 - User# 00001 LICENSE: License file in use: .\ctsrvr39001112.lic

Thu Apr 11 17:07:04 2024 - User# 00001 Using configuration file <../config/ctsrvr.cfg>

Thu Apr 11 17:07:04 2024 - User# 00001 DH_JVM_OPTION_STRINGS=-Xms100m;-Xmx300m;-XX:+UseG1GC

Thu Apr 11 17:07:04 2024 - User# 00001 Windows native reader/writer lock support enabled

Thu Apr 11 17:07:04 2024 - User# 00001 Process ID: 40200

Thu Apr 11 17:07:04 2024 - User# 00001 Alternative server name...

Thu Apr 11 17:07:04 2024 - User# 00001 FAIRCOMS

Thu Apr 11 17:07:04 2024 - User# 00001 Using configuration directory: ../config

Thu Apr 11 17:07:04 2024 - User# 00001 Compatibility bit maps: (1)00002000x (2)00020000x (3)00000000x (4)00000000x (5)00000000x

Thu Apr 11 17:07:04 2024 - User# 00001 Diagnostic bit maps: (1)40000000x (2)00000000x (3)00000000x

Thu Apr 11 17:07:04 2024 - User# 00001 64-bit File Address Support

Thu Apr 11 17:07:04 2024 - User# 00001 6 Byte Transaction Numbers

Thu Apr 11 17:07:04 2024 - User# 00001 Commit Read Lock Support

Thu Apr 11 17:07:04 2024 - User# 00001 NOWAIT usrsema enabled

Thu Apr 11 17:07:04 2024 - User# 00001 Smart File Sync Support

Thu Apr 11 17:07:04 2024 - User# 00001 ctIOSEMA I/O semaphore optimization is enabled

Thu Apr 11 17:07:04 2024 - User# 00001 ctIOSEMAmemfile I/O semaphore optimization is enabled

Thu Apr 11 17:07:04 2024 - User# 00001 ctFeatGNSEMAhsh index cache mutex optimization is enabled

Thu Apr 11 17:07:04 2024 - User# 00001 ctFeatDBSEMAhsh data cache mutex optimization is enabled

Thu Apr 11 17:07:04 2024 - User# 00001 Memory suballocator allocation unit: 16

Thu Apr 11 17:07:04 2024 - User# 00001 FairCom DB SQL Enterprise Edition

Historically, CTSTATUS.FCS log messages have had the timestamp on one line and the message on the next line.

Default: NO

 

PERF_MONITOR

PERF_MONITOR <option>

The SYSMON feature allows entries to be placed on a queue for client side processing and monitoring of server events. This option allows event entries to be specified in the ctsrvr.cfg configuration file. The following options are supported:

ALL_EVENTS

CHECKPOINT

LOG_EXTENSION

LONG_TRANSACTION

When checkpoints are monitored, an entry is written to the SYSMON_PERF client-side queue for the beginning and end of each checkpoint. Log extensions similarly generate begin and end entries. A long transaction generates one entry.

ALL_EVENTS is equivalent to listing each individual option.

When one or more event types have been enabled, then the first entry written into the SYSMON_PERF queue provides the information necessary to convert the high-resolution times into seconds and/or dates.

See Also

 

REQUEST_TIME_MONITOR

REQUEST_TIME_MONITOR <request_time_interval>

FairCom DB supports monitoring function request times that exceed a specified time limit with the REQUEST_TIME_MONITOR <request_time_interval> keyword. <request_time_interval> is a time in seconds. A value of -1 disables the feature, meaning that it cannot be dynamically turned on using the ctSETCFG() function, as described below. A non-negative value (the minimum value is 10) specifies a request time in seconds. An internal thread checks for requests whose time has exceeded the specified request time. When the thread finds such a request, it writes a message to CTSTATUS.FCS, creates a process stack dump (on systems that support this feature), and logs diagnostic information to the file RQSTMON.FCS.

The ctSETCFG() function can be used to change the request time monitor interval value. For example:

ctSETCFG( setcfgREQUEST_TIME_MONITOR, "60" );

sets the request time interval to 60 seconds. If the caller of ctSETCFG() is not a member of the ADMIN group, ctSETCFG() returns error LADM_ERR (589, member of ADMIN group required). Attempting to specify a negative value returns PBAD_ERR (749, bad parameter value). Attempting to enable this feature when REQUEST_TIME_MONITOR -1 is specified in the configuration file returns SETO_ERR (804, cannot override configuration option).

The previously unused field scttrnavl in the system snapshot structure (ctGSMS) has been renamed sctrqtmonint and is set to the request time monitor interval value. This change resulted in the system snapshot structure version change from 7 to 8.

Default: NO

 

SNAPSHOT_FILENAME

SNAPSHOT_FILENAME <file name>

By default, only the system snapshot is captured with SNAPSHOT_INTERVAL. SNAPSHOT_FILENAME is used to capture user information to SNAPSHOT.FCS as well.

SNAPSHOT_FILENAME <file name>

Files added to the snapshots are said to be activated. Files may be activated whether or not the automatic snapshots are turned on in the configuration file. However, the activation has no effect until snapshots are written to the SYSLOG files.

The <file name> argument may include wildcard matching characters where “*” matches an arbitrary number of any characters and “?” matches exactly one of any character. A pattern of simply “*” matches any user or file name. See FairCom DB Standard Wildcards. For example, the following keywords activate any file ending in “.dat”, and the file journal.idx:

SNAPSHOT_FILENAME *.dat

SNAPSHOT_FILENAME journal.idx

File name case sensitivity depends on the platform. For example, Windows is case insensitive and Unix is case sensitive. The file names activated must match the file name used to first open the file. In particular, paths used in the activation list and during the call to open the file must match.

See Also

SNAPSHOT_INTERVAL

SNAPSHOT_USERID

 

SNAPSHOT_INTERVAL

The SNAPSHOT_INTERVAL keyword enables automatic snapshots at specified intervals:

SNAPSHOT_INTERVAL <minutes>

By default, only the system snapshot is captured. To add user- or file-specific snapshots to the data captured, use one or more of the following configuration entries:

SNAPSHOT_USERID <user ID>

SNAPSHOT_FILENAME <file name>

By default, this keyword logs the output to the c-tree Server System Event Log (SYSLOGDT.FCS) discussed at these links:

Use the DIAGNOSTICS SNAPSHOT_AUTOMATIC keyword to change the output to the SNAPSHOT.FCS human readable file.

See Also

SNAPSHOT_FILENAME

SNAPSHOT_USERID

 

SNAPSHOT_LOCKWAIT_USEC

SNAPSHOT_LOCKWAIT_USEC <lock wait histogram interval width in microseconds>

Histograms of waiting times for blocked lock requests are available: one for waiting times for blocked data record lock requests, and one for waiting times for blocked index lock requests (please note that the index locks are not controlled by the user). There is a small amount of overhead associated with mutex calls to collect clean statistics.

SNAPSHOT_LOCKWAIT_USEC can change the default histogram intervals (box width) for the lock waiting time histograms (default of 10,000 µsec or 0.01 seconds).

 

SNAPSHOT_LOGFLUSHTIME_USEC

SNAPSHOT_LOGFLUSHTIME_USEC <histogram interval width in microseconds>

The SNAPSHOT feature includes two histograms of transaction log flush times to help identify if slow transaction log writes are slowing down server performance. One is of fixed width, and the other has an adaptive width*. These histograms can be viewed in the ctstat utility.

SNAPSHOT_LOGFLUSHTIME_USEC controls the width of the fixed histogram, and the initial width of the adaptive histogram (which defaults to 10 microseconds). This may be changed at server startup by specifying SNAPSHOT_LOGFLUSHTIME_USEC in ctsrvr.cfg. It can also be changed at runtime via ctSETCFG() or the ctadmn utility (select 10. Change Server Settings and then 10. Change the specified configuration option). When the fixed width is changed or the initial adaptive width is automatically adjusted, the histogram box values are reset to zero.

*The first time the server starts, the server sets the adaptive histogram box width to the default value or the SNAPSHOT_LOGFLUSHTIME_USEC value specified in ctsrvr.cfg. As the server runs, on each checkpoint operation, it determines if a significant fraction of the log save values since the last checkpoint are at the low or high end of the histogram range. If so, the server changes the histogram box width to a value that centers the average log save time in the histogram boxes.

 

SNAPSHOT_TRANTIME_USEC

SNAPSHOT_TRANTIME_USEC <tran time histogram interval width in microseconds>

The SNAPSHOT feature includes a histogram of transaction times. There is a small amount of overhead associated with mutex calls to collect clean statistics.

SNAPSHOT_TRANTIME_USEC can change the default histogram intervals (box width) for the transaction time histogram (default of 50,000 µsec or 0.05 seconds).

 

SNAPSHOT_USERID

SNAPSHOT_USERID <user ID>

By default, only the system snapshot is captured with SNAPSHOT_INTERVAL. SNAPSHOT_USERID is used to capture user information to SNAPSHOT.FCS as well.

Users added to the snapshots are said to be activated. Users may be activated whether or not the automatic snapshots are turned on in the configuration file. However, the activation has no effect until snapshots are written to the SYSLOG files.

The <user ID> argument may include wildcard matching characters: “*” matches an arbitrary number of any characters, and “?” matches exactly one of any character. A pattern of simply “*” matches any user or file name. See FairCom DB Standard Wildcards. For example, the following keywords activate all users:

SNAPSHOT_USERID *

User IDs are not case sensitive.

See Also

SNAPSHOT_INTERVAL

SNAPSHOT_FILENAME

 

SYSLOG

SYSLOG <option>

FairCom DB optionally maintains a system event log, SYSLOG. This is maintained in two system files: SYSLOGDT.FCS and SYSLOGIX.FCS. These files comprise a FairCom DB data file and index pair with a record for each recordable system event. Unlike the text based CTSTATUS.FCS, SYSLOG can be encrypted such that entries cannot be added, deleted, or modified with a simple text editor, and vendors can log application specific entries.

The System Event Log contents are controlled by SYSLOG configuration keywords in ctsrvr.cfg, the ctsrvr.set settings file, or from the command line. They are entered as pairs in the form of: SYSLOG <keyword>. As many of these pairs as desired may be used at the discretion of your application vendor.

Current SYSLOG options include:

ADMIN_API

Only allow users in the ADMIN group to use the SystemLog() function to create vendor-defined entries in the log.

CTSTATUS

Log each entry to CTSTATUS.FCS in the System Event Log, except for those entries which occur before or after the system logging monitor is in operation.

DELETE_FILE

Log file deletes and restores.

DISABLE_API

Do not allow any calls to the SystemLog() function for user defined entries.

DYNAMIC_DUMP

Log the beginning and end of dynamic dumps and a result for each file dumped.

ENCRYPT

Encrypt the SYSLOG files. Requires ADVANCED_ENCRYPTION YES

LOGFAIL_PURGE

Causes an automatic purge of the oldest entries in the log if the system cannot add a record to SYSLOGDT.FCS. All the entries occurring on the oldest day are deleted unless there are only entries for the current day in which case no entries are purged. After a successful purge, an attempt is made to add the new entry that triggered the automatic purge. If this add succeeds, the system log operation continues in its usual fashion.

LOGFAIL_CTSTATUS

If there is no LOGFAIL_PURGE entry in the configuration file, or if the purge fails, the log entries will be rerouted to CTSTATUS.FCS if LOGFAIL_CTSTATUS is in the configuration file. This disables SYSLOG CTSTATUS; i.e, no more entries are made to the system log.

LOGFAIL_TERMINATE

If there is no automatic purge or it fails, and if there is no re-routing to CTSTATUS.FCS, either the system log will stop operation, or if LOGFAIL_TERMINATE is in the configuration file, the FairCom Server will shut down.

Note: USE LOGFAIL_TERMINATE WITH CAUTION!

NONE

Used in a settings file to eliminate additional SYSLOG entries in a server configuration file.

RESTORE_POINT

Use RESTORE_POINT to log created restore points, recovery with restore points, and transaction rollback to restore points through utility programs.

See SYSLOG Logging of Restore Point

SQL_STATEMENTS

Enables SQL statement logging to the SYSLOG audit logs.This information includes connection information, improved timing, and logging the statement before it is actually executed for a detailed audit trail of all SQL operations.

SYSLOG_EXCLUDE_SQL_USER <name>

Allows specifying a user <name> to be excluded from this logging.

All SQL statements are written to the log by default when SQL query logging is enabled by SYSLOG SQL_STATEMENTS,.

Multiple users can be excluded by specifying the keyword multiple times. No validation is made that the <name> specified matches an existing user name.

TRUNCATE

Over time the SYSLOGDT.FCS and SYSLOGIX.FCS files can become quite large requiring file maintenance to reduce the size. The SYSLOG() function supports purging records, optionally filtered by time and by event code. However, purging all entries one record at a time is slow, and storage device space is not released until new records are added over time. A better solution is the TRUNCATE capability available with V13.

With SYSLOG TRUNCATE in your configuration file, when a complete purge is requested (no filtering by time or event) the file is truncated rather than deleting individual records. This approach is much faster and avoids limitations with space reuse. Any user reading SYSLOG files when they are truncated will encounter the FBLK_ERR error . After receiving this error, the user must close and reopen the files to proceed..

USER_INFO

Log all logons, logoffs (including SQL users as of V12), and changes to user logon profiles.

Note: Build 210901 and earlier had a 4GB limit to the SYSLOG files. It is highly recommended to limit information recorded in this file in high volume systems, and include the LOGFAIL_PURGE option to clear data as the file grows. To disable the creation of huge system log files, add SYSLOG NONHUGE to the server configuration file. Builds after 210901 no longer have a 4GB file size limit.

History

  • V11.8 and later support SQL_STATEMENTS for detailed statement logging.
  • V11.8. and later support auditing SQL logon/logoff events with USER_INFO.

 

SYSLOG SQL_STATEMENTS Configuration Keyword

This configuration keyword logs executed SQL statements in SYSLOG:

 

SYSLOG SQL_STATEMENTS

 

A SYSLOG SQL_STATEMENTS (SYSLOG, SYSLOG) log entry is written after statement execution so it can also include the error code (if any).

The variable part of the SYSLOG entry contains statement information in JSON format similar to SQL_DEBUG LOG_STMT.

Below is a sample showing how it is displayed by the ctalog utility:

 

Class = 16 (SQL)

Event = 1 (SQL statement)

Date = 09/24/2020

Time = 17:40:11

Sequence number = 37

Error code = -20005

User ID = 'admin'

Node name = 'isql'

Variable-length information:

---------------------------------------------------

{"timestamp":"Tue Sep 24 17:40:27 2020","ipaddr":"127.0.0.1","db":"CTREESQL","user":"admin","thread":29,"statement":"select * from missingtable"}

---------------------------------------------------

 

 

SYSVIEW_WHAT

SYSVIEW_WHAT <info>

This option supports the system status reports triggered by specified events such as increasing the number of log files or beginning a dynamic dump. <info> is one of the following to determine what to include in the report.

USER_COUNT

USER_LIST

FILES_COUNT

FILES_LIST

TRANS_COUNT

TRANS_LIST

MEMORY

LOGS

ALL

One or more configuration entries can be specified in ctsrvr.cfg. If the ALL parameter is used, any other entry is redundant. The LIST options (for example., USER_LIST) also report the simple COUNT statistics (for example., USER_COUNT) such that it is redundant to specify both a LIST and COUNT. The only reason to use the COUNT option is to reduce output.

The reports are added to the end of the SYSVIEW.FCS text file. Each report is time stamped and the triggering event is noted.

Example

SYSVIEW_WHEN LOG_ACTIVE_CHG

SYSVIEW_WHEN DYNDMP_BEG

SYSVIEW_WHAT ALL

See Also

Note: This sever feature is not currently enabled.

 

SYSVIEW_WHEN

SYSVIEW_WHEN <event>

This option supports the system status reports triggered by specified events such as increasing the number of log files or beginning a dynamic dump. <event> is one of the following to determine when the report is generated:

CHECKPOINT_BEG

CHECKPOINT_END

SHUTDOWN

LOG_ACTIVE_CHG,

LOG_SIZE_CHG

DYNDMP_BEG

DYNDMP_END

ALL

The reports are added to the end of the SYSVIEW.FCS text file. Each report is time stamped and the triggering event is noted.

Example

SYSVIEW_WHEN LOG_ACTIVE_CHG

SYSVIEW_WHEN DYNDMP_BEG

SYSVIEW_WHAT ALL

See Also

Note: This sever feature is not currently enabled.

 

DIAGNOSTICS SNAPSHOT_AUTOMATIC

Write system snapshots to the human-readable SNAPSHOT.FCS text file.

DIAGNOSTICS SNAPSHOT_AUTOMATIC

Writes any automatic snapshots to SNAPSHOT.FCS instead of to the SYSLOG files. However, only the system snapshot is written. Snapshots for activated users and/or files are ignored.

See Also:

 

DIAGNOSTICS SNAPSHOT_IOTIME

DIAGNOSTICS SNAPSHOT_IOTIME

Enables collecting disk read and write timings on a per-file basis when high-resolution timer support is activated.

 

DIAGNOSTICS SNAPSHOT_SHUTDOWN

Write system snapshots to the human-readable SNAPSHOT.FCS text file.

DIAGNOSTICS SNAPSHOT_SHUTDOWN

Writes a system snapshot to SNAPSHOT.FCS at the start of the server shutdown process. However, only the system snapshot is written. Snapshots for activated users and/or files are ignored.

FairCom recommends this option in all configuration files to establish baseline statistics over time.

 

DIAGNOSTICS SNAPSHOT_WORKTIME

DIAGNOSTICS SNAPSHOT_WORKTIME

Enables collecting FairCom DB function call counts and timings on a per-c-tree file basis.

 

Security

FairCom DB provides a variety of keywords that can be used for security purposes.
 

Note: FairCom DB File and User Security are available only when using the client/server operational model.

 
Encryption

 
ADMIN_ENCRYPT

Encrypt the FAIRCOM.FCS file at the time it is created.

 
ADVANCED_ENCRYPTION

Enable advanced encryption for files.

 

ALLOW_MASTER_KEY_CHANGE

The configuration option ALLOW_MASTER_KEY_CHANGE specifies whether the master password is changeable.

 
CHANGE_ENCRYPTION_ON_COMPACT

Change the encryption attributes of a file using the compact function from a client.

 

FIPS_ENCRYPTION

When specified, FairComDB uses the OpenSSL 3.0 FIPS module for encryption routines. 

 

KEY_EXCHANGE_PARAMS

Specifies the PEM-encoded file containing parameters for Diffe-Hellman key exchange.


LOG_ENCRYPT

Camouflages the contents of the transaction logs to deter unauthorized access.

 
MASTER_KEY_FILE

Specifies a file from which c-tree reads the master encryption key.

 

MASTER_KEY_LIB

Specify the path of a user-created library (.dll, .so, or .dylib file) that provides the advanced encryption master key at startup time.

 

OPENSSL_ENCRYPTION

Encrypt client passwords with OpenSSL before they are transmitted to the server.

 

READONLY_SERVER

Sets the server to read-only mode.

 
User Access

EXPIRE_IN_DAYS

Passwords to expire after this many days. Login attempts will fail with PWDEXP_ERR (1116). The ADMIN account is excluded from password expiration.

 
LOGON_FAIL_LIMIT

Specifies the optional limit on the number of consecutive failed logons that causes subsequent logon attempts to fail for LOGON_FAIL_TIME minutes.

 
LOGON_FAIL_TIME

The length of time logons are blocked after the logon limit is exceeded.

 
LOGON_MUST_TIME

Requires users to log on “at-least-once” within the specified time.

 

MINIMUM_LENGTH

Enforces a minimum length when setting a new password.

 

REQUIRED_CLASSES

Enforces a minimum number of character classes from lower case, upper case, numbers, and symbols when setting a new password.

 
STARTUP_BLOCK_LOGONS

Prevents non-ADMIN user logons when the server is started.

 
Tamper-Proof Settings

These keywords affect people's ability to alter system integrity by overriding settings from a command line or by altering configuration files. See also Settings File.

 
NULL_STRING

Defines a symbol that represents a null string so that options can be blocked in the settings file without activating them.

 
COMPATIBILITY NO_COMMAND_LINE

Instructs FairCom DB to ignore command-line arguments.

 
COMPATIBILITY NO_CONFIG_FILE

Instructs FairCom DB to ignore the standard configuration file, ctsrvr.cfg.

 
Restrictions

 
ENABLE_TRANSFER_FILE_API

Enables the file transfer function, ctTransferFile(), which is used to transfer a file to or from the server.

 
FILEDEF_SECURITY_LEVEL

Protects the resource APIs, ADDRES(), UPDRES(), and DELRES(), with safeguards against unauthorized modification of file definition resources such as IFIL definitions, conditional indexes, row-level filters, etc.

 
Security-Related Compatibility Options

 
COMPATIBILITY NONADMIN_FILBLK

Permits a non-ADMIN user to set a file block if the blocking user has the file opened with update permissions.

 
COMPATIBILITY NONADMIN_QUIET

Permits a non-ADMIN user to call ctQuiet() to quiesce the server.

 
COMPATIBILITY NONADMIN_TRANSFER_FILE

Permits a non-ADMIN user to call ctTransferFile() to transfer a file.

 
COMPATIBILITY NON_ADMIN_SHUTDOWN

Allows non-ADMIN users to shut down the Server.

 

COMPATIBILITY SQLIMPORT_ADMIN_PASSWORD

Instructs FairCom DB to verify the admin password passed as a parameter.

 

TLS

 

DEBUG_LOG

Enable logging to facilitate debugging of TLS connections.

 

SERVER_CERTIFICATE_FILE

Provide the name of the PEM-encoded certificate file that contains this FairCom server's certificate.

 

SERVER_ENCRYPTED_STORE_FILE

Specify an encrypted password file that is used to decrypt this FairCom server's private key file.

 

SERVER_PRIVATE_KEY_FILE

Indicates the name of the file containing this FairCom server's private key.

 

SSL_CIPHERS

Set the encryption ciphers that are allowed to be used for encrypting TLS connections to this FairCom server.

 

SSL_CONNECTIONS_ONLY

Specify whether clients are allowed to connect to this FairCom server using non-encrypted connections.

 

VERIFY_CLIENT_CERTIFICATE

Specify whether clients are required to present valid client certificates when connecting or not.

 

X509_AUTHENTICATION

Specify whether the client's certificate is used for authentication rather than a username/password.

 

Setting password requirements

To control password requirements, add SUBSYSTEM SECURITY PASSWORD to your ctsrvr.cfg configuration file.

 

The default values are:

 

SUBSYSTEM SECURITY PASSWORD {

MINIMUM_LENGTH 15

REQUIRED_CLASSES 0

EXPIRE_IN_DAYS 0

BLOCK_OLD_PASSWORD 0

PASSWORD_HASH ORIGINAL

PASSWORD_HASH_DIFFICULTY 0

}

 

MINIMUM_LENGTH - Enforces a minimum length when setting a new password.

Default: 15

V13.0 and earlier default: 0

Maximum: 1024

 

REQUIRED_CLASSES - Enforces a minimum number of character classes from lower case, upper case, numbers, and symbols when setting a new password.

Default: 0

 

EXPIRE_IN_DAYS - Passwords to expire after this many days. Login attempts will fail with PWDEXP_ERR (1116). The ADMIN account is excluded from password expiration.

Default: 0 (Never expires).

 

BLOCK_OLD_PASSWORDS - When a non-zero number (N), password change attempts that reuse any of the N previous passwords for a user will fail with error PASSWORD_BLOCKLIST_ERR(1256).

Default: 0 (No check).

 

PASSWORD_HASH - In V13.0.4 onwards, allows setting the hash function used when generating new entries in the password database.

Default: ORIGINAL (SHA2-512 hash scheme)

 

PASSWORD_HASH_DIFFICULTY - In v13.0.4 onwards, sets a scaling factor for PASSWORD_HASH values.

Default: Depends on PASSWORD_HASH value.

 

Advanced notes

  • This subsystem can be specified in an encrypted server settings file using the ctcfgset utility to prevent these settings from being changed in the configuration file or at runtime.
  • If the minimum length and required classes settings are changed in the configuration file or at runtime, they do not affect existing passwords because only a hash of the password is stored. The time to expiration takes effect immediately even for existing user accounts.
  • When changing subsystem options at runtime (for example, using ctadmn), either the entire subsystem or particular subsystem options might be blocked by having been specified in a settings file. In both cases, the attempt to change the options fails with error SETO_ERR (804), even if some of the subsystem options are not blocked. If SETO_ERR occurs when specifying multiple options at runtime, check CTSTATUS.FCS for a message indicating which options are blocked and try again with just those options that are not blocked.

 

ADMIN_ENCRYPT

ADMIN_ENCRYPT <YES | NO>

Encrypt the FAIRCOM.FCS file at the time it is created. Note: This keyword will not encrypt an existing file.

To enable the encryption of the user group information file, FAIRCOM.FCS, set ADMIN_ENCRYPT YES (default). The default setting uses AES encryption, adding an additional level of security for passwords and user definitions stored in the file. FairCom DB File and User Security are available only when using the client/server operational model.

To disable the encryption of this file, set ADMIN_ENCRYPT No.

Note: AES encryption is only available if ADVANCED_ENCRYPTION YES is specified in ctsrvr.cfg.

V13: ADMIN_ENCRYPT has no effect unless ADVANCED_ENCRYPTION is enabled.

Default: YES

 

ADVANCED_ENCRYPTION

ADVANCED_ENCRYPTION < YES | NO >

Enable advanced encryption for files.

When Advanced Encryption is enabled, FairCom DB prompts for a master password at server startup. Run the ctcpvf utility to generate an encrypted password for use when launching the Advanced Encryption enabled Server. This will generate the file ctsrvr.pvf.

Note: Developers can use the FairCom DB SDK to replace this prompt with an application-specific method of retrieving the master password.

Any time you change the advanced encryption setting, you should delete the FAIRCOM.FCS file (which contains user and group information) before restarting FairCom DB as user and group information is encrypted for protection as well. All user and group information must be recreated if the FAIRCOM.FCS file is deleted.

Client implementation of Advanced Encryption is accomplished through the use of the SetEncryption() function. Refer to the c-tree Plus Function Reference Guide for details on this function. FairCom DB File and User Security are available only when using the client/server operational model.

Default: NO

See Also

 

ALLOW_MASTER_KEY_CHANGE

FairCom DB Server supports a master key file in which the advanced encryption master key can be stored. The MASTER_KEY_FILE configuration option is used to specify a local encrypted key store.

To prevent tampering with advanced encryption keys, the server configuration option ALLOW_MASTER_KEY_CHANGE must be specified to allow changing master passwords via the SECURITY API function (an administrative client-side API call). Default value: NO.

Note: The server configuration option MASTER_KEY_FILE now considers a value of NONE to indicate no master key file is in use. This option can be specified in a settings file to prevent a configuration file from using an existing master key file.

 

BLOCK_OLD_PASSWORDS

When a non-zero number (N), password change attempts that reuse any of the N previous passwords for a user will fail with error PASSWORD_BLOCKLIST_ERR(1256).

Default: 0 (No check)

Note: This keyword only blocks passwords that have been used since BLOCK_OLD_PASSWORDS was turned on. It cannot retrieve passwords from before it was active.

 

CHANGE_ENCRYPTION_ON_COMPACT

CHANGE_ENCRYPTION_ON_COMPACT <YES | NO>

Allows changing the encryption attributes of a file using the compact API function.

Default: No

If an encrypted file is compacted, the resulting file will be encrypted using the same method.

Note: Setting this keyword to YES allows a user to permanently decrypt a file without knowing the master encryption key.

In V11 and later, to change the encryption attributes of a file using the compact function from a client, add the CHANGE_ENCRYPTION_ON_COMPACT YES to ctsrvr.cfg. If this keyword is not present or set to No, the operation fails with error NSUP_ERR (454, not supported).

 

COMPATIBILITY NO_COMMAND_LINE

COMPATIBILITY NO_COMMAND_LINE

This option is used in conjunction with the tamper-proof settings file under the server. Configuration options that are in the encrypted settings file, ctsrvr.set, cannot be overridden in the ctsrvr.cfg file. This keyword instructs the FairCom DB to ignore the command line arguments.

Default: Not present

See Also

 

COMPATIBILITY NO_CONFIG_FILE

COMPATIBILITY NO_CONFIG_FILE

This option is used in conjunction with the tamper-proof settings file under the server. Configuration options that are in the encrypted ctsrvr.set settings file cannot be overridden in the ctsrvr.cfg file. This keyword instructs the FairCom DB to ignore the standard configuration file, ctsrvr.cfg.

Default: Not present

See Also

 

COMPATIBILITY NON_ADMIN_SHUTDOWN

COMPATIBILITY NON_ADMIN_SHUTDOWN

Allow non-ADMIN users to shut down the Server.

Default: ADMIN group only may shutdown.

 

COMPATIBILITY NONADMIN_FILBLK

COMPATIBILITY NONADMIN_FILBLK

Permits a non-ADMIN user to set a file block if the blocking user has the file opened with update permissions.

If a non-ADMIN user attempts to set a file block without this keyword and having update permissions on the file, then error LADM_ERR (589) will be returned.

 

COMPATIBILITY NONADMIN_QUIET

COMPATIBILITY NONADMIN_QUIET

Permits a non-ADMIN user to call ctQuiet() to quiesce the server.

If a non-ADMIN user attempts to call ctQuiet() without this keyword, then error LADM_ERR (589) will be returned.

 

COMPATIBILITY NONADMIN_TRANSFER_FILE

COMPATIBILITY NONADMIN_TRANSFER_FILE

The file transfer API function ctTransferFile() can be used to transfer a file to or from the server. By default, this function is disabled for security reasons and is restricted to a member of the ADMIN group. This configuration keyword permits a non-ADMIN user to call ctTransferFile() to transfer a file.

If a non-ADMIN user attempts to call ctTransferFile() without this keyword, then error LADM_ERR (589) will be returned.

See Also

ENABLE_TRANSFER_FILE_API

 

COMPATIBILITY SQLIMPORT_ADMIN_PASSWORD

COMPATIBILITY SQLIMPORT_ADMIN_PASSWORD

Instructs ctSQLImportTable() server-side logic to verify the admin password passed in the clear as parameter to the function instead of using the credential of the connected user to perform the link/unlink of the table to SQL.

Support has been added for ADMIN password encryption in V11.5 and later. This compatibility keyword instructs ctSQLImportTable() and the ctsqlimp utility (and ctsqlimp in FairCom RTG) to verify the admin password (if any).This keyword affects only FairCom RTG or Server SDK compiles calling ctSQLImportTable() on the server-side reusing the current session.

This server configuration option can be changed at runtime using the ctadmn utility or the ctSETCFG() API function.

  • To enable this option using ctadmn:
    Choose option 10, then option 10, then enter:
    COMPATIBILITY SQLIMPORT_ADMIN_PASSWORD
  • To disable this option using ctadmn:
    Choose option 10, then option 10, then enter: COMPATIBILITY ~SQLIMPORT_ADMIN_PASSWORD

 

History

This option was renamed from COMPATIBILITY SQLIMP_ADM_PASSWD in V11.5 and later.

 

DEBUG_LOG

DEBUG_LOG <log file>

(optional) For aid in debugging TLS and X.509 configuration and certificate issues, write additional messages to the specified <log file>.

Must be specified within SUBSYSTEM COMM_PROTOCOL SSL (see TLS).

 

FIPS_ENCRYPTION

FIPS_ENCRYPTION < YES | NO >

When specified, FairComDB uses the OpenSSL 3.0 FIPS module for encryption routines.

 

ENABLE_TRANSFER_FILE_API

ENABLE_TRANSFER_FILE_API < YES | NO >

The file transfer API function ctTransferFile() can be used to transfer a file to or from the server. By default, this function is disabled for security reasons and is restricted to a member of the ADMIN group. To enable this feature, this keyword must be specified to YES in the FairCom DB configuration file, ctsrvr.cfg. Calling this function without this keyword enabled will result in a NSUP_ERR (454, feature not supported) error returned to the client.

Default: NO

See Also

COMPATIBILITY NONADMIN_TRANSFER_FILE

 

EXPIRE_IN_DAYS

EXPIRE_IN_DAYS - Passwords to expire after this many days. Login attempts will fail with PWDEXP_ERR (1116). The ADMIN account is excluded from password expiration.

To set this value, see Setting password requirements.

Default: 0 (Never expires).

 

FILEDEF_SECURITY_LEVEL

FILEDEF_SECURITY_LEVEL <level>

With row-level, system-wide, data filters, it is necessary to protect the resource APIs, ADDRES(), UPDRES(), DELRES(), with safeguards against unauthorized modification of file definition resources such as IFIL definitions, conditional indexes, row-level filters, etc.

The c-tree Server can enforce different levels of File Definition Resource (FCRES) security when users modify data file definition resources such as the IFIL and DODA resources. The actual level of protection enforced for a given resource is determined by the FILEDEF_SECURITY_LEVEL configuration keyword.

The file definition resource security keyword must be specified in the c-tree Server configuration file ctsrvr.cfg. There are three different security levels for this keyword:

FILEDEF_SECURITY_LEVEL LOW

This is the lowest security setting. There is no protection as any user may add or delete data file definition resources. This setting may be used to keep the c-tree Server data compatible with legacy applications.

FILEDEF_SECURITY_LEVEL MEDIUM

This is the default security setting. Any user may add or delete data file definition resources, but the file must be opened exclusive. This default setting may be enough to keep the c-tree Server data compatible with most legacy applications.

FILEDEF_SECURITY_LEVEL HIGH

This is the highest security setting. A user must have file definition permission before a definition resource is added or deleted. The file must be opened exclusive. This setting is appropriate for applications that require the highest level of security and may cause compatibility problems with existing legacy applications.

 

Default: MEDIUM.

Note: This feature is NOT currently enabled.

 

KEY_EXCHANGE_PARAMS

KEY_EXCHANGE_PARAMS <filename>

(optional) - This is the name of a PEM-encoded file containing parameters for Diffe-Hellman key exchange. In V13 the default is to use the predefined group "ffdhe2048". These parameters may also be included in the SERVER_CERTIFICATE_FILE, which takes precedence over any parameters specified by KEY_EXCHANGE_PARAMS.

Example

KEY_EXCHANGE_PARAMS DHparams.pem

See Also

SERVER_CERTIFICATE_FILE

 

LOG_ENCRYPT

LOG_ENCRYPT YES

LOG_ENCRYPT enables encryption of the FairCom Server transaction logs adding an additional level of security for user data stored in the logs. Note: This keyword will not encrypt an existing file.

  • With LOG_ENCRYPT YES and ADVANCED_ENCRYPTION NO (or not specified) (V13) Not allowed.
  • With LOG_ENCRYPT YES and ADVANCED_ENCRYPTION YES logs are encrypted with AES 256-bit encryption. (Highest strength available.)

Before changing this setting, delete existing transaction logs (L0*.FCS), log templates (L0*.FCT), and start files (S0*.FCS).

Default: NO

 

LOGON_FAIL_LIMIT

LOGON_FAIL_LIMIT <attempts>

The optional limit on the number of consecutive failed logons that causes subsequent logon attempts to fail for LOGON_FAIL_TIME minutes. A logon which fails during this period returns LRSM_ERR (584).

Default: 0 (no limit)

See Also

LOGON_FAIL_TIME

LOGON_MUST_TIME

 

LOGON_FAIL_TIME

LOGON_FAIL_TIME <minutes>

The length of time logons are blocked after the logon limit is exceeded. A value of -1 indicates that there should be a permanent “log-on block” placed on a user until the Server ADMIN intervenes.

Default: 5

See Also

LOGON_FAIL_LIMIT

LOGON_MUST_TIME

 

LOGON_MUST_TIME

LOGON_MUST_TIME <minutes>

The LOGON_MUST_TIME keyword, when set with a non-zero value, requires users to log on “at-least-once” within the defined time (e.g: LOGON_MUST_TIME 10080 means a user must logon at least once a week). If the time expires for a specific user, their profile will be deactivated, preventing access to the FairCom DB Server.

This keyword accepts any value up to 35,791,394 minutes, which is 24855 days or approximately 68 years.

The Server Administrator, or other ADMIN group user, must reset the user’s account once the time limit has elapsed.

Default: 0 (no limit)

See Also

LOGON_FAIL_LIMIT

LOGON_FAIL_TIME

 

MASTER_KEY_FILE

MASTER_KEY_FILE <filename>

Specifies a file from which c-tree reads the master encryption key. On Linux 2.6 and later kernel systems, c-tree uses the keyutils support to create a user-specific key in which the master key is stored. On other Unix systems, the master key is stored in a file on disk, with permissions set so that only the user that created the file can read it (permissions are set to 400).

The file (or user key on Linux) is encrypted using AES, however, the encryption is intended to only prevent casual inspection of the data when the file's contents are viewed. The permissions on the file are the defense against an unauthorized user reading the file.

The ctcpvf utility's -s option is used to create the master key file.

This configuration option can include an environment variable name that will be substituted with its value when the configuration file is read.

See Also

 

MASTER_KEY_LIB

It is now possible to implement custom solutions for retrieving the advanced encryption master key from an arbitrary library. This feature eases the way the developers can customize the master key prompt.

The new ctsrvr.cfg configuration keyword, MASTER_KEY_LIB, takes a string defining the complete library name to load, for example:

 

MASTER_KEY_LIB maskeylib.dll

 

or

 

MASTER_KEY_LIB libmaskey.so

 

The master key library must link with the OpenSSL libraries that are used to secure the master key exchange and implement the following functions:

  • int ctGetSecretVersion(void) - returns the version of the master key library SDK used to implement it.
  • int ctGetSecret(ctGetSecretParams_t * GetSecretParams) - returns the master key encrypted by calling ctSecureMasterKey as a member of the ctGetSecretParams_t structure.

Both functions are called by the server code in ctcryp.c. If the version does not match or ctGetSecret returns something different than 0, the master key will not be loaded and the server will be shut down.

To correctly return the encrypted master key, the following must be called to encrypt the master key before returning 0 in ctGetSecret:

 

int ctSecureMasterKey(ctSecureMasterKeyParams_t *SecureMasterKeyParams)

 

MINIMUM_LENGTH

MINIMUM_LENGTH - Enforces a minimum length when setting a new password.

To set this value, see Setting password requirements.

Default: 15

V13.0 and earlier default: 0

Maximum: 64

 

NULL_STRING

NULL_STRING null

This option is used in conjunction with the tamper-proof settings file under the server. Configuration options that are in the encrypted settings file, ctsrvr.set, cannot be overridden in the ctsrvr.cfg file. The NULL_STRING keyword lets you define a symbol that represents a null string so that options can be blocked in the settings file without activating them.

LOCAL_DIRECTORY null

With the above entry example in the server settings file, LOCAL_DIRECTORY is blocked from use in the standard ctsrvr.cfg file but it is not activated.

This configuration option can include an environment variable name that will be substituted with its value when the configuration file is read.

Default: Not enabled

 

OPENSSL_ENCRYPTION

OPENSSL_ENCRYPTION NO|YES

FairCom now supports an updated AES algorithm based on the OpenSSL standard by default. Previous algorithm implementation can be restored by specifying in ctsrvr.cfg the keyword OPENSSL_ENCRYPTION NO.

This change is expected to provide security and, with internal testing, we have seen an up to 20% performance improvements.

This modification changes file passwords encrypted on the client-side for secure transmission to use OpenSSL.

 

PASSWORD_HASH

Password_Hash

In V13.1 onwards, allows setting the hash function used when generating new entries in the password database.

Set scaling factor using PASSWORD_HASH_DIFFICULTY.

Clients must support the hash algorithm configured by the server. Using PBKDF2 or ARGON2 requires the BouncyCastle third-party cryptography library for both JDBC and ADO.net.*

Options:

ORIGINAL - uses SHA2-512 hash scheme. This is the only supported option in V10-V13.0.3.

PBKDF2_SHA2_512 - uses PBKDF2(SHA2-512)

PBKDF2_SHA3_512 - uses PBKDF2(SHA3-512)

ARGON2_64MB - uses ARGON2id with 64MB RAM requirement

ARGON2_2GB - uses ARGON2id with 2GB RAM requirement

Defaults to ORIGINAL.

More information:

Changes to PASSWORD_HASH will only take effect when each user's password is next added or changed.

*NOTE: To use BouncyCastle with JDBC, either the main application must run:

Security.addProvider(new BouncyCastleProvider());

Or you can add it to your java runtime configuration:

conf/security/java.security

It will be resolved at runtime if the .jar is available:

security.provider.<n>=org.bouncycastle.jce.provider.BouncyCastleProvider

 

PASSWORD_HASH_DIFFICULTY

Password_Hash_Difficulty

In V13.1 onwards, sets a scaling factor for PASSWORD_HASH values.

The higher the value, the higher the computational cost on the client and server during password authentication, and the more resistant the password database will be to offline brute force attacks.

Defaults:

The default value for PASSWORD_HASH_DIFFICULTY depends on the value set for PASSWORD_HASH:

PASSWORD_HASH value

PASSWORD_HASH_DIFFICULTY default

Original

(Not used)

PBKDF2_SHA2_512

210000

PBKDF2_SHA3_512

210000

ARGON2_64MB

3

ARGON2_2GB

1

 

More information:

Changes to PASSWORD_HASH_DIFFICULTY will only take effect when each user's password is next added or changed.

Clients must support the hash algorithm configured by the server. This may be a consideration for users with older non-native clients that may have more limited encryption support.

Warning: Increasing PASSWORD_HASH_DIFFICULTY values may lead to noticeable login delays after user passwords are changed to use the new difficulty. Ensure you change a test account password after making this change and use that account for performance testing on a variety of anticipated client hardware, as clients without hardware support for the underlying cryptographic hash function(e.g. SHA512 or SHA3-512) may be significantly slower.

 

READONLY_SERVER

READONLY_SERVER Yes|No

This option is available only if licensed. This configuration option sets the server in read-only mode. By default, this option is off. To enable this option, add READONLY_SERVER YES to ctsrvr.cfg.

This option can also be enabled or disabled at run-time by calling the ctSETCFG() function or using the ctadmn utility: Select menu option 10 and then menu option 10 (Change the specified configuration option) again to change a server configuration option value.

Runtime changes to this setting are persisted as documented in Dynamic Configuration Changes Now Persisted in New ctsrvr.cfg Location and Default Additions.

The Replication Manager API command ctMemphisSetDBEngineReadOnly can be used to set this keyword.

 

REQUIRED_CLASSES

REQUIRED_CLASSES - Enforces a minimum number of character classes from lower case, upper case, numbers, and symbols when setting a new password.

To set this value, see Setting password requirements.

Default: 0

 

SERVER_CERTIFICATE_FILE

SERVER_CERTIFICATE_FILE <filename>

(required) - This is the name of a PEM-encoded certificate file containing the FairCom DB server certificate. It can also optionally include the private key. The server certificate can be self-signed.

Must be specified within SUBSYSTEM COMM_PROTOCOL SSL (see TLS).

Example

SERVER_CERTIFICATE_FILE

 

SERVER_ENCRYPTED_STORE_FILE

SERVER_ENCRYPTED_STORE_FILE <store filename>

(optional) - If the private key is encrypted, use the ctcpvf utility to create an encrypted store file containing the pass phrase used to decrypt the private key and specify the name of the encrypted store file with this option.

Must be specified within SUBSYSTEM COMM_PROTOCOL SSL (see TLS).

 

SERVER_PRIVATE_KEY_FILE

SERVER_PRIVATE_KEY_FILE <filename>

(optional) - If the private key is in a different file than the certificate, use this option to indicate the name of the file containing the private key. If this option is not specified, the private key is expected to be found in the file whose name is specified by the SERVER_CERTIFICATE_FILE option.

Must be specified within SUBSYSTEM COMM_PROTOCOL SSL (see TLS).

 

SSL_CIPHERS

SSL_CIPHERS

(optional) - If specified this option sets the encryption ciphers that are allowed to be used for encrypting the SSL connection. Ciphers are separated by a colon, (:). An exclamation point (!) explicitly disables a cipher. @STRENGTH sorts the list in order of encryption algorithm key length. For more information, see https://www.openssl.org/

Must be specified within SUBSYSTEM COMM_PROTOCOL SSL (see TLS).

Default SSL_CIPHERS (as of FairCom DB V12.5)

ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256

 

 

SSL_CONNECTIONS_ONLY

SSL_CONNECTIONS_ONLY <YES/NO>

(optional) - Default: NO. If this option is specified with a value of YES, only TCP/IP connections that use SSL/TLS are permitted to connect to the FairCom DB Server. Otherwise, both unencrypted and SSL-enabled TCP/IP connections are allowed.

Must be specified within SUBSYSTEM COMM_PROTOCOL SSL (see TLS).

 

STARTUP_BLOCK_LOGONS

STARTUP_BLOCK_LOGONS

Prevents non-ADMIN user logons when the server is started. Only users in the ADMIN group are allowed to logon.

This feature allows the server to start for ADMIN purposes before authorizing access by non-ADMIN users. This could include creating or adjusting files, adjusting security options, or any other operations that require a functioning Server but are more conveniently accomplished when users are not connected to the Server.

Default: Allow logons

Allow SIGNAL_READY and ADMIN SQL Connections

A revision changes the behavior of STARTUP_BLOCK_LOGON for FairCom DB SQL Server so that SIGNAL_READY and the SQL listener threads run immediately. For SQL connections there is a choice of two behaviors when logons are blocked at server startup:

  1. The configuration option STARTUP_BLOCK_LOGON YES only allows ISAM connections by the ADMIN user. SQL connections are rejected with the new error code 1158 (SQL_LOGON_BLOCKED_ERR, "SQL connection is blocked from logon due to server startup logon block").
  2. The configuration option STARTUP_BLOCK_LOGON YES:ALLOW_SQL allows both ISAM and SQL connections by the ADMIN user.

Compatibility Change: This revision changes the behavior of STARTUP_BLOCK_LOGON for FairCom DB SQL Server.

Affected Components: c-treeSQL Server

 

VERIFY_CLIENT_CERTIFICATE

VERIFY_CLIENT_CERTIFICATE { YES | NO }

default NO - The server requires the client to supply an X.509 certificate. Unless X509_AUTHENTICATION is enabled, a username and password must still be supplied by the client.

Must be specified within SUBSYSTEM COMM_PROTOCOL SSL (see TLS).

 

X509_AUTHENTICATION

x509_AUTHENTICATION { YES | NO }

Default is NO. If the client provides an X.509 certificate at logon, use it for authentication and database authorization rather than a username/password. By default, the only trusted CA is the root CA of the SERVER_CERTIFICATE_FILE. The SERVER_CERTIFICATE_FILE must provide a complete certificate chain beginning with the certificate of the server and ending with the root CA. The client X.509 certificate must be signed by the same root CA as the server. Combine with VERIFY_CLIENT_CERTIFICATE YES to make X.509 authentication mandatory.

Must be specified within SUBSYSTEM COMM_PROTOCOL SSL (see TLS).

NOTE: X.509 authentication is not supported in combination with LDAP authentication.

If X509_AUTHENTICATION is enabled, the following keywords are used to extract a username from the subject field of a successfully authenticated client X.509 certificate.

NOTE: All name matching is case insensitive, as is the resulting user name used for login.

  • X509_PATH <RDN> - Mandatory. Specifies which relative distinguished name (RDN) component of the full distinguished name (DN) to parse. This should be specified using the short form name, such as CN rather than CommonName. Typical values would be X509_PATH CN or X509_PATH emailAddress
  • X509_PREFIX <prefix> - Optional. If specified the value found in X509_PATH must contain this prefix, which is removed when forming the username.
  • X509_DELIMITER <suffix> - Optional. If specified the value found in X509_PATH must contain this suffix, which is removed when forming the username.
  • X509_REQUIREMENT_PATH <RDN> - Optional. If specified, the DN must contain this RDN.
  • X509_REQUIREMENT <value> - Optional. If specified, the RDN specified by X509_REQUIREMENT_PATH must match this value.

 

Example

Given the following server configuration:

X509_AUTHENTICATION YES

X509_PATH CN

X509_REQUIREMENT_PATH O

X509_REQUIREMENT faircom inc

A valid certificate with the subject:

Subject: C=US, ST=Missouri, O=FairCom Inc, OU=R&D, CN=John Doe/emailAddress=john.doe@faircom.com

would resolve the user name as “John Doe”.

A valid certificate with the subject:

Subject: C=US, ST=Missouri, O=Acme Inc, OU=R&D, CN=admin/emailAddress=john.doe@gmail.com

would not resolve a user name, as “Acme Inc” does not match the x509_REQUIREMENT “FairCom Inc” and an error would be returned.

 

Database Backup

 
DYNAMIC_DUMP_DEFER

Allows an administrator to reduce the performance impact of the dynamic dump.

 
DYNAMIC_DUMP_DEFER_INTERVAL

Specifies the number of 64 KB blocks that are written before the DYNAMIC_DUMP_DEFER sleep is performed.

 
PERMIT_NONTRAN_DUMP

Improves backup performance by skipping non-transaction files and pre-image files during a dynamic dump.

 
PREIMAGE_DUMP

Causes all PREIMG files, even those not in a dynamic dump, to be temporarily changed to TRNLOG files and all transactions to be changed from PREIMG mode to TRNLOG mode during the dump.

 
VSS_WRITER

When enabled, FairCom DB loads the Volume Shadow Copy Service (VSS) writer DLL (c‑treeACEVSSWriter.dll) and initializes the VSS writer when the server starts.

 
Diagnostics

Diagnostics keywords are intended to be used to help collect data to be analyzed for troubleshooting. The use of these keywords should be avoided in normal operation as they may cause additional overhead (e.g., logging).

 
DIAGNOSTICS DYNDUMP_LOG

Generates dynamic dump status info, sending progress entries during each dynamic dump to CTSTATUS.FCS.

 
DIAGNOSTICS VSS_WRITER

Enables VSS writer to log diagnostic messages to CTSTATUS.FCS.

 

DYNAMIC_DUMP_DEFER

DYNAMIC_DUMP_DEFER <milliseconds>

When a dynamic dump runs, the disk read and write operations of the backup process can slow the performance of other database operations. This option allows an administrator to reduce the performance impact of the dynamic dump.

milliseconds is the time that the dynamic dump thread will sleep after each write of a 64KB block of data to the dump backup file.

An application developer can also use the c-tree ctSETCFG() API function to set the DYNAMIC_DUMP_DEFER value. For example, the following call specifies a 10-millisecond DYNAMIC_DUMP_DEFER time:

  • ctSETCFG( setcfgDYNAMIC_DUMP_DEFER, "10" );

The DYNAMIC_DUMP_DEFER value set by a call to ctSETCFG() takes effect immediately, so this API call can be used by administrators to adjust the speed of a running dynamic dump depending on the amount of other database activity.

Note: The maximum allowed DYNAMIC_DUMP_DEFER time is 5000 milliseconds, set at compile-time. If a value is specified that exceeds this limit, the DYNAMIC_DUMP_DEFER time is set to DYNAMIC_DUMP_DEFER_MAX.

The FairCom DB Administrator utility, ctadmn, was also updated to support the dump sleep time option to change this value at run time. The "Change Server Settings" menu is available from the main menu of the ctadmn utility.

See Also

 

DYNAMIC_DUMP_DEFER_INTERVAL

DYNAMIC_DUMP_DEFER_INTERVAL <blocks>

<blocks> specifies the number of 64 KB blocks that are written before the DYNAMIC_DUMP_DEFER sleep is performed.

The DYNAMIC_DUMP_DEFER option causes the dynamic dump to pause for the specified number of milliseconds each time it writes 64 KB of data to the dynamic dump stream file. For large backups, even the smallest DYNAMIC_DUMP_DEFER value of 1 millisecond adds significant time to the dynamic dump. For example, 100 GB = 1600000 * 1 ms. = 1600 seconds of additional time.

Note: If a value greater than 5000 is specified for DYNAMIC_DUMP_DEFER_INTERVAL, the value is set to 5000. If a value less than 1 is specified, the value is set to 1.

This option can be set by the ctSETCFG() API function. A new menu option to set this value has been added to option 10 of the FairCom DB Server Administration (ctadmn) menu.

Example

DYNAMIC_DUMP_DEFER_INTERVAL 16

Causes the DYNAMIC_DUMP_DEFER sleep to occur after every 64 KB * 16 = 1 MB of data written to the dump stream file.

 

DYNAMIC_DUMP_SYNC_INTERVAL

To reduce the amount of cache the file system devotes to the dynamic dump file, a server configuration keyword allows specifying a periodic file sync operation on the backup generated by dynamic dump approximately every <size> bytes written.

DYNAMIC_DUMP_SYNC_INTERVAL <size> [<scale>]

  • <size> must be less than 4GB. Default size is 0, which results in no explicit sync calls on the backup file. The minimum <size> is 1 MB. Non-zero values less than 1MB are increased to 1MB.

This value can be changed at runtime using menu option 10 in the ctadmn command-line utility.

 

PERMIT_NONTRAN_DUMP

PERMIT_NONTRAN_DUMP < YES | NO >

Improves backup performance by skipping non-transaction files and pre-image files during a dynamic dump.

Default: YES

When set to NO, non-transaction files and pre-image files are skipped during a dynamic dump even if they are included in the !FILES section of the dynamic dump configuration script. The exception is if PREIMAGE_DUMP is set to YES, then pre-image files continue to be included in the dump.

 

PREIMAGE_DUMP

PREIMAGE_DUMP <YES | NO>

When enabled, all PREIMG files, even those not in a dynamic dump, are temporarily changed to TRNLOG files to be compatible with the upgraded transactions, and all transactions are automatically changed from PREIMG mode to TRNLOG mode during the dump. PREIMG files opened or created in the middle of the dump are also temporarily promoted from PREIMG files to TRNLOG files. All promoted files are restored to their PREIMG status at the conclusion of the dynamic dump.

The dynamic dump script file accepts a !DELAY parameter whose argument is the number of seconds to wait for a transaction to complete before aborting it in order to permit the start of a dynamic dump. When the PREIMAGE_DUMP facility is used, the !DELAY parameter is effectively ignored if a long PREIMG transaction begins prior to the dynamic dump. This means the dump will not begin until all current transactions complete. See Dynamic Dump and Advanced - Faster Auto-Recovery for additional information.

Default: NO

See Also

AUTO_PREIMG

AUTO_TRNLOG

AUTO_TRNLOG_LIGHT

DIAGNOSTICS AUTO_TRNLOG_CHECKLOCK

DIAGNOSTICS AUTO_PREIMG_CHECKLOCK

DIAGNOSTICS AUTO_TRNLOG_CHECKREAD

DIAGNOSTICS AUTO_PREIMG_CHECKREAD

 

VSS_WRITER

VSS_WRITER YES

With this option enabled, FairCom DB loads the Volume Shadow Copy Service (VSS) writer DLL (c-treeACEVSSWriter.dll) and initializes the VSS writer when the server starts. A FULL CONSISTENCY VSS backup of FairCom database files will be created, which is comparable to cleanly shutting down the FairCom server and then backing up all files.

For application files that are under full transaction control, a FULL CONSISTENCY VSS backup is more time-consuming and invasive than strictly required. Application files with the ctTRNLOG property are under full transaction control. If full transaction controlled files and the database transaction logs (L*.FCS and S0*.FCS) are included in backups, a normal database automatic recovery takes place at startup and will properly restore CRASH CONSISTENT backed up data. Do NOT enable VSS_WRITER YES in ctsrvr.cfg, on application files that are under full transaction control.

Note: VSS backups require the Volume Shadow Copy service to be running. If this Windows service is set to start manually or is off by default, it needs to be started before VSS backup will work.

The following message is logged in CTSTATUS.FCS indicating the VSS writer has been started:

Mon Sep 13 14:11:27 2010

- User# 00001 VSS Init: Successfully started the VSS writer.

If you run the command “vssadmin list writers” on a machine with FairCom DB Server running and a properly configured VSS, the list should include c‑treeACEVSSWriter.

Compatibility Notes

  • The FairCom VSS writer is compatible with the backup utilities provided in the server versions of Windows.
  • The Windows backup software provided in desktop versions of Windows (the Enterprise edition of Windows 7 and Windows 8) is not a VSS-compatible backup provider and therefore will not work with the FairCom VSS writer.
  • Windows Server backup (2008 & 2012) is a VSS provider and works with the FairCom VSS writer.
  • Acronis Backup has been tested on Windows 7 (both 32-bit and 64-bit) and works correctly with the FairCom VSS writer when configured with ctsrvr.dds.
  • The Novastor backup utility has been tested on non-server versions of Windows and works correctly with the FairCom VSS writer when configured with ctsrvr.dds.
  • Other third-party backup utilities may work with the FairCom VSS writer if they are VSS-compatible backup providers. Please check with the manufacturer of your backup utility for information about VSS compatibility.

User Permissions

FairCom VSS Writer is intended to be run by users with Administrator permissions. To avoid permission issues when running the VSS Writer with a user that is not an Administrator, you must perform the following operations on the Windows registry:

  1. Run the Windows regedit command.
  2. Browse to find the Key: HKEY_LOCAL_MACHINE>SYSTEM>CurrentControlSet>Services>VSS>VssAccessControl
  3. Insert a new REG_DWORD value with the following syntax DOMAINNAME\USERNAME. For example, if your domain is MYDomain and your user name is User, enter: MYDomain\User
  4. Set the newly created key to the hexadecimal value of 1.
  5. Restart the computer to apply the changes.

Files to Be Backed Up

The VSS writer needs a list of files that are considered as under the server's control. This information must be located in the file ctsrvr.dds residing in the server's working directory (where the faircom.exe is located). For the VSS backup, only entries between !FILES and !END are relevant. There is no directory recursion, so wildcards will not be matched in subdirectories.


!FILES

C:\FairCom\ctreeSDK\ctreeAPI\bin.sql\ctreeSQL.dbs\test1.dat

C:\FairCom\ctreeSDK\ctreeAPI\bin.sql\ctreeSQL.dbs\test1.idx

ctreeSQL.dbs\*.dat

ctreeSQL.dbs\*.idx

ctreeSQL.dbs\SQL_SYS\*

!END
 

This information tells the backup utility which files are under FairCom DB control. If the set of files being backed up does not intersect with the set of files listed in ctsrvr.dds, the VSS service does not interact with FairCom DB VSS writer, resulting in an invalid backup of any files open by the server.

While testing, it is recommended to run the FairCom DB SQL Server with DIAGNOSTICS VSS_WRITER in ctsrvr.cfg. When the VSS writer is correctly configured, you should see entries logged to CTSTATUS.FCS like those listed in VSS Diagnostic Logging.

See Also

DIAGNOSTICS VSS_WRITER

 

VSS_WRITER_QUIESCE_TIMEOUT

VSS_WRITER_QUIESCE_TIMEOUT <seconds>

Default: 5 seconds

VSS writer now supports setting the quiesce timeout value. The value can be set in ctsrvr.cfg by specifying the configuration option VSS_WRITER_QUIESCE_TIMEOUT <seconds>, where <seconds> is the time in seconds. If the value is negative, the default value is used.

This setting can also be changed dynamically at runtime using ctadmn (option 10, then option 10) to set the VSS_WRITER_QUIESCE_TIMEOUT option value or by calling ctSETCFG(setcfgCONFIG_OPTION, "VSS_WRITER_QUIESCE_TIMEOUT <seconds>").

Note: To use the updated VSS Writer, you must install the updated server. It is not sufficient to drop in the VSS DLL under the older server.

 

DIAGNOSTICS DYNDUMP_LOG

DIAGNOSTICS DYNDUMP_LOG

The DIAGNOSTICS DYNDUMP_LOG keyword generates dynamic dump status info, sending progress entries during each dynamic dump to CTSTATUS.FCS, including an entry for each file it attempts to dump.

Default: OFF

 

DIAGNOSTICS VSS_WRITER

DIAGNOSTICS VSS_WRITER

The following FairCom DB configuration option enables VSS writer diagnostic logging (this can be enabled dynamically on the fly with server administrator utilities):

DIAGNOSTICS VSS_WRITER

When enabled, the VSS writer logs diagnostic messages to CTSTATUS.FCS. These messages indicate the sequence of operations to which the VSS writer is responding. Some examples are shown below:


Tue Sep 14 15:44:05 2010

- User# 00016 VSS Diag: [0x1098] c-treeACEVSSWriter::OnIdentify called

Tue Sep 14 15:44:07 2010

- User# 00016 VSS Diag: [0x1098] c-treeACEVSSWriter::OnPrepareBackup called

Tue Sep 14 15:44:07 2010

- User# 00016 VSS Diag: [0x1098] (+) Component: CtreeACE

Tue Sep 14 15:44:07 2010

- User# 00016 VSS Diag: [0x1098] c-treeACEVSSWriter::OnPrepareSnapshot called

Tue Sep 14 15:44:07 2010

- User# 00016 VSS Diag: [0x1098] c-treeACEVSSWriter::OnFreeze called

Tue Sep 14 15:44:07 2010

- User# 00016 VSS Diag: [0x1098] QuietCtree(ctQTblockALL | ctQTflushAllFiles)...

Tue Sep 14 15:44:08 2010

- User# 00016 VSS Diag: [0x1098] c-treeACEVSSWriter::OnThaw called

Tue Sep 14 15:44:08 2010

- User# 00016 VSS Diag: [0x1098] QuietCtree(ctQTunblockALL)...

Tue Sep 14 15:44:08 2010

- User# 00016 VSS Diag: [0x1098] c-treeACEVSSWriter::OnPostSnapshot called

Tue Sep 14 15:44:10 2010

- User# 00016 VSS Diag: [0x1098] c-treeACEVSSWriter::OnIdentify called

Tue Sep 14 15:44:25 2010

- User# 00016 VSS Diag: [0x1098] c-treeACEVSSWriter::OnIdentify called

Tue Sep 14 15:44:26 2010

- User# 00016 VSS Diag: [0x1098] c-treeACEVSSWriter::OnBackupComplete called

Tue Sep 14 15:44:26 2010

- User# 00016 VSS Diag: [0x1098] c-treeACEVSSWriter::OnBackupShutdown called
 

Note: The VSS writer always logs error messages to the Windows event log, even if the DIAGNOSTICS VSS_WRITER option is not specified in the configuration file.

See Also

VSS_WRITER

 

Replication

Data replication is a powerful FairCom DB feature providing near real-time data availability between one or more servers. These options configure specific attributes of this optional feature.

 

DAYS_BEFORE_ARCHIVING_ACTION_RECORDS

Specifies the number of days before archiving action records. Default value is 14.

 

DAYS_BEFORE_ARCHIVING_EXCEPTION_RECORDS

Specifies number of days before archiving exception records. Default value is 14.

 

DAYS_BEFORE_ARCHIVING_LOG_RECORDS

Specifies number of days before archiving log records. Default value is 14.

 

DAYS_BEFORE_ARCHIVING_STATISTIC_RECORDS

Specifies number of days before archiving statistics records. Default value is 2.

 

DAYS_BEFORE_PURGING_ACTION_RECORDS

Specifies number of days before purging action records. Default value is 90.

 

DAYS_BEFORE_PURGING_EXCEPTION_RECORDS

Specifies number of days before purging exception records. Default value is 90.

 

DAYS_BEFORE_PURGING_LOG_RECORDS

Specifies number of days before purging log records. Default value is 90.

 

DAYS_BEFORE_PURGING_STATISTIC_RECORDS

Specifies number of days before purging statistics records. Default value is 7.


MAX_REPL_LOGS (MAX_REPL_LOGS, MAX_REPL_LOGS)

Changes the limit FairCom Server sets for the number of active transaction logs that are kept for Replication Agent processing.

 
REPLICATE

Specifies which files are required to be replicated via the Replication Agent.

 
REPL_IDENTITY_USE_MASTER

Forces the local FairCom DB process to use the serial number value from the master server when adding a record to a local replica.

 
REPL_IDENTITY_USE_SOURCE

Forces the target FairCom DB process to use the identity field value from the source server when adding a record to a replicated file.

 
REPL_MAPPINGS

Specifies a local filename mapping to a master server.

 
REPL_NODEID

Sets the replication node ID of a local c-tree Server.

 
REPL_READ_BUFFER_SIZE

Sets the size of the replication log read buffer.

 
REPL_SRLSEG_ALLOW_UNQKEY

Forces FairCom DB to allow an index that contains a SRLSEG segment to be the replication unique key.

 
REPL_SRLSEG_USE_MASTER

Forces a local FairCom DB process to fill in the serial number value from the master FairCom DB process when adding a record to a local replica.

 
REPL_SRLSEG_USE_SOURCE

Forces a FairCom DB process replication writer thread to fill in the serial number value from the source server when adding a record to a replicated file to preserve existing serial numbering.

 
Diagnostics

Diagnostics keywords are intended to be used to help collect data to be analyzed for troubleshooting. The use of these keywords should be avoided in normal operation as they may cause additional overhead (e.g., logging).

 
DIAGNOSTICS REPLICATE

Enables FairCom DB to log messages to CTSTATUS.FCS when a file that is being created or opened matches the filename specified for the REPLICATE keyword, and it does not meet replication requirements.

 

Auto-Numbering Replication Defaults Changed

In this release, changes were made to the FairCom Server defaults for replication behavior on SRLSEG and identity fields.

Compatibility Note: This is a change in behavior, but many of the FairCom Server configuration files included in FairCom products already contain this option so the behavior is already in effect in those cases. However, the FairCom RTG package did not include these options, so this will change the default behavior for FairCom RTG COBOL and FairCom ISAM.

The default values have been changed for the following options:

REPL_SRLSEG_ALLOW_UNQKEY now defaults to YES

This option allows a SRLSEG index to be used as a replication unique index. Without this option, a data file whose only unique index is a SRLSEG index would not qualify for replication. By changing this default to YES, the SRLSEG index can be used as a replication unique index, which is the commonly-expected behavior.

REPL_SRLSEG_USE_SOURCE now defaults to YES

This option uses the serial number value from the source FairCom Server when adding a record to a replicated file. This option applies to c-tree's asynchronous (source/target) replication model, in which a Replication Agent replicates changes from a source FairCom Server to a target FairCom Server. By changing this default to YES, records added to the target server will contain the SRLSEG value from the record on the source server, rather than the target server generating its own SRLSEG value for the new record. This default option corresponds to the behavior that is most likely to be expected.

REPL_SRLSEG_USE_MASTER now defaults to YES

This option uses the serial number value from the master FairCom Server when adding a record to a replicated file. This option applies to c-tree's synchronous (local/master) replication model, in which an update to a record on a local FairCom Server triggers an update to the record in the associated table on the master FairCom Server. By changing this default to YES, records added to the local server will contain the SRLSEG value from the record on the master server, rather than the local server generating its own SRLSEG value for the new record. This default option corresponds to the behavior that is most likely to be expected.

REPL_IDENTITY_USE_SOURCE now defaults to YES

This option uses the identity field value from the source FairCom Server when adding a record to a replicated file. This option applies to c-tree's asynchronous (source/target) replication model, in which a Replication Agent replicates changes from a source FairCom Server to a target FairCom Server. By changing this default to YES, records added to the target server will contain the identity field value from the record on the source server, rather than the target server generating its own identity field value for the new record. This default option corresponds to the behavior that is most likely to be expected.

REPL_IDENTITY_USE_MASTER now defaults to YES

This option uses the identity field value from the master FairCom Server when adding a record to a replicated file. This option applies to c-tree's synchronous (local/master) replication model, in which an update to a record on a local FairCom Server triggers an update to the record in the associated table on the master FairCom Server. By changing this default to YES, records added to the local server will contain the identity field value from the record on the master server, rather than the local server generating its own identity field value for the new record. This default option corresponds to the behavior that is most likely to be expected.

 

MAX_REPL_LOGS

MAX_REPL_LOGS <max_logs>

Changes the limit FairCom Server sets for the number of active transaction logs that are kept for deferred index and Replication Agent processing.

In V12 and later, the default is 100; prior to V12, the default was 50.

Specifying a value of zero for <max_logs> removes the limit.

Tip - If you find error 96 on startup due to logs not found, it is likely be due to MAX_DFRIDX_LOGS or MAX_REPL_LOGS settings removing logs after the max is reached. Be sure to review your operational environment for appropriate settings.

See also:

 

REPLICATE

REPLICATE <filename>

Server Configuration Option

The easiest method to define files that should be replicated is directly at the source using the REPLICATE keyword:

REPLICATE <filename>

When included in ctsrvr.cfg this specifies which file(s) to enable transaction log information for replication. Multiple REPLICATE statements are allowed. The file name may include wildcard characters (see FairCom DB Standard Wildcards). Multiple entries are supported.

Note: Choose wild cards carefully as certain FairCom files, such as REPLSTATEDT.FCS, must not be replicated. For example, REPLICATE *.dat is preferable to REPLICATE *. Another set of files that can be unexpectedly affected are c-tree Superfile members that match a wildcard specification.

External XML File Filters

File definitions can be specified by an external XML definition. This allows dynamically enabling replication without stopping and starting servers for configuration changes. This file can be set in ctreplagent.cfg and changed at runtime using repadm -c changefilter and -c removefilter with -x option indicating the external filter file name. repadm requests the replication agent to perform the specified filter operation and the replication agent applies the filter to the source server if the purposes indicate that it applies to the source server.

XML file filters are defined as follows:

 

<?xml version="1.0" encoding="us-ascii"?>

<replfilefilter version="1" update="1" persistent="y">

<file status="include">mark.dat</file>

 

<file status="exclude">donotreplicate*.dat</file>

 

<file status="include" regexPath=".\ctreeSQL.dbs">.*((data|dat|db))</file>

 

<purpose>create_file</purpose>

<purpose>open_file</purpose>

<purpose>read_log</purpose>

<purpose>sync_commit</purpose>

</replfilefilter>

 

 

Attributes

version="1.0" is the XML format version defining the current specification.

persistent="y" persists the filter definition on the source source such that it is automatically loaded on startup. REPLFFCHGDT.FCS

update="1" Processes an update to the current file filter.

Elements

<file> - list of files to include or exclude from replication. This supports regular expressions. The regexPath tag specifies an optional path as a regular expression and is applied to only the file name without path.

<purpose> indicates the purposes of the filter.

  • open_file - applies names to the source server like the server configuration REPLICATE does. This enables matching files for replication.
  • read_log - applies to the source server to determine which log entries are returned to the replication log reader like original replication file filter does.
  • sync_commit - makes a synchronous commit of the specified replicated file
  • create_file - create file on target if it doesn't exist

See Also

file_filter

 

Note: The low-level FairCom DB UpdateHeader() API can be used to enable replication on a per file basis. Use the ctREPLCIATEhdr mode with either NO (off) or YES (on) for the hdrval. If the file does not have an extended header, then the change will not persist once the file is closed and reopened. Because failure to enforce replication is a serious problem, UpdateHeader() returns a special error code, -EXTH_ERR (-734), when the request succeeds, but the file header is not extended. This is more of a warning than an error.

See Also

 

REPL_IDENTITY_USE_MASTER

REPL_IDENTITY_USE_MASTER <YES | NO>

Forces the local FairCom DB process to use the serial number value from the master server when adding a record to a local replica.

See Also

 

REPL_IDENTITY_USE_SOURCE

REPL_IDENTITY_USE_SOURCE <YES | NO>

Forces the target FairCom DB process to use the identity field value from the source server when adding a record to a replicated file.

See Also

 

REPL_MAPPINGS

REPL_MAPPINGS <mapfilename>

Specifies a local filename mapping to a master server. Multiple instances of this keyword can be used.

This keyword also forces the local FairCom DB process to attempt to load the multi-threaded c-tree client library (mtclient.dll or libmtclient.so), which it uses to communicate with a master FairCom DB process. If this library cannot be loaded, or if it does not contain the required functions, FairCom DB fails to start with the error TR_CLIL_ERR (850, Transactional replication: Failed to start c-tree remote client subsystem: see CTSTATUS.FCS for details).

See Also

 

REPL_NODEID

REPL_NODEID <nodeid>

The FairCom Server assigns a node ID to FairCom Replication. The Local/Master replication scheme also assigns a node ID to connections that are established from the target server to the source server.

A local c-tree Server can set its replication node ID by using the REPL_NODEID option in ctsrvr.cfg. For example, consider a source server and two target servers:

; source server configuration

SERVER_NAME MASTER

REPL_NODEID 10.0.0.1


; target server 1 configuration

SERVER_NAME LOCAL01

REPL_NODEID 10.0.0.2


; target server 2 configuration

SERVER_NAME LOCAL02

REPL_NODEID 10.0.0.3

ID values are arbitrary and do not need to match the IP address of the system on which the c-tree Server is running. They only need to be unique and not change during replication. (This example demonstrates IP v4 addresses.)

FairCom Replication reads the node ID of the source and target servers. If the node ID is not set for a source or target server, FairCom Replication uses the IP address of the system on which that FairCom DB is running.

Note: REPL_NODEID should be used if the entry for source_server or target_server in ctreplagent.cfg does not specify an IP address (e.g., if localhost or the DNS name is used).

Dynamically Set Replication Node ID

A replication node ID value (REPL_NODEID) associates a Replication Agent to a specific source or target server. Having this required association prevents Replication Agents from arbitrarily connecting to inappropriate servers. Setting a REPL_NODEID required modifying the server configuration file, ctsrvr.cfg, and restarting a server, which is challenging in round-the-clock production environments.

c-tree Server now supports setting a REPL_NODEID value dynamically at runtime if it has not yet been set. This keyword sets the node ID of a local c-tree Server for use in replication.

To set the value, use the ctadmn utility's option to change a server configuration option value using option 10 or call the ctSETCFG() function as shown here:

NINT rc;

rc = ctSETCFG(setcfgCONFIG_OPTION, value);

where value is the REPL_NODEID value to set, specified as a NULL-terminated string in IPv4 format (n.n.n.n.), for example "10.0.0.1". (ID values are arbitrary and do not need to match the IP address of the server.)

Note that the value is only changed in memory and not persisted to disk. Be sure to update the configuration file such that the new value is persisted and enabled on the next server startup.

 

REPL_READ_BUFFER_SIZE

REPL_READ_BUFFER_SIZE <size>

Sets the size of the replication log read buffer. Specify a value of zero to disable the use of the replication log read buffer.

Default: 8K

See Also

 

REPL_SRLSEG_ALLOW_UNQKEY

REPL_SRLSEG_ALLOW_UNQKEY <YES | NO>

Forces FairCom DB to allow an index that contains a SRLSEG segment to be the replication unique key.

See Also

 

REPL_SRLSEG_USE_MASTER

REPL_SRLSEG_USE_MASTER <YES | NO>

Forces a local FairCom DB process to fill in the serial number value from the master FairCom DB process when adding a record to a local replica. (Synchronous master/local replication model.)

See Also

 

REPL_SRLSEG_USE_SOURCE

REPL_SRLSEG_USE_SOURCE <YES | NO>

Forces a FairCom DB process replication writer thread to fill in the serial number value from the source server when adding a record to a replicated file. (Standard replication model.) This preserves existing serial numbering.

See Also

 

DIAGNOSTICS REPLICATE

DIAGNOSTICS REPLICATE

The configuration option DIAGNOSTICS REPLICATE enables FairCom DB to log messages to CTSTATUS.FCS when a file that is being created or opened matches the filename specified for the REPLICATE keyword, and it does not meet replication requirements. This is useful in initial setup to determine unexpected replication failures.

Sample Output

Mon Apr 09 10:48:21 2012

- User# 00014 REPLICATE_DIAG: None of the indexes for the file mark.dat qualify as a replication unique key:

Mon Apr 09 10:48:21 2012

- User# 00014 REPLICATE_DIAG: index 1 is not unique

Mon Apr 09 10:48:21 2012

- User# 00014 REPLICATE_DIAG: index 1 supports null keys

Mon Apr 09 10:48:21 2012

- User# 00014 REPLICATE_DIAG: index 2 is not unique

Mon Apr 09 10:48:21 2012

- User# 00014 REPLICATE_DIAG: index 3 is not unique

Mon Apr 09 10:48:21 2012

- User# 00014 REPLICATE_DIAG: index 3 supports null keys

Mon Apr 09 10:48:21 2012

- User# 00014 REPLICATE_DIAG: index 3 contains a SRLSEG segment

The SetSystemConfigurationOption() API function can be used to turn this diagnostic option on and off at run time.

 

Unicode

FairCom DB Unicode support requires a custom server build enabling this feature. Please contact your nearest FairCom office for current availability options.

 

ICU_LOCALE

Specifies a language (ISO-639), a country (ISO-3166), and any system-dependent options.

 

ICU_OPTION

Specifies an option.

 

LANGUAGE

Support the r-tree language feature in an r-tree enabled server.

 

XTDKSEG_SEG_TYPE

Specifies a server default for each type of extended segment definition supported.

 

XTDKSEG_SRC_TYPE

Specifies a type.

 

XTDKSEG_SRC_SIZE

Specifies a size.

 

XTDKSEG_FAILED_DEFAULT_OK

Specifies if the server can begin if server default encounters an error.

 

ICU_LOCALE

ICU_LOCALE <locale string: xx_YY_Variant>

Where “xx” is the language as specified by ISO-639 (e.g., “fr” for French); ‘Y’ is a country as specified by ISO-3166 (e.g., “fr_CA” for French language in Canada); and the “Variant” portion represents system dependent options.

See Also

ICU_OPTION, LANGUAGE, XTDKSEG_SEG_TYPE, XTDKSEG_SRC_TYPE, XTDKSEG_SRC_SIZE, XTDKSEG_FAILED_DEFAULT_OK

 

ICU_OPTION

ICU_OPTION <option>

Where <option> is one of the following:

STRENGTH_PRIMARY

STRENGTH_SECONDARY

STRENGTH_TERTIARY

STRENGTH_QUATERNARY

STRENGTH_IDENTICAL

STRENGTH_DEFAULT

NORM_NONE

NORM_CAN_DECMP

NORM_CMP_DECMP

NORM_CAN_DECMP_CMP

NORM_CMP_DECMP_CAN

NORM_DEFAULT

LOCALE_SYSDEFAULT_NOTOK

LOCALE_FALLBACK_NOTOK

ATTR_FRENCH_ON

ATTR_FRENCH_OFF

ATTR_CASE_ON

ATTR_CASE_OFF

ATTR_DECOMP_ON

ATTR_DECOMP_OFF

ATTR_SHIFTED

ATTR_NONIGNR

ATTR_LOWER

ATTR_UPPER

ATTR_HANGUL

A configuration file may contain many ICU_OPTION entries. Some combinations of entries do not make sense and the behavior is not guaranteed if they are combined. For instance, using both of these entries is inappropriate:

ICU_OPTION ATTR_LOWER

ICU_OPTION ATTR_UPPER

See Also

ICU_LOCALE, LANGUAGE, XTDKSEG_SEG_TYPE, XTDKSEG_SRC_TYPE, XTDKSEG_SRC_SIZE, XTDKSEG_FAILED_DEFAULT_OK

 

LANGUAGE

LANGUAGE

Support the r-tree language feature in an r-tree enabled server. The following arguments are supported:

ENGLISH

ITALIAN

SPANISH

PORTUGUES

SJIS

EUC

If more than one entry exists in the configuration file, the last occurrence is used.

Note: Refer to the Unicode documentation for complete details regarding this support.

See Also

ICU_LOCALE, ICU_OPTION, XTDKSEG_SEG_TYPE, XTDKSEG_SRC_TYPE, XTDKSEG_SRC_SIZE, XTDKSEG_FAILED_DEFAULT_OK

 

UNCSEG_KEYCOMPRESS

UNCSEG_KEYCOMPRESS YES | NO

Used to force indexes that contain a key segment using a Unicode key segment mode to be created with c-tree leading and padding key compression.

By default, this option is OFF. To enable this option, add the following to ctsrvr.cfg:

This option can also be enabled or disabled at runtime using the ctadmn utility's option to change a server configuration option value or programmatically calling ctSETCFG().

 

XTDKSEG_SEG_TYPE

XTDKSEG_SEG_TYPE UNICODE_ICU

Specifies a server default for each type of extended segment definition supported.

Example

XTDKSEG_SEG_TYPE UNICODE_ICU

ICU_LOCALE "ar"

XTDKSEG_SRC_SIZE 12

XTDKSEG_SRC_TYPE UTF8

ICU_OPTION STRENGTH_TERTIARY

ICU_OPTION NORM_DEFAULT

See Also

ICU_LOCALE, ICU_OPTION, LANGUAGE, XTDKSEG_SRC_TYPE, XTDKSEG_SRC_SIZE, XTDKSEG_FAILED_DEFAULT_OK

 

XTDKSEG_SRC_TYPE

XTDKSEG_SRC_TYPE <type>

Where <type> is one of:

PROVIDED

UTF8

UTF16

See Also

ICU_LOCALE, ICU_OPTION, LANGUAGE, XTDKSEG_SEG_TYPE, XTDKSEG_SRC_SIZE, XTDKSEG_FAILED_DEFAULT_OK

 

XTDKSEG_SRC_SIZE

XTDKSEG_SRC_SIZE <size>

Where <size> is one of:

PROVIDED

COMPUTED

<numeric value>

See Also

ICU_LOCALE, ICU_OPTION, LANGUAGE, XTDKSEG_SEG_TYPE, XTDKSEG_SRC_TYPE, XTDKSEG_FAILED_DEFAULT_OK

 

XTDKSEG_FAILED_DEFAULT_OK

XTDKSEG_FAILED_DEFAULT_OK <YES | NO>

  • YES - Server can still begin if server default encounters an error.
  • NO - Server cannot continue on error, which is the default behavior.

See Also

ICU_LOCALE, ICU_OPTION, LANGUAGE, XTDKSEG_SEG_TYPE, XTDKSEG_SRC_TYPE, XTDKSEG_SRC_SIZE

 

File Mirroring

Mirroring duplicates FairCom DB data between two specified volumes as a legacy backup strategy. These options control various aspects of mirroring for multiple types of c-tree files.

 
ADMIN_MIRROR

Sets the location where FAIRCOM.FCS is mirrored.

 
LOG_EVEN_MIRROR

Specifies an alternative path and name for even-numbered secondary transaction log files.

 
LOG_ODD_MIRROR

Specifies an alternative path and name for odd-numbered secondary transaction log files.

 
MIRROR_DIRECTORY

Permits mirrored files WITHOUT AN ABSOLUTE PATH NAME to be placed in a specified mirror directory.

 
MIRRORS

Turns off all mirroring when or allows ordinary operation in which the filename determines whether or not file mirroring is in effect on a file-by-file basis.

 
SKIP_MISSING_LOG_MIRRORS

Specifies if the FairCom DB Server should NOT terminate automatic recovery if it cannot find a log mirror to be recovered along with the primary file.

 
SKIP_MISSING_MIRRORS

Specifies if the FairCom DB Server should NOT terminate automatic recovery if it cannot find a mirror to be recovered along with the primary file.

 
START_EVEN_MIRROR

Specifies the alternative name for even numbered secondary start file.

 
START_ODD_MIRROR

Specifies the alternative name for odd numbered secondary start file.

 

ADMIN_MIRROR

ADMIN_MIRROR <mirror_path\FAIRCOM.FCS>

Sets the location where FAIRCOM.FCS is mirrored.

Permits FAIRCOM.FCS to be mirrored. For example, where mirror_path is the path to the secondary storage location for FAIRCOM.FCS.

This configuration option can include an environment variable name that will be substituted with its value when the configuration file is read.

Default: No log mirror

 

LOG_EVEN_MIRROR

LOG_EVEN_MIRROR <full_path>L

The alternative name for even numbered secondary transaction log files. This keyword allows the even numbered secondary transaction log files to be mirrored to a location other than the primary transaction log files. This name must be in the form of an optional directory path and the single character ‘L’ (e.g., E:\LOG2EVEN\L). The transaction management logic automatically appends a seven-digit even number and the extension .FCS to the path provided.

This configuration option can include an environment variable name that will be substituted with its value when the configuration file is read.

Default: No log mirrors

See Also

LOG_ODD_MIRROR

MIRRORS

MIRROR_DIRECTORY

 

LOG_ODD_MIRROR

LOG_ODD_MIRROR <full_path>L

The alternative name for odd numbered secondary transaction log files. This keyword allows the odd numbered secondary transaction log files to be mirrored to a different location than the primary transaction log files. This name must be in the form of an optional directory path and the single character ‘L’ (e.g., F:\LOG2ODD\L). The transaction management logic automatically appends a seven-digit even number and the extension .FCS to the path provided.

This configuration option can include an environment variable name that will be substituted with its value when the configuration file is read.

Default: No log mirrors

See Also

LOG_EVEN_MIRROR

MIRRORS

MIRROR_DIRECTORY

 

MIRROR_DIRECTORY

MIRROR_DIRECTORY <directory name>

Permits mirrored files WITHOUT AN ABSOLUTE PATH NAME to be placed in a specified mirror directory. This is analogous to LOCAL_DIRECTORY except that it only applies to the mirror in a primary|mirror pair.

This configuration option can include an environment variable name that will be substituted with its value when the configuration file is read.

Default: Server directory or LOCAL_DIRECTORY

See Also

MIRRORS

LOG_EVEN_MIRROR

LOG_ODD_MIRROR

 

MIRRORS

MIRRORS <YES | NO>

Turns off all mirroring when set to NO. YES implies ordinary operation in which the filename determines whether or not file mirroring is in effect on a file-by-file basis. NO implies all mirror requests are ignored (including log files, administrative files, and all user mirrors). Set MIRRORS to NO only if there are strictly no plans to ever use file mirroring or during catastrophe recovery situations where the mirrored files may not be available due to a hardware problem. The absence of this keyword implies file mirrors are supported.

Logging of the message Following file is opened without mirror... to CTSTATUS.FCS is suppressed when the configuration file specifies MIRRORS NO, which disables the use of mirrors.

Default: YES

See Also

MIRROR_DIRECTORY

LOG_EVEN_MIRROR

LOG_ODD_MIRROR

 

SKIP_MISSING_LOG_MIRRORS

SKIP_MISSING_LOG_MIRRORS <YES | NO>

Accepts a YES/NO argument. With an argument of YES, the FairCom DB Server does NOT terminate automatic recovery if it cannot find a log mirror to be recovered along with the primary file.

Default: NO

See Also

 

SKIP_MISSING_MIRRORS

SKIP_MISSING_MIRRORS <YES | NO>

Accepts a YES/NO argument. With an argument of YES, the FairCom DB Server does NOT terminate automatic recovery if it cannot find a mirror to be recovered along with the primary file.

Default: NO

See Also

 

START_EVEN_MIRROR

START_EVEN_MIRRORS <full_path>S

The alternative name for even numbered secondary start file. The start file contains the location at which the automatic recovery routines begin to scan the transaction logs. There are two start files (numbered zero and one) to reduce the risk of losing the starting point for automatic recovery. This name must be in the form of a directory path and the single character ‘S’ (e.g., C:\START\S). The FairCom DB Server appends a seven-digit even number and the extension .FCS to the name provided.

This configuration option can include an environment variable name that will be substituted with its value when the configuration file is read.

Default: No start mirrors

See Also

START_EVEN

START_ODD

START_ODD_MIRROR

 

START_ODD_MIRROR

START_ODD_MIRRORS <full_path>S

The alternative name for odd numbered secondary start file. The start file contains the location at which the automatic recovery routines begin to scan the transaction logs. There are two start files (numbered zero and one) to reduce the risk of losing the starting point for automatic recovery. This name must be in the form of a directory path and the single character ‘S’ (e.g., C:\START\S). The FairCom DB Server appends a seven-digit odd number and the extension .FCS to the name provided.

This configuration option can include an environment variable name that will be substituted with its value when the configuration file is read.

Default: No start mirrors

See Also

START_EVEN

START_EVEN_MIRROR

START_ODD

 

Backward Compatibility

Compatibility keywords are frequently used to provide extended "non-standard" FairCom DB behavior or backward compatibility with previous behaviors as server functionalities are changed. Typically, these keywords should only be used under the specific advice of a FairCom engineer as they may negatively impact the functionality of your application. Frequently, these keywords are used as the result of a required change in server behavior resulting in incompatibility with legacy applications. Please don't hesitate to contact your nearest FairCom office should you have any questions regarding use of any of these keywords.

WARNING: The keywords in this section should be used ONLY on the advice of your application developer. They can seriously alter the operation of the FairCom DB Server.

 
COMPATIBILITY 6BTRAN_NOT_DEFAULT

Affects six-byte transaction number support.

 
COMPATIBILITY ABORT_ON_CLOSE

Disable “deferred close” capability.

 
COMPATIBILITY BATCH_SIGNAL

Causes sysiocod to be set to BTNO_COD (-844) on calls to BATSETX()/BATSET() that result in the current batch being closed.

 
COMPATIBILITY BATCH_UTRFMKEY

Reverts to this prior behavior of the order that keys returned with BATSET() called with BAT_RET_KEY

 
COMPATIBILITY BLOCK_DDSFM_CREATE and BLOCK_DDSFM_DELETE

Blocks superfile member creation and deletion during a dynamic dump.

 
COMPATIBILITY CHAR_SCHSEG

For compatibility with versions prior to V8, reverts the behavior of treating CT_CHAR fields as signed, one-byte integers.

 
COMPATIBILITY CHECKPOINT_OVERLAP

Reverts a change to the checkpoint logic causes checkpoint requests to wait for the completion of an in-process checkpoint before beginning even flushing operations.

 
COMPATIBILITY CHKPNT_FLUSHALL

Forces all checkpoints but the final checkpoint to use a single system call to flush file system buffers instead of individual calls for each file to ctsave().

 
COMPATIBILITY CHKPNT_MUTEX_REL

Forces transaction related mutexes to be released just before the checkpoint is written to disk instead of after. For FairCom internal use only.

 
COMPATIBILITY CLSFIL_ISAM

Reverts to behavior in which low-level commands were allowed to close files opened with ISAM-level opens.

 
COMPATIBILITY CLSFIL_UNBLOCK

Allows the file blocker to have the file open at the time of the unblock call.

 
COMPATIBILITY COMMPORT5000

Sets the default base value to add to the SERVER_NAME ASCII sum for determining the TCP/IP port number.

 
COMPATIBILITY CTREE_RWLOCK

Forces FairCom DB to use custom reader/writer lock support instead of Windows' reader/writer lock support even if the Windows system supports reader/writer locks.

 
COMPATIBILITY DIR_BUF_RQS

Disables changes that (a) avoid retries when the node holds the desired buffer and (b) skip the queue and directly request the holding semaphore. For internal FairCom testing only.

 

COMPATIBILITY DISABLE_BACKGROUND_CLEANUP

Disables attempts to do routine optimization of index nodes as they are flushed to disk by background index flush.


COMPATIBILITY DUPL_ERR_FATAL

Forces the index corrupt flag to be set for a DUPJ_ERR.

 
COMPATIBILITY ENCRYPT128

Reverts to the original 128-bit master key usage for encryption.

 
COMPATIBILITY ESTIMATE_SCALE

Reverts to prior behavior in which ESTKEY() returned the estimate to within 1/10 percent.

 
COMPATIBILITY EXACT_FILE_NAMES

Forces different references to the same file to use the same names.

 
COMPATIBILITY EXTENDED_TRAN_ONLY

Forces a R6BT_ERR (745) on an attempt to create or open a non-extended-transaction-number file.

 
COMPATIBILITY FAILED_TRAN_IO

Restores behavior of a failed write operation for transaction-controlled files terminating the server (or stand-alone application) with error L60 (ctcatend).

 
COMPATIBILITY FILE_CREATE_CHECKPOINT

Restores the old behavior of generating a checkpoint if a TRNLOG (but not TRANDEP) file is about to be deleted or renamed after a file, any file, is created but with no intervening checkpoint.

 
COMPATIBILITY FILE_DESCRIPTOR_LIMIT

Overrides the behavior described in FILES in case it is not convenient for a system administrator to set the file descriptor limit for the FairCom Server process to the required value or it is not desired to decrease the FILES or CONNECTIONS settings. This keyword is provided for backward compatibility or short-term use only - Other use is not recommended.

 
COMPATIBILITY FILELIST_GROWTH

Reverts a change that increased the rate at which an array grows by doubling in size up to 2 thousand files.

 
COMPATIBILITY LFL_WAIT

Eliminates the lflsema SHORTWAIT loop, and uses a call with the WAIT parameter. For internal FairCom use only.

 
COMPATIBILITY LFW_ADAPTIVE

Replaces the commit delay ct_udefer() call with a loop that permits the "prime" cohort to periodically wake up, after a much smaller defer time, and check for commit delay progress. For internal FairCom use only.

 
COMPATIBILITY LOCK_CACHE

Allows c-tree attempts to lock all data and index cache pages into physical memory, using the mlock() function on Unix systems. Currently disabled.

 
COMPATIBILITY LOCK_HEADER

Restores the use of lock table entries for header calls that acquire the header semaphore.

 
COMPATIBILITY LOG_ENCRYPT128

Reverts to the original 128-bit master key usage for log encryption.

 
COMPATIBILITY PUTHDR_COMMIT

Restores the original PUTHDR() behavior, which was changed such that on commit, the header value is not reset to the new value.

 
COMPATIBILITY MEMORY_FILE_SKIP_FREE

Skips the free of memory at server shutdown for the individual memory records for memory files still open and assume that the server termination will (automatically) return the memory to the system.

 
COMPATIBILITY MEMORY_LIMITS

Legacy V7 backward compatibility option that enforces system or user memory limits.


COMPATIBILITY MINIMUM_INDEX_BUFFERS

Restore the old behavior of increasing the number of index buffers to the required amount.

 
COMPATIBILITY MULTI_PROCESSOR

Legacy option to ensure proper statistics on multiple-processor hardware.

 
COMPATIBILITY NO_ADREXP_CHECK

Reverts the change in which a state variable is set so that an attempt to evaluate an address expression based on a DODA field will return an error instead of crashing the server.

 
COMPATIBILITY NO_ATODEP

Reverts the behavior concerning indexes' TRANDEP/RSTRDEL attributes during a rebuild or compact call without XCREblk support.

 
COMPATIBILITY NO_AUTO_SKIP

Disables support for treating TRANDEP files as though SKIP_MISSING_FILES is turned on.

 
COMPATIBILITY NO_BAT_FXDCMP

Restores the behavior prior to V11 when fixed-length compressed records were returned as variable-length records.

 
COMPATIBILITY NO_BLOCK_KILL

Disables the ADMIN ability to kill currently connected clients.

 
COMPATIBILITY NO_CHECKFIX

Reverts to the behavior before 2002 when the ADDREC() routine checks to see if a record begins with either a delete flag (0xFF) or a resource mark (0xFEFE).

 
COMPATIBILITY NO_CHKMBRNAMLEN

Reverts to the original behavior to address the situation where names may have been truncated but no conflicts arose and would now get error SNAM_ERR at create time.

 
COMPATIBILITY NO_CLSTRAN_OPEN

Reverts to the behavior of the recovery process, which was modified such that a CLSTRAN log entry will attempt to open the file (if it is not already opened).

 
COMPATIBILITY NO_COMMIT_READ_LOCK

Disables commit read lock support for backward compatibility.

 
COMPATIBILITY NO_DATAMAP_CHECK

Disables the check for mapping to the same data file as the currently-mapped file.


COMPATIBILITY NO_FIXED_OFFSET_CHECK

Disabled a feature that prevents attempts to write to arbitrary offsets in a fixed-length file.


COMPATIBILITY NO_FLUSH_DIR

Reverts to the old behavior which does not force the flushing of metadata to disk immediately after creates, renames, and deletes of transaction log files and transaction-dependent files.

 
COMPATIBILITY NO_IDFIELD_OVERFLOW_CONVERSION

Disables automatic conversion of the IDfield resource.

 
COMPATIBILITY NO_IDFIELD_OVERFLOW_DETECTION

Causes all tests for IDfield overflow/underflow to be ignored.

 
COMPATIBILITY NO_INIT_VSPACE

Reverts the behavior introduced in V8.14 concerning new space reserved at the end of a variable-length file and the entry that marked the preimage space as deleted if the transaction was aborted.

 
COMPATIBILITY NO_KEEP_OUT_TRNSEQ

Reverts behavior that allows TRANEND() to distinguish between a lock obtained within a prior transaction, and a lock obtained in its own transaction.

 
COMPATIBILITY NO_MYMARKS

Disables the new approach that immediately detects when all the key-level locks belong to the calling thread, and returns without checking each of the key-level locks enhancing performance. For internal FairCom testing only.

 
COMPATIBILITY NO_NXTMARKS

Disables the new behavior of the cleanup routine that only performs the clean up necessary to satisfy the NXTKEY() operation. For internal FairCom testing only.

 
COMPATIBILITY NO_RELBUF_CHECK

Disables a check for removing an updated buffer from the update list during a checkpoint was enabled.

 
COMPATIBILITY NO_REPL_DEFER_TRAN

Disables optimization that avoids sending transactions to a Replication Agent that did not replicate the files in that transaction.

 
COMPATIBILITY NO_SHUTDOWN_DELAY

Forces an instant shutdown without pause for client disconnect.

 
COMPATIBILITY NO_SIGNAL_HANDLER

Forces the server to skip the installation of signal handlers at server startup.

 
COMPATIBILITY NO_SMART_SAVE

Disables support to enable a ctsave() call to skip the file system sync if no bytes have been written since the last call to ctsave().

 
COMPATIBILITY NO_SPCMGT_QUEUE

Disables a dedicated background thread performs the space reclamation on deleted member files of a Superfile and recovered variable-length data files.

 
COMPATIBILITY NO_SYS_FLUSH_ON_CLOSE

Disables extra protection that causes a system cache flush before physically closing transaction logged files or write-through files.

 
COMPATIBILITY NO_TEST_LOCAL

Turns off the check of whether a file is local or remote.

 
COMPATIBILITY NO_TRAN_DISCONNECT

Disables support for the server disconnecting the client associated with the transaction if the need for more logs is caused by a pending transaction,

 
COMPATIBILITY NO_TRANDEP_SCAN

Disables additional transaction log pre-scanning done for improved handling of transaction-dependent file renames and deletes.

 
COMPATIBILITY NO_UNIQFILE

Disables attempts to determine if files accessed with different file names (or paths) and identical FairCom DB file IDs are the same file or different files.

 
COMPATIBILITY NO_VAR_PEOF

Disables logic that attempts to extend the physical file size and retry growing the record in place when the growth would exceed the PEOF.

 
COMPATIBILITY NO_VARLEN_TRAN_UNUSED

Reverts to the previous differentiated behavior in which space reclamation for TRANPROC and non-TRANPROC files is treated differently.

 
COMPATIBILITY NONADMIN_DYNDUMP

Allows all users (including non-admin) to perform a dynamic dump.

 
COMPATIBILITY NONADMIN_REPL

Disabled for security reasons. Allowed all users (including non-admin) to read transaction log entries via replication.

 
COMPATIBILITY NONADMIN_TRNHIST

Allows all users (including non-admin) to read transaction log histories.

 
COMPATIBILITY NONE

Used in conjunction with the tamper-proof settings file to block keyword from being used in a subsequent stage of configuration loading.

 
COMPATIBILITY OPEN_SHARE_RW

Restores the previous behavior of opening the files with read/write share access.

 
COMPATIBILITY PUTHDR_COMMIT

Disables the PUTHDR() behavior of creating pre-image space entries, restoring old value on abort, setting the new value at the time of the call, except that on commit the header value is not reset to the new value.

 
COMPATIBILITY RANGE_NO_NXTKEY

Disables the default of using NXTKEY() instead of GTKEY() to skip over records that do not meet range and/or filter criteria during range operations.

 
COMPATIBILITY REPLICATION_TRAN_LIST

Makes the checkpoint's beginning-log-position-list for active transactions included in checkpoints.

 
COMPATIBILITY REVERT_TO_V6HDR

Reverts to the V6 mode of only enabling extended headers for all newly created files with calls from an Xtd8 specific function and defining the XCREblk structure.

 
COMPATIBILITY REWRITE_KEY_ERROR

Disables the new behavior of the rewrite routines returning an error on a failed key assembly by default.

 
COMPATIBILITY SETEXCABT

Reverts to the previous approach of using a loop that repeatedly attempts to update the abort node list, once for each key-level lock in the node. For internal FairCom testing only.

 
COMPATIBILITY SPCMGT_INDEX

Forces FairCom DB to disable the reclamation of unused space management indexes with VLENGTH, TRNLOG data files

 
COMPATIBILITY STREAM_FILES

Forces FairCom DB to ignore the LOCAL_DIRECTORY configuration for stream files.

 
COMPATIBILITY SYNC_LOG

DEPRECATED - Instructs the FairCom DB Server to open its transaction logs in synchronous write (direct I/O on Solaris) mode. See COMPATIBILITY LOG_WRITETHRU.

 
COMPATIBILITY TCPIP_CHECK_DEAD_CLIENTS

Causes the FairCom DB Server detects when a TCP/IP client has dropped.

 
COMPATIBILITY TEMP_INDEX_ERROR

Disables behavior of ignoring a KDUP_ERR on a temp index and setting sysiocod to IDUP_COD (-837). Also affects temporary index behavior for ITIM_ERR on record reads and KDEL_ERR on record deletes.

 
COMPATIBILITY USE_CHARUPPER

Changes the default method of executing toupper() by optionally using CharUpper() on the Windows operating system.

 
COMPATIBILITY V24LOGON

Legacy option that controls whether or not to use old logon connection approach.

 
COMPATIBILITY VDLFLG

Re-establishes the old behavior of simply reporting the error (and abandoning a NEWVREC() operation) when a space-management index entry does not point to available space in a variable-length file.

 

COMPATIBILITY 6BTRAN_NOT_DEFAULT

COMPATIBILITY 6BTRAN_NOT_DEFAULT

Six-byte transaction number support is the default with the c-tree Server. For compatibility with existing older applications, this keyword is provided to disable this default.

See Also

COMPATIBILITY EXTENDED_TRAN_ONLY

DIAGNOSTICS EXTENDED_TRAN_NO

 

COMPATIBILITY ABORT_ON_CLOSE

COMPATIBILITY ABORT_ON_CLOSE

Disable “deferred close” capability. Force a transaction abort when a file altered in a transaction is closed before the transaction is committed.

Default: Defer close

 

COMPATIBILITY BATCH_SIGNAL

COMPATIBILITY BATCH_SIGNAL

This feature causes sysiocod to be set to BTNO_COD (-844) on calls to BATSETX()/BATSET() that result in the current batch being closed. If the client application finds sysiocod set to BTNO_COD, then the application does not need to issue a BAT_CAN call before issuing a new batch request.

 

COMPATIBILITY BATCH_UTRFMKEY

COMPATIBILITY BATCH_UTRFMKEY

Documentation states that keys returned with BATSET() called with BAT_RET_KEY are returned in native index order, however, uTFRMKEY() was called to put the keys back into the form of the client. While this behavior was changed to match the documentation, this configuration option reverts to this prior behavior.

 

COMPATIBILITY BLOCK_DDSFM_CREATE and BLOCK_DDSFM_DELETE

The FairCom DB Server can block adds and deletes of superfile members during the course of a dynamic dump using these two server configuration keywords.

COMPATIBILITY BLOCK_DDSFM_CREATE

Blocks superfile member creation during a dynamic dump. Attempts to create a superfile member return DDCR_ERR (740) with this keyword activated.

COMPATIBILITY BLOCK_DDSFM_DELETE

Blocks superfile member deletion during a dynamic dump. Attempts to remove a superfile member return DDDR_ERR (741) with this keyword activated.

Note: An application may create or delete superfile members in a superfile host waiting to be dumped while the overall dump is going on. Once the dynamic dump begins dumping the superfile host, blocked operation cannot occur until the end of the entire dump, not just the end of the dump of the superfile host itself. Therefore, the last superfile host listed in the dump script file list will have the shortest blocking period.

Default: Do not block creates and deletes

 

COMPATIBILITY CHAR_SCHSEG

Schema segments automatically map a c-tree field type to a key segment type (mode). Starting with V8.14, CT_CHAR fields are now treated as a signed, one-byte integer, whereas, previously, they were treated as a REGSEG segment mode. CT_CHARU remains treated as an unsigned one-byte field.

To revert this change for compatibility with versions prior to V8, use the COMPATIBILITY CHAR_SCHSEG server configuration keyword.

COMPATIBILITY CHAR_SCHSEG

 

COMPATIBILITY CHECKPOINT_OVERLAP

COMPATIBILITY CHECKPOINT_OVERLAP

A change to the checkpoint logic now causes checkpoint requests to wait for the completion of an in-process checkpoint before beginning even flushing operations. If the checkpoint is called from the CTCHKPNT() API, and it finds an in-process checkpoint, then it simply returns with NO_ERROR and sets sysiocod to OCHK_COD (-885). If an internal checkpoint request must wait, a counter is incremented; and the total count is reported in CTSTATUS.FCS at the end of the final checkpoint (if it is nonzero). This keyword disables the new behavior.

 

COMPATIBILITY CHKPNT_FLUSHALL

COMPATIBILITY CHKPNT_FLUSHALL

Note: This keyword is no longer recommended as of March 2019.

Forces all checkpoints but the final checkpoint to use a single system call to flush file system buffers instead of individual calls for each file to ctsave(). The motivation is that a call to flush the buffers for a specified file may require significant time whether or not the file has many updated pages in the file system cache; hence one flush of all the buffers may be faster than repeated calls for individual files. For Unix systems this implementation automatically invokes sync() unless another definition is already in place. No other platform has a default definition.

 

COMPATIBILITY CHKPNT_MUTEX_REL

COMPATIBILITY CHKPNT_MUTEX_REL

Forces transaction related mutexes to be released just before the checkpoint is written to disk instead of after. This should modestly reduce the time these mutexes are held by the checkpoint. It is safe because the mutexes are not released until the checkpoint has been completely composed, and its space in the log file is assigned.

Note: For FairCom internal use only.

 

COMPATIBILITY CLSFIL_ISAM

COMPATIBILITY CLSFIL_ISAM

By default, low-level commands are prevented from closing files opened with ISAM-level opens. This keyword is used to revert to behavior in which low-level commands were allowed to close files opened with ISAM-level opens.

 

COMPATIBILITY CLSFIL_UNBLOCK

COMPATIBILITY CLSFIL_UNBLOCK

A FCLS_ERR (24) could occur on a file unblock that occurred within a transaction for a file whose closure had been deferred until the transaction ends. Previous behavior was that the file had to be closed prior to the unblock call. With this configuration option it is permissible for the file blocker to have the file open at the time of the unblock call. The open may be explicit or, it may be as a result of a pending close.

 

COMPATIBILITY COMMPORT5000

COMPATIBILITY COMMPORT5000

Sets the default base value to add to the SERVER_NAME ASCII sum for determining the TCP/IP port number.

For example, the sum of the ASCII characters in FAIRCOMS equals 597. Added to the default base of 5000 results in a default TCP/IP port number of 5597.

See Also

 

COMPATIBILITY COPY_FILE_OPEN_SHARED

COMPATIBILITY COPY_FILE_OPEN_SHARED

Restores original shared open behavior for file copy operations. An earlier revision changed ctCopyFile() to open files to copy in exclusive mode such that a clean copy can be made. However, if a customer is able to use a potentially corrupted file copy and are prepared to handle the implications of allowing the shared open copy, this option can restore earlier behavior. When this option is in effect, ctCopyFile() opens the files in shared mode instead of exclusive mode.

The option can be set in the server configuration file and can be changed at runtime. (Remember that the way to do this at runtime is to use ctadmn's options 10, 10, and the configuration open, or the ctSETCFG() API function. To turn off a compatibility keyword you use: COMPATIBILITY ~keyword.)

 

COMPATIBILITY CTREE_RWLOCK

COMPATIBILITY CTREE_RWLOCK

Reader/writer lock support for Windows systems was implemented, and the mutex on the memory file hash lists was changed to a reader/writer lock when this support is enabled at compile time.

When the c-tree Server starts up on a Windows system, it checks if the system supports reader/writer lock functions. If so, it uses the system's reader/writer lock functions. If not, it uses c-tree's reader/writer lock functions. This option can be used to force FairCom DB to use custom reader/writer lock support instead of Windows' reader/writer lock support even if the Windows system supports reader/writer locks, for example, older versions not supporting this synchronization technique.

The following CTSTATUS.FCS messages are logged indicating the supported reader/writer locks:

c-tree reader/writer lock support enabled (keyword specified)

c-tree reader/writer lock support enabled (no O/S support)

Windows native reader/writer lock support enabled

 

COMPATIBILITY DIR_BUF_RQS

COMPATIBILITY DIR_BUF_RQS

During performance analysis it was noticed that get index node routine was performing retries when we expect that the node is already in a buffer. Changes were made to (a) avoid retries when the node holds the desired buffer and (b) skip the queue and directly request the holding semaphore. This option disables this new approach.

See Also

  • COMPATIBILITY NO_IDXBUFBLK

Note: This is intended for internal FairCom testing only.

 

COMPATIBILITY DISABLE_BACKGROUND_CLEANUP

COMPATIBILITY DISABLE_BACKGROUND_CLEANUP

Disables TRAN_INDEX_FLUSH_SEC.

See Also

 

COMPATIBILITY DUPL_ERR_FATAL

COMPATIBILITY DUPL_ERR_FATAL

Rebuild behavior was changed such that in the event of a DUPX_ERR, KDUP_ERR, KSRL_ERR, or some error other than DUPJ_ERR or DUPL_ERR, one or more of the indexes will have their corrupt flags turned on. As it was, DUPJ_ERR will not cause corrupt flag to be turned on. This option forces the index corrupt flag to be set.

 

COMPATIBILITY ENCRYPT128

COMPATIBILITY ENCRYPT128

c-tree's advanced encryption uses a master encryption key to encrypt the following items using the AES cipher:

  1. The security resource in c-tree data and index files that use advanced encryption, and
  2. The encryption key in the transaction log file header when using advanced log encryption.

The length of the master key was increased from 128 bits to 256 bits. FairCom DB can still access files that created with the previous 128-bit master key. This keyword reverts to the original 128-bit master key usage for encryption.

Attempting to open a file created using a 256-bit master key fails with error ENCK_ERR (952) when 256-bit key support is disabled.

See Also

 

COMPATIBILITY ESTIMATE_SCALE

COMPATIBILITY ESTIMATE_SCALE

SQL index selection relies heavily on the precision of ESTKEY() to pick the best index. Prior behavior was for ESTKEY() to return the estimate to within 1/10 percent. New behavior increases the ESTKEY() precision with the number of keys in the file to attempt to maintain a precision of about 100 records. As this is done using a binary search on the high and low keys, it requires 2 additional index searches for each doubling of the file size. This option reverts to the prior behavior.

 

COMPATIBILITY EXACT_FILE_NAMES

COMPATIBILITY EXACT_FILE_NAMES

Force different references to the same file to use the same names. For example: C:\data\temp.dat and \data\temp.dat would be considered different even if they referred to the same file.

Default: Allow different names

 

COMPATIBILITY EXTENDED_TRAN_ONLY

COMPATIBILITY EXTENDED_TRAN_ONLY

This keyword forces a R6BT_ERR (745) on an attempt to create or open a non-extended-transaction-number file. A read-only open is not a problem since the file cannot be updated.

See Also

COMPATIBILITY 6BTRAN_NOT_DEFAULT

DIAGNOSTICS EXTENDED_TRAN_NO

 

COMPATIBILITY FAILED_TRAN_IO

COMPATIBILITY FAILED_TRAN_IO

When transaction processing is in effect, a failed write operation for transaction controlled files terminates the server (or stand-alone application) with error L60 (ctcatend). This error can occur with any write operation errors of buffer and cache pages, and header write operations for transaction controlled files. If an L60 error does occur, the Mx value will be important in determining the precise location of the error.

This keyword restores behavior prior to this change.

 

COMPATIBILITY FILE_CREATE_CHECKPOINT

COMPATIBILITY FILE_CREATE_CHECKPOINT

The old behavior was to generate a checkpoint if a TRNLOG (but not TRANDEP) file is about to be deleted or renamed after a file, any file, is created but with no intervening checkpoint. That is, the sequence Create FileA, Checkpoint, Create FileB, Delete FileA would cause a second checkpoint during the delete processing of FileA even though the FileA create preceding the delete occurred with an intervening checkpoint. With new default behavior a checkpoint is generated only if the file to be renamed or deleted was the one created without an intervening checkpoint. This keyword option disables this behavior.

 

COMPATIBILITY FILE_DESCRIPTOR_LIMIT

COMPATIBILITY FILE_DESCRIPTOR_LIMIT

Running FairCom Server with insufficient file descriptors can lead to errors opening files. See FILES.

This compatibility keyword overrides the behavior described in FILES in case it is not convenient for a system administrator to set the file descriptor limit for the FairCom Server process to the required value or it is not desired to decrease the FILES or CONNECTIONS settings.

Note: Using this keyword is not recommended. It is provided for backward compatibility or short-term use until the administrator is able to increase the file descriptor limit for the FairCom Server process.

A message is logged to CTSTATUS.FCS explaining that the COMPATIBILITY FILE_DESCRIPTOR_LIMIT configuration option can be used to allow the server to start in this situation:


Tue Apr 29 12:23:44 2014

- User# 00001 ERROR: The hard limit on file descriptors available to this process (500) is lower than the database engine's file descriptor requirement (1043). Either increase the hard limit, or decrease the FILES or CONNECTIONS settings.

Tue Apr 29 12:23:44 2014

- User# 00001 Note: The configuration option COMPATIBILITY FILE_DESCRIPTOR_LIMIT can be used to allow c-tree Server to start even if the file descriptor limit is insufficient. However, this can lead to errors opening files.

See Also

 

COMPATIBILITY FILELIST_GROWTH

COMPATIBILITY FILELIST_GROWTH

When a key search occurs on partitioned indexes that are not ordered as the partition key, all of the partition members must be opened, which can take a significant amount of time if the number of partitions is large. One operation where unnecessary time was spent was resizing (allocate new + copy + free old) the users file control block. Previously, this grew in increments of 32 (MAXMEMB + 1) files. With partition files used through SQL, thousands of files may be opened by a single query. A change was made which increased the rate at which this array grows by doubling in size up to 2 thousand files. This change reduced the total query time by 4% in a case with 1000 files. This will affect memory usage, as it will now increase in increments of up to 500 KB (for large numbers of files already opened) versus 8KB with the old approach. This option reverts to the old approach.

 

COMPATIBILITY KEEP_EMPTY_NODE_ON_READ delete queue when read from disk

COMPATIBILITY KEEP_EMPTY_NODE_ON_READ

Performance issues have been reported due to a recent code change that unexpectedly caused situations where empty nodes could remain in an index until someone modified that node or until the index was rebuilt. Historically, empty index nodes have been processed by the FairCom Database Engine through an "index node pruning" strategy. When the number of keys in the node is zero, the node is added to a "delete node queue" to be removed by a background thread.

The root cause of this issue involves a situation where node pruning could fail if a table lock was outstanding, leaving empty nodes in indexes and causing performance issues. If a node was in this unusual empty state (due to a failed delete node pruning operation, or a server crash), it could remain in that state until someone modified that node or the index was rebuilt. This revision adds a request to prune a node whenever an empty node is read from disk, which should alleviate this problem.

FairCom DB's delete-node thread prunes empty nodes from index files in the background. It densely packs key data for optimal index performance. To prevent index corruption, it runs during idle times and opens the index file exclusively, which prevents external processes from opening it.

To disable the "index node prune" feature, for example to allow an external process to open an index file, use the following keyword:

COMPATIBILITY NO_DELNOD_QUEUE

The above keyword prevents the delete-node thread from running, which prevents automatic index optimization, however, it allows external processes to open the index file.

Another keyword, COMPATIBILITY KEEP_EMPTY_NODE_ON_READ, prevents empty nodes read from disk being added to the delete queue. This is the V2/V11 and earlier behavior.

 

See also

COMPATIBILITY NO_DELNOD_QUEUE

 

COMPATIBILITY LFL_WAIT

COMPATIBILITY LFL_WAIT

Eliminates the lflsema SHORTWAIT loop, and uses a call with the WAIT parameter.

Note: For internal FairCom use only.

 

COMPATIBILITY LFW_ADAPTIVE

COMPATIBILITY LFW_ADAPTIVE

Replaces the commit delay ct_udefer() call with a loop that permits the "prime" cohort to periodically wake up, after a much smaller defer time, and check for commit delay progress. COMMIT_DELAY_USEC determines the length of the "short" sleep when this option is enabled.

Note: For internal FairCom use only.

 

COMPATIBILITY LOCK_CACHE

COMPATIBILITY LOCK_CACHE

The FairCom Database Engine attempts to lock all data and index cache pages into physical memory, using the mlock() function on Unix systems. In the event this fails, the server will fail to initialize and a message is printed to CTSTATUS.FCS:

LOCK_CACHE: mlock() error 12

This is only implemented for Unix (which includes Linux).

 

COMPATIBILITY LOCK_HEADER

COMPATIBILITY LOCK_HEADER

Some header calls always acquire the header semaphore. It is possible the associated lock table entries are not needed since the semaphore provides access control. With new default behavior, lock calls skip the lock table entries, only acquiring the header semaphore. This option will restore the lock table entries.

 

COMPATIBILITY LOG_ENCRYPT128

COMPATIBILITY LOG_ENCRYPT128

c-tree's advanced encryption uses a master encryption key to encrypt the following items using the AES cipher:

  1. The security resource in c-tree data and index files that use advanced encryption, and
  2. The encryption key in the transaction log file header when using advanced log encryption.

The length of the master key was increased from 128 bits to 256 bits. FairCom DB can still access files that were created with the previous 128-bit master key. This keyword reverts to the original 128-bit master key usage.

Attempting to read a transaction log encrypted with a 256-bit encryption key when only 128-bit log encryption support is enabled fails and c-tree logs the following message to CTSTATUS.FCS:

Cannot read existing encrypted logs. Log is using 256-bit encryption key but server is configured for 128-bit encryption support.

See Also

 

COMPATIBILITY PUTHDR_COMMIT

COMPATIBILITY PUTHDR_COMMIT

A KDUP_ERR (2, duplicate key found) could be encountered while using a SRLSEG value as the key. The SRLSEG values (sernum1, sernum2) are stored in the c-tree file header. Header values are handled differently than ordinary record contents, as they are not maintained under typical transaction control; we do not want to hold a lock for the duration of a transaction for these types of values.

PUTHDR() behavior was changed such that on commit, the header value is not reset to the new value. Abort behavior remains the same. This also affects numrec1, numrec2, phyrec1, and phyrec2 header values.

For backward compatibility, the original behavior can be restored by adding this keyword to the configuration file.

 

COMPATIBILITY MEMORY_FILE_SKIP_FREE

COMPATIBILITY MEMORY_FILE_SKIP_FREE

When a memory file is actually closed (which is not necessarily when the last user closes the file because of the ctKEEPOPEN attribute), the individual records or nodes are returned to the memory heap.

This keyword skips the free of memory at server shutdown for the individual memory records for memory files still open and assume that the server termination will (automatically) return the memory to the system. This may quicken the shutdown in the case of a large number of memory file records and/or nodes.

 

COMPATIBILITY MEMORY_LIMITS

COMPATIBILITY MEMORY_LIMITS

Legacy V7 backward compatibility option that enforces system or user memory limits.

 

COMPATIBILITY MINIMUM_INDEX_BUFFERS

COMPATIBILITY MINIMUM_INDEX_BUFFERS

Historically FairCom Server has automatically set the index cache size so that the number of index buffers is at least 3 times the maximum number of allowed connections. This ensures that sufficient index buffers are available to handle index operations (key inserts, retrievals, and deletes) if all supported connections are performing index operations at the same time.

This minimum requirement means the memory used by FairCom Server could be higher, perhaps much higher, than the amount requested in the server configuration file. For example, using the default settings of PAGE_SIZE 8192 and IDX_MEMORY 100 MB and the number of allowed connection is larger than 4267, IDX_MEMORY becomes larger than requested.

The list below shows examples for PAGE_SIZE 8192, showing the original index cache memory requirements:

CONNECTIONS

IDX_MEMORY

8

0.2 MB

16

0.4 MB

32

0.8 MB

64

1.5 MB

128

3.0 MB

256

6.0 MB

512

12.0 MB

1024

24.0 MB

2048

48.0 MB

4096

96.0 MB

8192

192.0 MB

16384

384.0 MB

32768

768.0 MB

In V11.5 and later, instead of increasing the number of index buffers to the required amount, if the IDX_MEMORY value is smaller than the required amount of index buffers, c-tree Server limits the number of concurrent threads that can be performing index operations so that concurrent requests for index buffers do not exceed the allocated number of index buffers.

Note: This is a Compatibility Change.

FairCom Server supports a configuration option to restore the old behavior in case it is needed. Specifying COMPATIBILITY MINIMUM_INDEX_BUFFERS in ctsrvr.cfg restores the old behavior. When this option is used, at startup, FairCom Server logs the following message when it increases IDX_MEMORY due to minimum index buffer requirements based on the number of supported connections:

- User# 00001 Setting IDX_MEMORY to 53805056 due to concurrent connection requirements.

 

COMPATIBILITY MULTI_PROCESSOR

COMPATIBILITY MULTI_PROCESSOR

Legacy option to ensure proper statistics on multiple-processor hardware.

 

COMPATIBILITY MULTIOPN_*

Se the default for enhanced locking control for files opened multiple times in the same connection. The system-level default can be controlled by using one of the following configuration keywords which sets the behavior accordingly to their names.

COMPATIBILITY MULTIOPN_DIFUSR

COMPATIBILITY MULTIOPN_SAMUSR_M

COMPATIBILITY MULTIOPN_SAMUSR_1

Starting in V10.3, FairCom DB supports opening the same file multiple times in the same connection assigning a different file number to each file or, in FairCom DB API, a different file handle. This can be useful in situations where you want to allow the same file to be opened twice by the same thread with different locking attributes applied to each thread.

Each of these sibling files is referred to as a "co-file." For example, if the file customer.dat is opened in the same connection using file numbers 5 and 10, then we say that file 5 is a co-file of file 10, and vice versa.

In this case there are considerations about how locks interact within the same connection when operating using different co-files. For example, if a write lock is acquired on a record R using file number 5 within the same connection, what is the behavior of trying to acquire a lock on R using co-file number 10?

In this example, before this enhancement, FairCom Server behaved as follows:

The lock on R issued with co-file number 10 succeed and is considered a "secondary lock", while the lock acquired first (using file number 5) is considered "primary."

The difference in the locks manifests itself during calls to unlock the record: If the primary lock is unlocked first, then the primary lock and all the corresponding locks on co-files are removed. But if a secondary lock is unlocked before the primary lock is unlocked, then only the secondary user lock is removed; and the primary lock is maintained.

Any other connection saw the record locked until the primary lock was released.

This previous behavior has been maintained and it is the system-level default behavior.

It is now possible to configure the behavior choosing among 4 different options:

  • NODIFUSR: The default as described above.
  • DIFUSR: Locks on co-files are considered as acquired from a different connection, so the lock on R issued with co-file number 10 will fail.
  • SAMUSR_M: Locks on record R on co-files are considered as the same lock acquired on the same file, so lock on R issued with co-file number 10 succeeds. As soon as the lock is released in one of the co-files that successfully requested the lock, the lock is released. Therefore, before acquiring the lock on R using file number 10, the lock can be released only using file number 5, but after acquiring the lock on R using file number 10, the lock can be released either by using file number 5 or 10.
  • SAMUSR_1: Locks on record R on co-files are considered as the same lock acquired on the same file, so lock on R issued with co-file number 10 succeeds. As soon as the lock is released in one of the co-files (whether or not the lock was requested using the co-file) the lock is released. Therefore, even before acquiring the lock on R using file number 10 the lock can be released either by using file number 5 or 10.

Recursive locks are not supported for co-files. An attempt to open a co-file when recursive locks are pending on the underlying file will fail with the error MUOP_RCR (998). An attempt to issue a lock on a co-file with the ctLK_RECR bit set in the lock mode will fail with the error MLOK_ERR (999).

Read locks behave in a manner consistent with write locks. The notable issues are:

  1. With DIFUSR, read locks can be issued for different co-files; and unlocking one co-file's read lock does not remove the read lock from any other co-files that requested the read lock.
  2. With DIFUSR, a read lock on a co-file cannot be promoted to a write lock if other co-files have read locks; a non-blocking write lock will fail with DLOK_ERR (42) and a blocking write lock will fail with DEAD_ERR (86).
  3. With SAMUSR_*, read locks can be issued for different co-files, and unlocking one co-file read lock unlocks all the co-file read locks.
  4. With SAMUSR_*, read locks can be promoted to write locks as long as no other threads have also acquired read locks.
  5. With SAMUSR_1, a read lock on a co-file can be unlocked using another co-file's file number even if no lock has been issued using the other co-file number.

The system-level default can be controlled by using one of the following configuration keywords which sets the behavior accordingly to their names.

  • COMPATIBILITY MULTIOPN_DIFUSR
  • COMPATIBILITY MULTIOPN_SAMUSR_M
  • COMPATIBILITY MULTIOPN_SAMUSR_1

A connection can override the system-level default for all open instances of a file by calling:

PUTHDR(datno, mode, ctMULTIOPNhdr)

Where mode is one of the following:

  • ctMULTIOPNnodifusr
  • ctMULTIOPNdifusr
  • ctMULTIOPNsamusr_M
  • ctMULTIOPNsamusr_1

If no PUTHDR call is made, the system-level default is used for that connection's instances of the file. When a file is opened, if that connection already has the file open, the newly opened file inherits the MULTIOPN setting of the already-open file instance. An attempt to change the setting so that one instance of the file would be inconsistent with the others will fail with error MOFL_ERR. A file's MULTIOPN state can only be changed if it is the first open instance of the file and it has no pending locks.

 

COMPATIBILITY NLM_DEFER_THREADSWITCH

COMPATIBILITY NLM_DEFER_THREADSWITCH

This option can improve the performance of the FairCom DB Server for Novell at the cost of decreased performance in other processes. Consult with your application developer and Novell system administrator to determine if this switch is appropriate for your system

Default: Defer

 

COMPATIBILITY NLM_LONG_FILE_NAMES

COMPATIBILITY NLM_LONG_FILE_NAMES

Instructs the FairCom DB Server to use OS/2 namespace support, provided OS/2 namespace support is enabled on the working volume. If the keyword is not used, or if the volume does not support OS/2 namespace, long file names are not supported. FairCom recommends that when using long file name support all volumes provide OS/2 namespace support to prevent an error. This keyword is only required by the NLM FairCom DB Server and is ignored in all other versions.

Default: Not supported

 

COMPATIBILITY NO_ADREXP_CHECK

COMPATIBILITY NO_ADREXP_CHECK

r-tree virtual fields should be in "correct" order where correct means no forward references. Using a forward reference results in various errors, resulting in potential server crashes. Address expressions involving DODA fields can be distinguished from address expressions involving other virtual fields, and a state variable is now set in the step of the script where the address expression is executed such that during the parsing phase, an attempt to evaluate an address expression based on a DODA field will return an error instead of crashing the server. This keyword reverts this change for testing purposes only.

 

COMPATIBILITY NO_ATODEP

COMPATIBILITY NO_ATODEP

When indexes have to be recreated during a rebuild or compact call without XCREblk support, the indexes will lose their TRANDEP/RSTRDEL attributes. The rationale to change this behavior is to permit such calls to automatically assign the indexes the same TRANDEP/RSTRDEL attributes as the associated data file. A new client, even with the new default behavior turned on will not exhibit this new behavior if RBLIFIX8()/CMPIFILX8() are called since the XCREblk's passed to rebuild or compact will prevail. This option reverts this behavior.

 

COMPATIBILITY NO_AUTO_SKIP

COMPATIBILITY NO_AUTO_SKIP

To avoid requiring SKIP_MISSING_FILES when TRANDEP files are in use, a new default behavior effectively treats TRANDEP files as though SKIP_MISSING_FILES is turned on, however, for files without TRANDEP activities, recover, rollback, or roll-forward may still terminate execution if unexpected missing files are encountered.

This keyword disables this support to revert to the original behavior.

Note: It is possible that an unexpected FNOP_ERR error can still occur for a TRANDEP file, however, this change should greatly reduce the number of unexpected FNOP_ERR’s.

See Also

 

COMPATIBILITY NO_BAT_FXDCMP

COMPATIBILITY NO_BAT_FXDCMP

In V11.0 and later, batch operations were adjusted to return fixed-length compressed records as fixed-length records. Previously, they were returned as variable-length records. Add COMPATIBILITY NO_BAT_FXDCMP to the ctsrvr.cfg file if you need to restore the previous behavior.

 

COMPATIBILITY NO_BLOCK_KILL

COMPATIBILITY NO_BLOCK_KILL

Disable the ADMIN ability to kill currently connected clients.

Default: Allow kill

 

COMPATIBILITY NO_CHECKFIX

COMPATIBILITY NO_CHECKFIX

The ADDREC() routine checks to see if a record begins with either a delete flag (0xFF) or a resource mark (0xFEFE). If so, the ADDREC() returns FBEG_ERR (553). Behavior prior to 2002 did not make this check and this option reverts the newer behavior.

 

COMPATIBILITY NO_CHKMBRNAMLEN

COMPATIBILITY NO_CHKMBRNAMLEN

The length of a c-tree Superfile name is restricted because the Superfile directory index has a restricted key length. A default behavior checks when the Superfile member name is restricted due to small page sizes: if the Superfile name is truncated in the Superfile member directory index, then the create of the member will fail with SNAM_ERR (418). Without this new behavior, member names that would be truncated to the same string would cause DOPN_ERR (19) and/or KOPN_ERR (18) errors.

To address the situation where names may have been truncated but no conflicts arose and would now get error SNAM_ERR at create time, COMPATIBILITY NO_CHKMBRNAMLEN is available to revert to the original behavior.

 

COMPATIBILITY NO_CLSTRAN_OPEN

COMPATIBILITY NO_CLSTRAN_OPEN

FairCom DB is designed to permit automatic recovery and rollbacks to properly handle deleted and renamed transaction dependent files (TRANDEP) without requiring the SKIP_MISSING_FILES configuration to be enabled. Situations can occur where a TRANDEP file has been physically deleted (by a system call, for example) that will interfere with a transaction rollback during automatic recovery.

If SKIP_MISSING_FILES is active, then the rollback should succeed even with the missing file, however, should only ignore missing files for which there is a transaction controlled explanation such as a file delete or file rename.

The recovery process was modified such that a CLSTRAN log entry will attempt to open the file (if it is not already opened). Upon detecting a CLSTRAN entry triggers putting a missing file on the list of missing files. To revert to the original behavior, the server configuration keyword, COMPATIBILITY NO_CLSTRAN_OPEN is provided.

See Also

 

COMPATIBILITY NO_COMMIT_READ_LOCK

COMPATIBILITY NO_COMMIT_READ_LOCK

Disables commit read lock support for backward compatibility. FairCom DB V9 introduced commit read lock support as a default. Without explicit read or write locks, it is possible to have a partially updated record buffer returned in a high transaction volume environment. The returned record buffer could consist of partial old data, and partial newly updated data from a transaction commit operation from a concurrent thread. While the occurrence of this event is extraordinarily rare (on the order of one in a million record reads) it is clearly important in a high volume situation to prevent these “dirty” record reads. Commit Read Locks enable an implicit, high performance, low-level record lock ensuring consistent data record reads in high volume transaction environments.

When explicit read or write locks are enforced in the c-tree application then this feature is not required, as the transaction commits will ensure consistent data reads.

A new type of lock entry, CMT, was added to the FairCom DB Server lock table. These CMT entries are guaranteed to be very shortly held (only for the duration of the internal read operations). Under high volume server operations this new lock type may occasionally be observed as "forcei cmtlok" in a ctLOKDMP() (LockDump()) output.

Commit Read Lock Errors

An attempt to update a record without an explicit lock with the commit read logic is active results in error CMLK_ERR (768). This lock error fails the transaction commit. CULK_ERR (769) indicates an unexpected failure during the removal of a commit lock. This is an extremely rare internal FairCom DB Server error and should not be encountered in standard usage.

Performance Considerations

The commit read lock uses polling logic to permit a thread to retry a commit lock when it cannot be acquired. For example, if the updater has already acquired a write commit lock, a reader will be denied its request for a read commit lock, and the reader will retry. Particularly, for large transactions, the retries can consume a large amount of CPU time.

To avoid this high CPU utilization a more adaptive retry logic was implemented. If several retries fail in succession, the retry call is changed before each retry from a defer time of 0, to a defer time of ctredcmtdfr where ctredcmtdfr defaults to 10 milliseconds.

To provide an additional tuning mechanism for this retry value, the following configuration keyword COMMIT_LOCK_DEFER_MS <defer time in milliseconds>

The length of the defer value can be varied from zero to 100 milliseconds.

Internal tests demonstrated the effect of this change on CPU utilization was dramatic as a reader attempted to retry its read commit lock. Of course, actual performance increases will be variable, depending on any particular server environment. The trade-off with this method is introducing an unnecessary defer (i.e. if the next retry without a non-zero defer would have succeeded). In practice, this was not found to impede performance.

Commit write locks held by the transaction (i.e., locks that block read attempts during the actual commit process) are held during the entire commit. This has no direct impact upon the transaction commit, however, can cause longer delays for a read attempt when the transaction itself is comprised of a large number of write operations (e.g., committing thousands of ADDREC()s)

See Also

COMMIT_LOCK_DEFER_MS

 

COMPATIBILITY NO_CONFIG_PERSISTENCE

COMPATIBILITY NO_CONFIG_PERSISTENCE

With V12 and later it is possible to store configuration options enabled or modified at run-time. These changes are persisted in an internal FAIRCOM.FCS table automatically created in existing FAIRCOM.FCS files at server startup. Stored keywords overwrite any setting in ctsrcr.cfg.

This persistence can be disabled at runtime by adding the following COMPATIBILITY NO_CONFIG_PERSISTENCE to ctsrvr.cfg:

 

COMPATIBILITY NO_DATAMAP_CHECK

COMPATIBILITY NO_DATAMAP_CHECK

When an index file is opened by an ISAM file open function, if the index is already open and is associated with a data file, FairCom DB checks if the index is associated with a different data file than the data file that is involved in the current file open operation. If so, the open now fails with error DMAP_ERR (957, this index file is already mapped to a different data file). This keyword disables the new approach (no check for mapping to the same data file as the currently-mapped file).

 

COMPATIBILITY NO_DELNOD_QUEUE

COMPATIBILITY NO_DELNOD_QUEUE

FairCom Server's delete-node thread prunes empty nodes from c-tree index files in the background. This maintains index key data densely packed for optimal performance. This activity requires directly opening the index file by the delete-node thread, which happens during idle times when it may be expected external applications can access the file. Having the file open at the time by the delete-node thread prevents external file open.

In exceptional cases, this behavior may not be desirable as external processes expect complete access to the file when it is no longer in use by the application. For example, processes may wish to immediately copy the file for other external processing.

In V11 and later, FairCom Server supports a configuration option to disable the internal delete-node thread. The option COMPATIBILITY NO_DELNOD_QUEUE disables the delete-node thread and disables the writing of entries to the delete-node queue.

Caution: This option should only be used in special situations in which you absolutely require an external process access to closed files, which is discouraged if at all possible while the server is operational.

Operating without pruning empty nodes from indexes can potentially diminish performance of certain index search operations which may non-optimally traverse many empty leaf nodes. This is especially true for applications which heavily delete records from the database.

 

See also

COMPATIBILITY KEEP_EMPTY_NODE_ON_READ (COMPATIBILITY KEEP_EMPTY_NODE_ON_READ delete queue when read from disk, COMPATIBILITY KEEP_EMPTY_NODE_ON_READ)

 

COMPATIBILITY NO_FIXED_OFFSET_CHECK

COMPATIBILITY NO_FIXED_OFFSET_CHECK

In V11.5 and later, a feature prevents corruption and errors when an attempt is made to write to arbitrary offsets in a fixed-length file. Checks were added to ensure that a read/write/lock call on a fixed-length file is properly aligned. If an incorrect alignment is detected, the call will fail with FALG_ERR (767).

This feature can be disabled by keyword COMPATIBILITY NO_FIXED_OFFSET_CHECK.

Note: This is a Compatibility Change.

 

COMPATIBILITY NO_FLUSH_DIR

COMPATIBILITY NO_FLUSH_DIR

Reverts to the old behavior which does not force the flushing of metadata to disk immediately after creates, renames, and deletes of transaction log files and transaction-dependent files.

When a file is created, renamed, or deleted, the new name of the file is reflected in the file system entry on disk only when the containing directory's metadata is flushed to disk. If the system crashes before the metadata is flushed to disk, the data for the file might exist on disk, but there is no guarantee that the file system contains an entry for the newly created, renamed, or deleted file. In a test case we noticed that after a system power loss a transaction log containing valid log entries still had the name of the transaction log template file.

In release V11 and later, c-tree ensures that creates, renames, and deletes of transaction log files and transaction-dependent files are followed by flushing of the containing directory's metadata to disk. This change also applies to other important files such as CTSTATUS.FCS, the master key password verification file, and files created during file compact operations (even if not transaction dependent).

To revert to the old behavior, add COMPATIBILITY NO_FLUSH_DIR to ctsrvr.cfg.

 

COMPATIBILITY NO_IDFIELD_OVERFLOW_CONVERSION

COMPATIBILITY NO_IDFIELD_OVERFLOW_CONVERSION

In V10.5 and later, support for IDfield overflow detection was added. The IDfield resource is automatically updated to allow this. In V11.0 and later, this automatic conversion of the IDfield resource can be disabled by adding this keyword to the ctsrvr.cfg file.

 

COMPATIBILITY NO_IDFIELD_OVERFLOW_DETECTION

COMPATIBILITY NO_IDFIELD_OVERFLOW_DETECTION

In V10.5 and later, support for IDfield overflow detection was added. Record operations that cause overflow or underflow return error IDVR_ERR (1002). In V11.0 and later, adding this keyword to the ctsrvr.cfg file will cause all tests for overflow/underflow to be ignored.

 

COMPATIBILITY NO_IDXBUFBLK

COMPATIBILITY NO_IDXBUFBLK

For internal FairCom use only. Do not use this keyword.

 

COMPATIBILITY NO_INIT_VSPACE

COMPATIBILITY NO_INIT_VSPACE

Under transaction control, new space was reserved at the end of a variable-length file, and the preimage space received an entry that marked the space as deleted if the transaction was aborted. When a write to this space (say as part of an ADDVREC()) was made, still under the same transaction control, preimage received another entry. However, until either a commit or an abort, the new region appeared to other users to be simply ff-filled. When another user was scanning the variable-length file in physical order, e.g., with NXTVREC(), this would cause a VFLG_ERR (158), since 0xffff is not a valid record mark. A fixed-length file does not behave this way because ff-fill appears as a deleted record to be skipped during physical order scan.

In V8.14 this behavior was changed such that not only is preimage space updated with the deleted record mark, but also a write is issued to the actual file with the same contents. This option reverts that behavior.

See also

 

COMPATIBILITY NO_KEEP_OUT_TRNSEQ

COMPATIBILITY NO_KEEP_OUT_TRNSEQ

ctKEEP_OUT permits TRANEND() to free locks obtained inside the transaction, but keep locks obtained outside of the transaction. One subtle point is that a lock obtained outside of the transaction on a record that is updated within the transaction will be freed. ctKEEP_OUT_ALL keeps locks even if the record is updated within the transaction if the lock was obtained outside of the transaction. However, a lock obtained inside of a prior transaction that is kept at the TRANEND() of the prior transaction is treated as if it was obtained inside of a subsequent transaction , and is released at the next TRANEND() called with ctKEEP_OUT or ctKEEP_OUT_ALL.

New default behavior allows TRANEND() to distinguish between a lock obtained within a prior transaction, and a lock obtained in its own transaction. This option reverts this behavior.

 

COMPATIBILITY NO_MYMARKS

COMPATIBILITY NO_MYMARKS

In some situations, repeated calls were made to resolve key-level locks without any clean up occurring. When a key-level lock is associated with a transaction that has committed or aborted, the key-level lock is removed and the key value stays (committing an add or aborting a delete) or is removed (committing a delete or aborting an add). But if a thread is executing a long transaction, it may be repeatedly calling for cleanup without any effect when the key-level locks for a node all belong to the calling thread.

Buffer state variables were added such that this cleanup can immediately detect when all the key-level locks belong to the calling thread, and returns without checking each of the key-level locks enhancing performance. This keyword disables the new approach for testing.

Note: This is intended for internal FairCom testing only.

 

COMPATIBILITY NO_NXTMARKS

COMPATIBILITY NO_NXTMARKS

To improve the efficiency of key cleanup when called as part of a NXTKEY() operation, the cleanup routine was modified to only perform the clean-up necessary to satisfy the NXTKEY() operation. If NXTKEY() ends up calling GTKEY() because the last position for the calling thread is no longer valid, then the subsequent clean up would not use the special next key logic. This keyword disables this new behavior.

Note: This is intended for internal FairCom testing only.

 

COMPATIBILITY NO_RCVHDRUPD_NUMENT

COMPATIBILITY NO_RCVHDRUPD_NUMENT

Used for Faircom internal testing only. Do not use this keyword.

 

COMPATIBILITY NO_RELBUF_CHECK

COMPATIBILITY NO_RELBUF_CHECK

A check for removing an updated buffer from the update list during a checkpoint was enabled. This new behavior can be disabled with this keyword.

 

COMPATIBILITY NO_REPL_DEFER_TRAN

COMPATIBILITY NO_REPL_DEFER_TRAN

In V11.0 and later, an optimization was added to avoid sending transactions to a Replication Agent that did not replicate the files in that transaction. Adding this keyword to the ctsrvr.cfg file will disable this optimization.

 

COMPATIBILITY NO_SHUTDOWN_DELAY

COMPATIBILITY NO_SHUTDOWN_DELAY

Forces an instant shutdown without pause for client disconnect. Not valid on NLM.

Default: Wait for client

 

COMPATIBILITY NO_SIGNAL_HANDLER

COMPATIBILITY NO_SIGNAL_HANDLER

Developers using the Server SDK to build custom servers with their own over all control of the server can use this server configuration keyword to force the server to skip the installation of signal handlers at server startup. If this is done, then their control code will be responsible for dealing with signals. This modification only affects Unix platforms. If signal handlers are implemented for other platforms, then be sure that the compatibility test in ctsint_a.c is repeated within the appropriate platform #ifdef.

 

COMPATIBILITY NO_SMART_SAVE

COMPATIBILITY NO_SMART_SAVE

Disables support to enable a ctsave() call to skip the file system sync if no bytes have been written since the last call to ctsave().

 

COMPATIBILITY NO_SPCMGT_QUEUE

COMPATIBILITY NO_SPCMGT_QUEUE

By default, the FairCom DB Server reclaims the space from deleted member files of a Superfile and recovered variable-length data files. A dedicated background thread performs the space reclamation. A permanent queue stored in the Server file D0000001.FCS permits the space reclamation to be interrupted at Server shutdown, and resumed when the Server restarts. This configuration keyword disables this feature.

Default: Manage Superfile deleted space

 

COMPATIBILITY NO_SYS_FLUSH_ON_CLOSE

COMPATIBILITY NO_SYS_FLUSH_ON_CLOSE

In some situations, it is possible for a file-close operation to occur without a guarantee of a data sync to disk first. For transaction-controlled files, this meant a file could be left corrupted on disk while the FairCom DB Server transaction control system would have no knowledge of this. Extra protection has been added to ensure that this situation did not occur.

This behavior will cause a system cache flush before physically closing transaction logged files or write-through files. This behavior can be disabled by adding COMPATIBILITY NO_SYS_FLUSH_ON_CLOSE to the server configuration file.

 

COMPATIBILITY NO_TEST_LOCAL

COMPATIBILITY NO_TEST_LOCAL

In some environments (e.g., WIN32 / UNIX) the tests to determine if two files with different names are really different (or just accessed with different paths or aliases, etc.) may indicate the files are different, when in fact they are the same, if one of the names is based on a network reference and the other (through aliases, device mappings or SUBST commands) appears like a local file. If this occurs, the server may attempt to open the files as two physically different files.

Because of the possibility of a performance hit, COMPATIBILITY NO_TEST_LOCAL is available to turn off the check of whether a file is local or remote.

 

COMPATIBILITY NO_TRAN_DISCONNECT

COMPATIBILITY NO_TRAN_DISCONNECT

When the number of log files is not permitted to increase (because of FIXED_LOG_SPACE YES in the configuration), and if the need for more logs is caused by a pending transaction, the server disconnects the client associated with the transaction by default. This keyword option disables this support and if the client does not make a subsequent server request, then the pending transaction will eventually lead to the server terminating abruptly with a L56 ctcatend. The server terminates because it cannot ensure that a commit or abort will be added to the transaction logs before the log that holds the TRANBEG() will become inactive. (If the client makes a server request, it will see the transaction attribute that indicates the need to abandoned the transaction, and the ctcatend shutdown will be avoided.)

 

COMPATIBILITY NO_TRANDEP_SCAN

COMPATIBILITY NO_TRANDEP_SCAN

Additional transaction log pre-scanning is now done for improved handling of transaction-dependent file renames and deletes, avoiding potential LEOF_ERR or ITIM_ERR errors. This option disables this pre-scan feature.

 

COMPATIBILITY NO_UNIQFILE

COMPATIBILITY NO_UNIQFILE

Disables attempts to determine if files accessed with different file names (or paths) and identical FairCom DB file IDs are the same file or different files.

Default: Check file identity

 

COMPATIBILITY NO_UPDMARKS

Disables a transaction performance optimization.

Note: This keyword should be enabled only on recommendation from FairCom.

 

COMPATIBILITY NO_VAR_PEOF

COMPATIBILITY NO_VAR_PEOF

A default behavior permits a variable-length record that grows to grow in place if (a) the record is at the Logical End of File (LEOF), (b) no other user is adding a record at the LEOF, and (c) the growth of the record does not exceed the current Physical End of File (PEOF). Additional behavior (default) removes the limitation that the record growth stay within the current PEOF.

When the growth would exceed the PEOF, the logic attempts to extend the physical file size and retry growing the record in place (within the newly extended PEOF). At runtime, COMPATIBILITY NO_VAR_PEOF, disables this support, and leaves the growth in place activated as long as the record fits within the current PEOF.

 

COMPATIBILITY NO_VARLEN_TRAN_UNUSED

COMPATIBILITY NO_VARLEN_TRAN_UNUSED

Previously, there were two related aspects of variable record length space reclamation that differed for transaction-controlled files. Instances were noted where a TRANPROC file would grow unnecessarily. In a particular instance, frequent and constant FairCom DB SQL add and delete operations resulted in substantial growth of a data file.

To avoid this unexpected growth, both aspects of space reclamation are now treated the same for TRANPROC and non-TRANPROC files. COMPATIBILITY NO_VARLEN_TRAN_UNUSED reverts to the previous differentiated behavior.

 

COMPATIBILITY NO_VFLG_ERR

Disables new handling of NXTVREC in physical order when it encounters the "record space" for a new record that has not been committed and was written in a space that is not being reused. Restores the earlier (post V8.14) behavior for the rare circumstance in which the old behavior is desired.

A feature introduced in V8.14 affected the behavior of NXTVREC in physical order when it encountered the "record space" for a new record that had not been committed and was written in a space that was not being reused. Instead of reporting a VFLG_ERR (error 158), that new feature skips the uncommitted "record space" (unless the reading is by the transactor, which would see the uncommitted record).

Details

The change affects how variable-length records are internally marked during transaction processing of pre-image space. The behavior prior to V8.14 marked the record header in a way that was considered invalid, causing a VFLG_ERR (158) error. The newer behavior sees the record as a deleted record (actually a pending insert) and skips to the next record as in a "read committed" transaction isolation.

This change is limited to the internal handling of header marks for newly added variable-length records.

Indexed files are not affected by these changes because pending key inserts are handled differently under transaction control.

These changes do not include changes to the physical files, record structures on disk, or other transaction control.

Reverting Back to the Old Behavior

These changes can be reverted back to the original (prior to V8.14) behavior using the keyword:

COMPATIBILITY NO_INIT_VSPACE (COMPATIBILITY NO_INIT_VSPACE, /doc/ctserver/57570.htm)

Changes in the Latest Revision

The changes introduced in the V11 release address the issues with the earlier change as follows:

If the reader has requested acquiring locks on the records that it reads, the physical read acquires a lock on that record and respects the lock before proceeding (earlier the lock was not respected) producing one of the following outcomes:
 

If...

Then...

Locking the record fails with error 42 (DLOK_ERR) because another connection has the record locked and the reader requested non-blocking locking.

The physical record read function returns error 42.

The record is committed (already, or when the lock is released).

The record read proceeds as usual, and the record that would have been skipped is returned to the caller.

The record is deleted or is a “resource.”

The physical record read function continues scanning the data file, reading the next record.

The record header contains an invalid record mark.

The physical record read function returns error 158 (VFLG_ERR).


Further changes have been introduced to reduce the occurrence of the 158 (VFLG_ERR) without skipping any record by changing the record header marker management during record addition.

COMPATIBILITY NO_VFLG_ERR can be used to disable this new handling and restore the earlier (post V8.14) behavior for the rare circumstance in which the old behavior is desired

 

COMPATIBILITY NONE

COMPATIBILITY NONE

This option is used in conjunction with the tamper-proof settings file under the server. Configuration options that are in the encrypted ctsrvr.set settings file cannot be overridden in the ctsrvr.cfg file.

The DIAGNOSTICS, COMPATIBILITY, and CONSOLE keywords do not automatically block use in a subsequent stage of configuration loading. To explicitly block any of these keywords present in a later stage, add entries in the form: <keyword> NONE where <keyword> is DIAGNOSTICS, COMPATIBILITY, or CONSOLE. For example, to turn on the abort-on-close compatibility option and prevent any subsequent stage to use the COMPATIBILITY keyword, place the following entries in ctsrvr.set:

COMPATIBILITY ABORT_ON_CLOSE

COMPATIBILITY NONE

Default: Not present

 

COMPATIBILITY OPEN_SHARE_RW

COMPATIBILITY OPEN_SHARE_RW

For c-tree data and index files that do not use the DUPCHANEL filemode, the FairCom DB for Windows now opens the files in shared read-only mode such that only the FairCom DB process can write to the files. FNAC_ERR (920), is returned when a file exists but is not accessible, say due to file system permission settings or file sharing restrictions. This configuration option can be used to restore the previous behavior of opening the files with read/write share access.

 

COMPATIBILITY OPEN_RANDOM_ACCESS

COMPATIBILITY OPEN_RANDOM_ACCESS

Restores the behavior of the obsolete FILE_FLAG_RANDOM_ACCESS option.

 

COMPATIBILITY PUTHDR_COMMIT

COMPATIBILITY PUTHDR_COMMIT

PUTHDR() called within a transaction causes a pre-image space entry that contains the old and new header member value. On an abort, the old value is restored. On commit the new value is reset. "Reset" because at the time of the call to PUTHDR(), the header member takes on the new value. But header values are not like ordinary record contents. They are not typically under transaction control. We do not want to lock the record header during a transaction and not unlock until the commit. PUTHDR() uses the more traditional transaction approach to permit special modifications to the file under transaction control. However, for the ctSERNUMhdr, ctLOGEOFhdr and ctPHYEOFhdr header members, this approach can lead to unexpected problems as these entries are always increasing and have an aspect of uniqueness about them. For ctSERNUMhdr, ctLOGEOFhdr and ctPHYEOFhdr, PUTHDR() behaves as before (creating pre-image space entries, restoring old value on abort, setting the new value at the time of the call) except that on commit the header value is not reset to the new value. The prior behavior can be restored by adding this keyword option.

 

COMPATIBILITY RANGE_NO_NXTKEY

COMPATIBILITY RANGE_NO_NXTKEY

Range performance can be enhanced using NXTKEY() instead of GTKEY() to skip over records that do not meet range and/or filter criteria during range operations. A modification was made to enable this behavior by default. This option disables this feature.

 

COMPATIBILITY REPLICATION_TRAN_LIST

COMPATIBILITY REPLICATION_TRAN_LIST

Makes the checkpoint's beginning-log-position-list for active transactions included in checkpoints. This also applies to the pending SUCTRAN list.

 

COMPATIBILITY REVERT_TO_V6HDR

COMPATIBILITY REVERT_TO_V6HDR

Version 9 of FairCom DB introduced extended headers for all newly created files by default. Previously, this mode was only enabled with calls from an Xtd8 specific function and defining the XCREblk structure.

The advantage of this new approach is that 6-byte transaction numbers are used by default, which avoids potential unexpected transaction number overflows, or in some cases, encountering error R6BT_ERR (745, 6BTRAN file required).

This feature can be disabled with the following keyword should this be necessary for backward compatibility:

COMPATIBILITY REVERT_TO_V6HDR

Standalone applications can disable this support by setting the cth6flg global variable to any non-zero value.

Default: OFF

 

COMPATIBILITY REWRITE_KEY_ERROR

COMPATIBILITY REWRITE_KEY_ERROR

The key assembly routine that processes a record image to extract key segments and compose key values may return an error condition, SDAT_ERR, if data is not available (say because of a missing or truncated field), or if some other error code if a problem arises such as a lack of Unicode support for a Unicode key. The add record routines properly return an error if a key assembly error occurs, but the rewrite routines simply treated the key error equivalent to a NUL or missing key. This is not expected to be a common occurrence since it generally takes a badly formed record image. The rewrite routines now return an error on a failed key assembly by default. This keyword reverts to the prior behavior.