Informix Error -9631: Opaque type (type_name) already exists in database.
Cause and resolution
Opaque type (type_name) already exists in database.
Opaque types must be unique within the schema (ANSI mode) or database. Be sure that the type does not already exist.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-9631 fires when a CREATE OPAQUE TYPE statement's name is already used in the schema (ANSI mode) or database — per the official guidance.
- The opaque type name already in use, per the official guidance — the direct, only cause; opaque types must be unique within the schema or database.
Solutions / Resolution
- Make sure the type doesn't already exist, per the official guidance, and choose a new name if it does.
Examples
Reusing an existing opaque type name
CREATE OPAQUE TYPE my_type (internallength = 16, ...);
-- -9631 if my_type already exists
Corrected
CREATE OPAQUE TYPE my_type_v2 (internallength = 16, ...);
Diagnostic Checks
- Check the system catalog for the existing opaque type name, and choose an unused name.
Related Errors / Related Topics
- -9628 — "Type (type_name) not found." The inverse case — referencing a type name that doesn't exist.
The opaque type name already exists — choose an unused name.