Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

SetSystemConfigurationOption

SetSystemConfigurationOption() dynamically changes server configuration settings at runtime.

Declaration

NINT SetSystemConfigurationOption(NINT option, constTEXT * value);

Short Name

ctSETCFG()

Description

SetSystemConfigurationOption() allows a FairCom Server configuration to be changed at run time. This means you do not have to restart the server to operate with these specified configuration changes. This allows utilities and other diagnostic monitoring tools to directly call the server to activate or inactivate various server configuration options.


setcfgCONFIG_OPTION

setcfgCONFIG_OPTION is a general-purpose option used to set values for settings by passing a string value identical to a line in the server configuration file. Note that this option also supports the other existing options, making it possible to call ctSETCFG(setcfgCONFIG_OPTION, "CHECKPOINT_MONITOR YES").

Dynamic Adjustment Support

The following keywords support dynamic adjustment using setcfgCONFIG_OPTION. See the FairCom DB Configuration Options for keyword specific documentation.

  • FUNCTION_MONITOR
  • CHECKPOINT_MONITOR
  • MEMORY_MONITOR
  • REQUEST_TIME_MONITOR
  • DYNAMIC_DUMP_DEFER
  • DYNAMIC_DUMP_DEFER_INTERVAL
  • VSS_WRITER
  • VSS_WRITER_QUIESCE_TIMEOUT
  • SQL_TRACE_CTREE_ERROR
  • MAX_FILE_WAIT_SECS
  • MAX_DFRIDX_LOGS
  • MAX_REPL_LOGS
  • DELSTK_COMMIT_SEC
  • CHECKLOCK_FILE
  • AUTOTRAN_ON_CREATE
  • UNCSEG_KEYCOMPRESS
  • FILESYS_COMPRESS_UNCSEG
  • SHMEM_MAX_SPINNERS
  • SYNC_COMMIT_MAX_SPINNERS
  • READONLY_SERVER
  • LOCAL_CONNECTION_ONLY
  • REPL_NODEID
  • LEAF_NODE_READ_LOCK
  • OPEN_FILES_ALERT_THRESHOLD
  • DYNAMIC_DUMP_SYNC_INTERVAL
  • NONTRAN_FILESYS_FLUSH_OFF
  • SQL_SERVER_LOG_SIZE
  • FILE_CLOSE_FLUSH
  • PENDING_FILE_OPEN_RETRY_LIMIT
  • OPTIMIZE_FILE_OPEN
  • SYSTEM_FILE_ID_LIST
  • CLEANUP_ABLIST_ON_ABORT
  • STACK_DUMP
  • CHECK_FILENAME_VALIDITY
  • SYNC_COMMIT_TIMEOUT
  • REPL_USE_LAST_LOGPOS
  • ABANDONED_QUIET_SUSPEND_LOGON
  • MULTILINE_STATUS_LOG_MESSAGE
  • REPLICATE_ALTER_TABLE
  • BLOCKING_OPEN_RETRY_LIMIT
  • BLOCKING_OPEN_RETRY_DEFER
  • SYSCLOSE_REOPEN_CHECK_DIFF
  • SET_CACHE_OPTIONS
  • SHMEM_CONNECT_TIMEOUT
  • FLEXREC_OPTIMIZE
  • QUIET_MAX_WAIT
  • SORT_MEMORY
  • MAX_HANDLES
  • MAX_REBUILD_QUEUE

Partial Dynamic Adjustment Support

The following keywords have some sub-options that may be changed, see below for additional details.

  • DIAGNOSTICS
  • COMPATIBILITY
  • SUBSYSTEM

Disabling Binary Sub-Options

Use a tilda (~) character as a prefix to negate the sub-option to turn it off. This applies to the following keywords

  • SQL_DEBUG
  • DIAGNOSTICS
  • CTSTATUS_MASK
  • COMPATIBILITY


DIAGNOSTICS Sub-Options

Not all sub-options are changeable at runtime. Prefix the sub-option with a tilde (~) to turn it off.

The following suboptions are supported.

  • LOWL_FILE_IO
  • VSS_WRITER
  • PTADMIN
  • REPLICATE
  • FULL_DUMP
  • BACKGROUND_FLUSH
  • BACKGROUND_FLUSH_BUCKETS
  • MAX_ACTIVE_CONNECTIONS
  • DFRIDX
  • READ_ERR
  • UNOD_ERR
  • CMTLOK
  • TR_RDIF_ERR
  • TR_TRAN_ERR
  • CHECKLOCK
  • LOG_PURGE
  • LDAP
  • CHECK_KEY_MARKS
  • FALG_ERR
  • DMAP_ERR
  • POPN_ERR
  • RRED_ERR
  • RESIZE_CACHE
  • INIX_ERR
  • SYSTEM_FILE_ID_LIST
  • RECYCLE_BIN
  • SYNCREPL
  • FILE_BLOCK

COMPATIBILITY Sub-Options

Not all sub-options are changeable at runtime. Prefix the sub-option with a tilda (~) to turn it off.

The following sub-options are supported.

  • SQLIMPORT_ADMIN_PASSWORD
  • COPY_FILE_OPEN_SHARED

SUBSYSTEM details and supported Sub-Options

Keywords belonging to a SUBSYSTEM may support changes at runtime. To do so requires specific formatting like that required in the server configuration file. Multiple sub-options may be changed at once.

