Informix Error -19802: Name cannot appear as both the role grantor and the role grantee.
Cause and resolution
Name cannot appear as both the role grantor and the role grantee.
A role cannot be granted to itself, either directly or indirectly. Verify if the role grantor and grantee are the correct roles. Check for roles already granted to the role that is being granted.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-19802 fires when a role would be granted to itself, directly or indirectly — per the official guidance.
- A
GRANTstatement's role grantor and grantee being the same name, per the official guidance — the direct case. - An indirect self-grant via roles already granted to the role being granted, per the official guidance — the indirect case.
Solutions / Resolution
- Verify the role grantor and grantee are the correct roles, per the official guidance.
- Check for roles already granted to the role being granted, per the official guidance, to rule out an indirect cycle.
Examples
A role granted to itself
GRANT myrole TO myrole;
-- -19802: myrole cannot be granted to itself
Diagnostic Checks
- Check the grantor/grantee names for a direct match, and check existing role grants for an indirect cycle.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -19802 in this set yet.
A role can't be granted to itself, directly or indirectly — check the grantor/grantee and any existing role grants for a cycle.