Informix Error -9628: Type (type_name) not found.
Cause and resolution
Type (type_name) not found.
The specified type_name could not be found. The datatype name you use should either be a built-in datatype of Informix Dynamic Server or an extended datatype explicitly created by the user/application. If you encounter this error on a Read-only Secondary of an HDR pair, check to see if the specified type_name was ever created on the Primary.
Example of extended datatypes: distinct type, row type, collection type, and opaque type. Before you can use an extended type, you must create it with the CREATE <datatype> TYPE statement. example: CREATE DISTINCT TYPE di AS INT; CREATE ROW TYPE rt (a INT, b CHAR(10)); </datatype>
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-9628 fires when the named data type can't be found — per the official guidance.
- The named type not being a built-in Informix Dynamic Server type nor an extended type the user/application has created, per the official guidance — the direct, only cause.
- On a read-only HDR secondary, the type never having been created on the primary, per the official guidance — a specific variant of the same cause.
Solutions / Resolution
- Create the extended type first with the appropriate CREATE TYPE statement — for
example,
CREATE DISTINCT TYPE di AS INT;— before using it, per the official guidance; extended types include distinct, row, collection, and opaque types. - On a read-only HDR secondary, check whether the type was ever created on the primary, per the official guidance.
Examples
Using an undefined distinct type
CREATE TABLE tab (col di); -- -9628 if di was never created
Corrected
CREATE DISTINCT TYPE di AS INT;
CREATE TABLE tab (col di);
Diagnostic Checks
- Check the system catalog for the named type, and create it if missing; on an HDR secondary, verify it exists on the primary.
Related Errors / Related Topics
- -9629 — "Not owner of type." A related type-usage error, on USAGE permission rather than the type not existing.
The named type doesn't exist — create it with the appropriate CREATE TYPE statement, or check the primary if on an HDR secondary.