Informix Error -8217: Cannot specify PUBLIC or a role name.
Cause and resolution
Cannot specify PUBLIC or a role name.
GRANT or REVOKE SECURITY LABEL or EXEMPTIONS to or from PUBLIC or a role is not allowed. Specify an individual user name.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-8217 fires when GRANT/REVOKE SECURITY LABEL or EXEMPTIONS targets PUBLIC or a role
name — per the official guidance, this isn't allowed.
PUBLICor a role name given as the target ofGRANT/REVOKE SECURITY LABELorEXEMPTIONS, per the official guidance — the direct, only cause.
Solutions / Resolution
- Specify an individual user name, per the official guidance, instead of
PUBLICor a role.
Examples
Granting to PUBLIC
GRANT SECURITY LABEL confidential TO PUBLIC;
-- -8217: PUBLIC/roles cannot receive security labels or exemptions
Corrected
GRANT SECURITY LABEL confidential TO jdoe;
Diagnostic Checks
- Check the target of the
GRANT/REVOKE SECURITY LABEL/EXEMPTIONSstatement, and use an individual user name instead ofPUBLICor a role.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -8217 in this set yet.
GRANT/REVOKE SECURITY LABEL/EXEMPTIONS targeted PUBLIC or a role — use an individual
user name.