Informix Error -261
-261 Cannot create file for table table-name.
In general, the database server cannot create the file that will represent this table. Check the accompanying ISAM error code for more information. The file would be created in the database.dbs directory (unless you supplied an IN pathname clause) with IBM Informix SE. Its filename would begin with the first few letters of table-name, followed by a 3-digit number and the suffix .dat, or .idx. With IBM Informix SE, a problem might exist with file permissions, or possibly the disk is full.
IBM Informix Dynamic Server, IBM Informix Universal Server, and IBM Informix OnLine Dynamic Server allow table fragmentation, which might involve extensive use of dbspaces. You need to check the dbspace that was specified for the table. If no dbspace was specified, then the dbspace in which the database was created is used. For database creation, if no dbspace is specified, then the rootdbs is used. The specified dbspace might not exist, or the disk might be full.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-261 is the ordinary-CREATE TABLE counterpart to -225's system-catalog-specific version,
but the exact mechanics differ meaningfully by product — worth understanding which applies before
troubleshooting further.
For IBM Informix SE:
- File permissions or full disk in the target directory — the file is created in
database.dbs(or a specifiedINpathname), named from the table name plus a 3-digit number and a.dat/.idxsuffix.
For Dynamic Server, Universal Server, and OnLine Dynamic Server:
- The specified dbspace doesn't exist, or lacks available space.
- If no dbspace was specified explicitly, the database's default dbspace is used instead —
and if the database itself was created without specifying one,
rootdbsis used. This matters diagnostically: aCREATE TABLEwith noINclause can fail because of space or existence issues in a dbspace nobody explicitly named in the failing statement at all.
Solutions / Resolution
- Check the accompanying ISAM error code and OS-level messages first.
- For SE, check file permissions and disk space in the target directory
(
database.dbsor the specifiedINpathname). - For Dynamic Server/Universal Server/OnLine Dynamic Server, confirm the target dbspace
exists and has available space. If no dbspace was specified in the statement, check the
database's actual default dbspace (or
rootdbs) — that's what's silently being used, and likely what's actually constrained.
Examples
SE: disk full in the target directory
df -h /informix/database.dbs
Dynamic Server: the silent default dbspace
CREATE TABLE customer (id INT, name VARCHAR(50));
-- no IN clause specified — this lands in the database's default
-- dbspace, or rootdbs if the database itself didn't specify one
onstat -d
-- check the actual default/rootdbs space's availability, not just
-- whatever dbspace was assumed
Diagnostic Checks
- Check the accompanying ISAM error code.
- For SE, check permissions and space in
database.dbsor the specifiedINpathname. - For the Dynamic Server family, confirm which dbspace is actually being targeted — explicit,
database default, or
rootdbs— and check its space and existence specifically.
Related Errors / Related Topics
- -225 — "Cannot create file for system catalog table-name." The direct sibling — same
accompanying-code pattern, applied to system catalog tables created during
CREATE DATABASErather than ordinary user tables. - -130 — "ISAM error: no such dbspace." Relevant for the Dynamic Server branch if the target dbspace doesn't exist at all.
If no dbspace was named explicitly in the CREATE TABLE, check the database's actual default
dbspace (or rootdbs) — that's the space actually being used, and the one likely to be
constrained.