Informix Error -2020: The table table-name could not be opened. The operating system was asked to open it for writing.
Cause and resolution
The table table-name could not be opened. The operating system was asked to open it for writing.
You are using a database server that manages tables as ordinary disk files. The current database is managed as a directory, and tables are files within it. Look for operating-system error messages that might give more information. Locate the database directory (either in the current directory or on a path that is named in the DBPATH environment variable). Check that disk space is available. In UNIX, your personal account does not have to have write access to the directory and table files; however, they must be writable to the group-id informix.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-2020 fires when the database server can't open a table's underlying disk file for writing — per the official guidance, tables are managed as ordinary disk files within a directory structure, so this is typically a filesystem-level permissions or space problem.
- Insufficient disk space, per the official guidance's named check.
- The database directory not existing (in the current directory or the one named by
DBPATH), per the official guidance's named check. - On UNIX, files not writable to the group-id
informix, per the official guidance's named check.
Solutions / Resolution
- Verify adequate disk space is available, per the official guidance.
- Confirm the database directory exists, per the official guidance, checking the current
directory or the
DBPATHenvironment variable. - On UNIX, ensure files are writable to the group-id
informix, per the official guidance. - Check for additional operating-system error messages, per the official guidance, for further context.
Examples
Checking DBPATH and permissions
$ echo "$DBPATH"
$ ls -ld "$DBPATH"
$ df -h "$DBPATH"
Diagnostic Checks
- Check disk space, the database directory's existence (via
DBPATHor the current directory), and group-writable permissions for theinformixgroup.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -2020 in this set yet.
The table's underlying disk file couldn't be opened for writing — check disk space, the database directory, and group permissions.