Informix Error -764
Cause and resolution
Only DBA can run update statistics on a database in this mode.
You tried to run the UPDATE STATISTICS statement with the DROP DISTRIBUTIONS clause on the entire database in a mode other than LOW. Only user informix or the database administrator can do perform this action.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-764 fires when a non-DBA session runs UPDATE STATISTICS ... DROP DISTRIBUTIONS against the
entire database in a mode other than LOW — per the official guidance, this specific combination
(database-wide, non-LOW mode, with DROP DISTRIBUTIONS) requires DBA privilege (or being user
informix).
- A non-DBA session running database-wide
UPDATE STATISTICS MEDIUM/HIGHwithDROP DISTRIBUTIONS, per the official guidance — the direct, only cause. - A maintenance script written assuming ordinary privilege is sufficient for a database-wide statistics operation, not accounting for this specific privilege requirement.
Solutions / Resolution
- Run the statement as user
informixor a DBA-privileged user, per the official guidance — this is the documented, required privilege level for this specific operation. - If DBA privilege genuinely isn't available, scope the
UPDATE STATISTICSto a specific table instead of the whole database, or useLOWmode, if either avoids the restriction for the actual maintenance need. - Check the session's current privilege level:
(SELECT username, usertype FROM sysusers WHERE username = USER;usertype = 'D'indicates DBA privilege, per the same check used for -514.)
Examples
Hitting the restriction
UPDATE STATISTICS MEDIUM DROP DISTRIBUTIONS;
-- as a non-DBA user, this is expected to hit either -764 or -738 depending
-- on server version — see the -738 cross-reference below before assuming
-- which one fires for a given case
Corrected — run as a DBA-privileged user
-- Run by user informix or a DBA-privileged user:
UPDATE STATISTICS MEDIUM DROP DISTRIBUTIONS;
Diagnostic Checks
- Check the session's
usertypeinsysusersto confirm DBA privilege, the same check as -514. - Confirm the statement is genuinely database-wide and non-
LOW-mode withDROP DISTRIBUTIONS, since that specific combination is what triggers the privilege requirement.
Related Errors / Related Topics
- -738 — "DROP DISTRIBUTIONS is only valid in LOW mode." A related
DROP DISTRIBUTIONSrestriction, about mode compatibility rather than privilege level — note this error's own framing impliesDROP DISTRIBUTIONScan appear with non-LOWmodes in the database-wide form that specifically requires DBA privilege, a nuance worth checking against the current server version's documented behavior if -738 and -764 seem to conflict.
A privilege requirement specific to database-wide, non-LOW-mode DROP DISTRIBUTIONS — run as
informix or a DBA-privileged user, or scope the operation to a specific table.