Informix Error -9852: Improper purpose purpose_name used for access method.
Cause and resolution
Improper purpose purpose_name used for access method.
A purpose used with the CREATE ACCESS_METHOD or ALTER ACCESS_METHOD statement is improper. It might be spelled incorrectly. Otherwise, it is used incorrectly in combination with the other purposes, or it is a purpose that is not appropriate for the type of access method. For example, an access method cannot be created with AM_DELETE if AM_ROWIDS is not used, and AM_GETBYID cannot be used for a secondary access method. Correct the spelling of the purpose or change one or more of the purposes until the combination of purposes is valid.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-9852 fires when a purpose used in a CREATE/ALTER ACCESS_METHOD statement is improper — per the official guidance.
- A misspelled purpose name, per the official guidance — the first named cause.
- A purpose used incorrectly in combination with the other purposes, per the official guidance — the second named cause; for example, AM_DELETE requires AM_ROWIDS.
- A purpose not appropriate for the access method type, per the official guidance — the third named cause; for example, AM_GETBYID can't be used for a secondary access method.
Solutions / Resolution
- Correct the spelling of the purpose, per the official guidance.
- Change one or more of the purposes until the combination is valid, per the official guidance.
Examples
N/A
No specific triggering statement is documented; the specific purpose combination varies.
Diagnostic Checks
- Check each purpose's spelling and its combination with the other purposes and the access method type, and correct whichever is invalid.
Related Errors / Related Topics
- -9853 — "Duplicate purpose purpose_name used for access method." A related purpose- validity error, on duplication rather than impropriety.
- -9854 — "Required purpose purpose_name not used for access method." A related purpose-validity error, on a missing required purpose rather than an improper one.
- -9855 — "Improper value used for purpose purpose_name for access method." A related purpose-validity error, on the assigned value rather than the purpose's name/combination.
A purpose in the CREATE/ALTER ACCESS_METHOD statement was misspelled, wrongly combined, or inappropriate for the access method type — correct it.