Product Documentation

Knowledgebase

Previous Topic

Next Topic

Errors Occur When Opening FairCom DB Files

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.

In This Section

Enabling Low-Level File I/O Diagnostics

FairCom DB Error 12: FNOP_ERR

FairCom DB Error 14: FCRP_ERR

FairCom DB Error 417: SPAG_ERR

FairCom DB Error 456: SACS_ERR

FairCom DB Error 457: SPWD_ERR

Previous Topic

Next Topic

Enabling Low-Level File I/O Diagnostics

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.

Previous Topic

Next Topic

FairCom DB Error 12: FNOP_ERR

Error description:
Could not open file: not there or locked.

Possible causes:

  1. The specified filename or path is incorrect (no file by that name exists).
  2. The specified file is already open using a file access mode that conflicts with the specified access mode. For example, if the file is open in EXCLUSIVE mode, attempting to open the file in SHARED mode fails (and vice-versa).
  3. The server does not have the appropriate permission to access the file (for example the file is marked read-only or system file security attributes are set to disallow access by the user and group under which the server is running).

Troubleshooting steps:

  1. Verify that the specified filename and path are correct. Note that filenames on some operating systems are case-sensitive. If using ISAM open functions, it is possible that the data file open succeeded but an index file open failed. Check the isam_fil global variable to determine which file open failed. Try opening the data and index files individually using low-level functions to determine which open fails.
  2. Check the FairCom DB global variable sysiocod. If it is set to -8 (FCNF_COD), this indicates that the open failed due to conflicting access modes.
  3. Check the file permissions to verify that FairCom DB has the appropriate file access permissions (read/write access is usually what is required).
  4. If the failed open occurs on a superfile member, verify that the member exists using the FairCom DB API function GetSuperFileNames() and that the member name is specified exactly as it appears in the superfile directory index (member names are always case-sensitive).

Previous Topic

Next Topic

FairCom DB Error 14: FCRP_ERR

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:

  1. If the file is a TRNLOG file, review the sequence of events that led up to the error 14. If FairCom DB terminated abnormally, restarting the server should cause automatic recovery to occur, restoring the TRNLOG files to a consistent transaction state and avoiding the possibility of error 14 occurring.
  2. If the file is a PREIMG or non-transaction file and the server terminated abnormally, error 14 can be avoided by rebuilding the affected files, or re-creating the files and re-loading their data from an external source, or by restoring backup copies of the files. To avoid data loss and error 14 for non-TRNLOG files in the event of an abnormal server termination, consider using the WRITETHRU filemode and WRITETHRU server configuration options. See the discussion of the WRITETHRU filemode for details.

Previous Topic

Next Topic

FairCom DB Error 417: SPAG_ERR

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:

  1. Re-create the superfile using the page size setting currently used by FairCom DB, or
  2. Change the server’s PAGE_SIZE setting to ensure it matches the page size used when creating the superfile and restart FairCom DB.

Previous Topic

Next Topic

FairCom DB Error 456: SACS_ERR

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.

Previous Topic

Next Topic

FairCom DB Error 457: SPWD_ERR

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.

TOCIndex