The following are SUBSYSTEM values with at least one supported sub-option.

  • SUBSYSTEM SQL LATTE
  • SUBSYSTEM TRNLOG AUTO_RESTORE_POINT
  • SUBSYSTEM EVENT DISK_FULL_ACTION
  • SUBSYSTEM SECURITY PASSWORD
  • SUBSYSTEM EXTERNAL_KEY_STORE AWS
  • SUBSYSTEM AUDIT LOG
  • SUBSYSTEM CTFILE RECYCLE_BIN
  • SUBSYSTEM CACHE PRIME_CACHE_AT_STARTUP


Specifying any other option value than those shown above causes ctSETCFG() to return error PBAD_ERR (749).

Options besides setcfgCONFIG_OPTION

Option may be one of the following FairCom Server configuration supported values (the new setting value specified as a string).

Option

Supported Values

Description

setcfgCHECKPOINT_MONITOR

YES | NO | DETAIL

Dynamically turn on and off the Checkpoint Monitor.

setcfgCTSTATUS_MASK

WARNING_AUTO_TRNLOG

DYNAMIC_DUMP_FILES

Dynamically turn on and off masking of messages specified by value in CTSTATUS.FCS.

A tilda (~) character prefix negates the setcfgCTSTATUS_MASK options thus turning them off.

setcfgDIAGNOSTICS

LOWL_FILE_IO

VSS_WRITER

REPLICATE

Dynamically turn on or off supported DIAGNOSTICS keywords.

A tilda (~) character prefix negates the setcfgDIAGNOSTICS options thus turning them off.

setcfgDYNAMIC_DUMP_DEFER

<numeric value>

Dynamically set the Dynamic Dump defer (sleep) time for enhanced on-line performance. value is in milliseconds.

setcfgDYNAMIC_DUMP_DEFER_INTERVAL

<blocks>

Pauses the dynamic dump for DYNAMIC_DUMP_DEFER milliseconds each time it writes specified number of 64 KB blocks of data to dynamic dump stream file.

setcfgFUNCTION_MONITOR

YES | NO | <filename>

Dynamically turn on and off the Function Monitor.

setcfgMAX_FILE_WAIT_SECS

<seconds> | -1 | 0

Change th number of seconds a user thread waits for internal threads to close file before retrying.

-1 disables this feature.

0 (default) sets no wait limit.

setcfgMEMORY_MONITOR

<numeric value>

Dynamically turn on and off Memory Monitor. value is in bytes.

setcfgREQUEST_TIME_MONITOR

<numeric value>

Dynamically set the function monitoring time interval. value is in seconds.

setcfgVSS_WRITER

YES | NO

Dynamically enable VSS writer for Windows.

setcfgLOADKEY_OPTION

LOADKEY_LEAF_PCT_FULL

Dynamically modify rebuild options to create nodes less than 100% capacity.

Details

An attempt to change an option that is specified in a FairCom Server encrypted settings file (ctsrvr.set) will fail with a "SETO_ERR (804) error, cannot override option specified in settings file." ctSETCFG() can only be called by a member of the ADMIN group; otherwise it will fail with error LADM_ERR (589).

The function monitor file output now also includes a time stamp.

Return Values

Value

Symbolic Constant

Explanation

0

NO_ERROR

Successful operation.

589

LADM_ERR

Member of ADMIN group required.

749

PBAD_ERR

Bad parameter value. Can be caused by any of these conditions:

a) segcount is less than or equal to zero.

b) lrange is NULL.

c) invalid operator specified.

d) between operator specified but urange is NULL.

804

SETO_ERR

cannot override configuration option that was specified in settings file

See c-tree Error Codes for a complete listing of valid c-tree error values.

Examples

/* Enable function monitor logging to a file. */
ctSETCFG(setcfgFUNCTION_MONITOR, "fncmon.log");


/* Dynamically set the Dynamic Dump defer time */
ctSETCFG(setcfgDYNAMIC_DUMP_DEFER, "25");

/* Dynamically turn on masking of Dynamic Dump messages */

ctSETCFG(setcfgCONFIG_OPTION, "CTSTATUS_MASK DYNAMIC_DUMP_FILES");

/* Dynamically disable masking of Dynamic Dump messages */

ctSETCFG(setcfgCONFIG_OPTION "CTSTATUS_MASK ~DYNAMIC_DUMP_FILES");

/* Dynamically set stack generation option to FULL_DUMP */

ctSETCFG(setcfgCONFIG_OPTION "STACK_DUMP FULL_DUMP");

/* Change the SUBSYSTEM SQL LATTE MAX_STORE option to 11 GB */

ctSETCFG(setcfgCONFIG_OPTION,

"SUBSYSTEM SQL LATTE {\nMAX_STORE 11 GB\n}");

/* Change multiple SUBSYSTEM SECURITY PASSWORD options */

const char * newconfig = "SUBSYSTEM SECURITY PASSWORD {\n" \

"MINIMUM_LENGTH 16\n" \

"REQUIRED_CLASSES 2\n" \

"EXPIRE_IN_DAYS 365\n}";

ctSETCFG(setcfgCONFIG_OPTION,newconfig);

History

V11.6 and later adds SQL_DEBUG configurable options.

TOCIndex