A FairCom DB data or index file can fail to open for a variety of reasons. This section introduces a server configuration keyword that can be used to log system error details in the event of failed file open, create, close, delete and rename operations. The remainder of the section focuses on specific FairCom DB errors returned by FairCom DB file open API functions and ways to resolve the errors.
The FairCom DB configuration keyword DIAGNOSTICS LOWL_FILE_IO is useful in troubleshooting file open, create, close, delete, and rename errors. This keyword causes the server to log to the server status log, CTSTATUS.FCS, the filename and system error code for failed file open, create, close, delete, and rename operations. Although client applications have access to system errors through the c tree global variable sysiocod, it can be useful to have the server log these errors. For example: An end-user has problems opening a file. The end-user copied the data file from a CD-ROM to the hard disk leaving the file marked read-only. When the user attempted to open these files, the open failed with FairCom DB error 12. Adding the DIAGNOSTICS LOWL_FILE_IO keyword directed the Server to log the system error code to CTSTATUS.FCS which helped identify that the file open failed because the file was marked read-only.
Error description:
Could not open file: not there or locked.
Possible causes:
Troubleshooting steps:
Error description:
File corrupt at open.
Possible causes:
FairCom DB sets an update flag in the header of FairCom DB data and index files on the first update to the file after the file is opened. The server resets the update flag when the file is physically closed (after all updated cache pages for the file are written to disk). When the server finds the update flag still set when opening the file, the server considers this to mean that the file was updated but was not properly closed, and so the state of the file is unknown. For example, if a file is updated and then the server terminates abnormally, the update flag remains set, which indicates that unwritten updates might not have been written to the file. Error 14 is most likely to occur for PREIMG and non-transaction files. Because the server’s automatic recovery processes TRNLOG files in the event of an abnormal server termination, error 14 is not expected for TRNLOG files unless automatic recovery fails. See the discussion of TRNLOG, PREIMG, and non-transaction files for full details about caching and the state of files in the event of an abnormal server termination.
Troubleshooting steps:
Error description:
Cache page size error.
Possible causes:
When a superfile is opened, the index node size currently in effect must be the same as the index node size at the time the superfile was created. This is not usually a problem unless one wishes to move the file between different environments. Error 417 results if the node size does not match. By contrast, an ordinary index file can be opened as long as the current node size is at least as large as the node size at the time the index file was created.
Troubleshooting steps:
To resolve this error, either:
Error description:
Group access denied.
Possible causes:
The user that is attempting to open a file is not a member of a group with access to the file.
Troubleshooting steps:
Use ctadmn to list the file permissions assigned to the file. To avoid this error, either add the user to a group that has permission to access the file or change the file permissions to allow the user to access the file.
Error description:
File password invalid.
Possible causes:
A password is assigned to the file and the file password specified when opening the file is incorrect.
Troubleshooting steps:
Specify the correct file password for the file, or use the ctadmn utility to change or reset the file’s password.