Informix Error -8228: Cannot GRANT or REVOKE SETSESSIONAUTH privilege to or from PUBLIC.
Cause and resolution
Cannot GRANT or REVOKE SETSESSIONAUTH privilege to or from PUBLIC.
To grant or revoke SETSESSIONAUTH privilege to or from PUBLIC is not allowed. Specify an individual user or role name.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-8228 fires when GRANT/REVOKE SETSESSIONAUTH targets PUBLIC — per the official
guidance, this isn't allowed.
PUBLICgiven as the target ofGRANT/REVOKE SETSESSIONAUTH, per the official guidance — the direct, only cause.
Solutions / Resolution
- Specify an individual user or role name, per the official guidance, instead of
PUBLIC.
Examples
Granting SETSESSIONAUTH to PUBLIC
GRANT SETSESSIONAUTH TO PUBLIC;
-- -8228: PUBLIC cannot receive SETSESSIONAUTH
Corrected
GRANT SETSESSIONAUTH TO jdoe;
Diagnostic Checks
- Check the target of the
GRANT/REVOKE SETSESSIONAUTHstatement, and use an individual user or role name instead ofPUBLIC.
Related Errors / Related Topics
- -8217 — "Cannot specify PUBLIC or a role name." A related grant-target restriction,
for security labels/exemptions which disallow roles too, rather than
SETSESSIONAUTHwhich allows roles but notPUBLIC.
GRANT/REVOKE SETSESSIONAUTH targeted PUBLIC — use an individual user or role name.