Informix Error -9997: No usage privilege on data type (<type-name>). </type-name>
Cause and resolution
No usage privilege on data type (<type-name>). </type-name>
You do not hold the privilege to use this data type, which is a DISTINCT data type that is based on a built-in data type. The creator of this user-defined data type or a DBA must explicitly grant you the Usage privilege on this data type.
You should ask a DBA or the owner of the cast to grant you the Usage privilege on the cast.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-9997 fires when a user lacks the USAGE privilege on a DISTINCT data type based on a built-in type — per the official guidance.
- The creator of the distinct type, or a DBA, not having granted USAGE on it, per the official guidance — the direct, only cause.
Solutions / Resolution
- Ask a DBA or the owner of the type to grant you the USAGE privilege, per the official guidance.
Examples
Granting USAGE on a distinct type
GRANT USAGE ON TYPE di TO myuser;
Diagnostic Checks
- Check the distinct type's USAGE grants for the affected user, and have the owner or a DBA grant it if missing.
Related Errors / Related Topics
- -9629 — "Not owner of type." A related type-usage-privilege error, on opaque types generally rather than a distinct type specifically.
- -9998 — "No privilege to drop a cast of this DISTINCT data type." A related DISTINCT-type privilege error, on dropping a cast rather than general usage.
The user lacked USAGE privilege on the distinct type — have the owner or a DBA grant it.