Informix Error -8261: Cannot secure rows in a table without a default value for the IDSSECURITYLABEL column.
Cause and resolution
Cannot secure rows in a table without a default value for the IDSSECURITYLABEL column.
A non-empty table cannot be protected with row-level granularity without specifying a default value for the IDSSECURITYLABEL column. Change the ALTER TABLE statement to specify the DEFAULT clause for the IDSSECUIRTYLABEL column.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-8261 fires when row-level protection is added to a non-empty table without a DEFAULT for
the IDSSECURITYLABEL column — per the official guidance.
- A non-empty table given row-level protection without a
DEFAULTclause on theIDSSECURITYLABELcolumn, per the official guidance — the direct, only cause.
Solutions / Resolution
- Change the
ALTER TABLEstatement to specify theDEFAULTclause for theIDSSECURITYLABELcolumn, per the official guidance.
Examples
Missing DEFAULT on row-level protection
ALTER TABLE orders ADD (seclabel IDSSECURITYLABEL);
-- -8261: no DEFAULT given for existing rows
Corrected
ALTER TABLE orders ADD (seclabel IDSSECURITYLABEL DEFAULT 'public');
Diagnostic Checks
- Check whether the table already has rows, and confirm the
ALTER TABLEstatement includes aDEFAULTfor theIDSSECURITYLABELcolumn if so.
Related Errors / Related Topics
- -8244 — "The value
provided for row security label column is invalid." A related row-security-label error, about an invalid value rather than a missing default.
Row-level protection needs a DEFAULT value for IDSSECURITYLABEL on a non-empty table —
add one to the ALTER TABLE statement.