Product Documentation

Database Administrator's Guide

Previous Topic

Next Topic

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.

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 name 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 name match filespec have ctCHECKLOCK disabled, and subsequently opened or created data files whose name 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

TOCIndex