Informix Error -9855: Improper value used for purpose purpose_name for access method.
Cause and resolution
Improper value used for purpose purpose_name for access method.
A purpose has been used with an improper value in a CREATE ACCESS_METHOD or ALTER ACCESS_METHOD statement. For example, an integer cannot be used for AM_SPTYPE. Use the proper type of value for the purpose.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-9855 fires when a purpose in a CREATE/ALTER ACCESS_METHOD statement is assigned an improper value — per the official guidance.
- A value of the wrong type assigned to a purpose, per the official guidance — the direct, only cause; for example, an integer can't be used for AM_SPTYPE.
Solutions / Resolution
- Use the proper type of value for the purpose, per the official guidance.
Examples
An improper value for AM_SPTYPE
CREATE PRIMARY ACCESS_METHOD my_am (am_sptype = 5, ...); -- -9855: expects a character code
Corrected
CREATE PRIMARY ACCESS_METHOD my_am (am_sptype = 'B', ...);
Diagnostic Checks
- Check each purpose's assigned value against its expected type, and correct any mismatch.
Related Errors / Related Topics
- -9852 — "Improper purpose purpose_name used for access method." The related purpose- validity error, on the purpose's name/combination rather than its assigned value.
An access-method purpose was assigned a value of the wrong type — use the proper value type.