Informix Error -9996: Distinct type (<type-name>) already exists in database.
Cause and resolution
Distinct type (<type-name>) already exists in database.
Distinct types must be unique within the schema (ANSI mode) or database.
Redefine the type with a new name or remove the existing name before attempting to create your version.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-9996 fires when a CREATE DISTINCT TYPE statement's name is already in use — per the official guidance; distinct types must be unique within the schema (ANSI mode) or database.
- The distinct type name already in use, per the official guidance — the direct, only cause.
Solutions / Resolution
- Redefine the type with a new name, per the official guidance.
- Or remove the existing name before creating the new version, per the official guidance.
Examples
Reusing an existing distinct type name
CREATE DISTINCT TYPE di AS INT; -- -9996 if di already exists
Corrected
CREATE DISTINCT TYPE di_v2 AS INT;
Diagnostic Checks
- Check the system catalog for the existing distinct type name, and choose an unused name or drop the existing type.
Related Errors / Related Topics
- -9631 — "Opaque type (type_name) already exists in database." The same class of duplicate-name error, for opaque types rather than distinct types.
The distinct type name already exists — choose a new name or drop the existing type.