Informix Error -895
-895 Cannot create violations/diagnostics table.
The user has issued a START VIOLATIONS TABLE statement for a target table. The database server is not able to create the violations and diagnostics tables for this target table. Any one of the following situations might be the reason for the failure:
* The target table already has a violations and diagnostics table.
* The names that are specified for the violations and diagnostics table in the START VIOLATIONS TABLE statement are not valid. For example, if you omitted the USING clause from the statement and the number of characters in the target table name plus four characters is longer than the maximum identifier length, the generated names of the violations and diagnostics tables would be longer than the maximum identifier length. If the names of the violations and diagnostics tables are invalid for this reason, the user can give explicit names to the violations and diagnostics tables in the USING clause of the START VIOLATIONS TABLE statement to rectify the problem.
* The names that were specified for the violations and diagnostics tables in the START VIOLATIONS TABLE statement match the names of existing tables in the database.
* The target table contains columns with the names informix_tupleid or informix_optype. Because these two column names would duplicate the informix_tupleid or informix_optype columns in the violations table, the database server cannot create the violations table.
* The target table is a temporary table.
* The target table is serving as a violations or diagnostics table for some other table.
* The target table is a system catalog table.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-895 fires when START VIOLATIONS TABLE can't create the violations and diagnostics tables for
a target table — per the official guidance, any of several specific conditions can cause this.
- The target table already has a violations and diagnostics table, per the official guidance.
- The specified violations/diagnostics table names are invalid, per the official guidance.
- The specified names collide with existing tables in the database, per the official guidance.
- The target table contains a column named
informix_tupleidorinformix_optype, per the official guidance — these are reserved names the violations/diagnostics mechanism itself needs. - The target table is a temporary table, per the official guidance — the same standing family of temp-table restrictions as elsewhere in this reference.
- The target table is itself serving as a violations or diagnostics table for some other table, per the official guidance.
- The target table is a system catalog table, per the official guidance.
Solutions / Resolution
- Check the target table for an existing violations/diagnostics table, per the official guidance, before attempting to start a new one.
- Check the specified table names for validity and for collisions with existing tables, per the official guidance.
- Check the target table's columns for
informix_tupleid/informix_optype, per the official guidance, and rename them if present. - Confirm the target isn't a temporary table, another table's violations/diagnostics table, or a system catalog table, per the official guidance — none of these support having their own violations/diagnostics table.
Examples
Checking for reserved column names
SELECT colname FROM syscolumns
WHERE tabid = (SELECT tabid FROM systables WHERE tabname = 'orders')
AND colname IN ('informix_tupleid', 'informix_optype');
Diagnostic Checks
- Work through each of the seven named conditions to identify which one applies to the
specific
START VIOLATIONS TABLEfailure.
Related Errors / Related Topics
- -896 — "Violations table is not started for the target table." A related violations-table-lifecycle error, about a missing violations table rather than a creation failure.
- -897 — "Cannot modify/drop a violations/diagnostics table." A related restriction, about altering an existing violations/diagnostics table.
- -898 — "Cannot alter a table which has associated violations/diagnostics tables." A related restriction, about altering the target table itself once it has one.
Seven distinct possible causes share this one message — work through the official guidance's list to find which applies.