Product Documentation

c-treeACE V10.0 Update Guide

Previous Topic

Next Topic

c-treeACE on Windows now Prevents External Processes from Accessing Open Files

For c-tree data and index files that do not use the DUPCHANEL filemode, c-treeACE for Windows now opens files in shared read-only mode such that only c-treeACE can write to the files.

The c-tree error code, FNAC_ERR (920), is now returned when a file exists but is not accessible, for example, due to file system permission settings or file sharing restrictions. If another process has a c-tree data or index file open for write access and c-treeACE fails to open the file, the file open fails with error 920, and the sysiocod is set to the system error code.

For a c-treeACE SQL client, error -17920 corresponds to a c-tree error 920. For example, if a process opens a data file with write access and then isql attempts to open the table, the c-treeACE SQL logs the following status log entry:

error(-17920): CT - The file exists but could not be accessed: check for permission or sharing restrictions

Important Notes

  • This feature is only available on Windows.
  • A process can still write to a c-tree data or index file that is not currently open by c-treeACE. This includes files that use the ctVIRTUAL filemode if c-treeACE has “virtually closed” the file, that is, if it has closed the file descriptor for that file even though the file remains logically open.
  • If a process has the file open for write access and c-treeACE attempts to open the file for write access (and read-only sharing), c-treeACE will fail to open the file. Previously, c-treeACE was able to open the file in this situation.
  • There are two types of file opens that are considered:
    • Standard physical file opens (in which the file descriptor is stored in the system file control block list). In this case the file is opened for read/write access and read-only sharing is permitted.
    • Special file opens (for example, when replication opens a transaction log, or when the c-tree Server opens a file to check if it already has the file open). In this case the file is opened for read-only access and read/write sharing is permitted. This is necessary as c-treeACE may already have the file open for write access.

A configuration option, COMPATIBILITY OPEN_SHARE_RW, is available to restore the previous behavior of opening the files with read/write share access.

TOCIndex