Informix Error -6038: An alias cannot be an alias of an existing alias.
Cause and resolution
An alias cannot be an alias of an existing alias.
The oldname parameter that was presented to dbalias() has been defined as an alias in a previous call. The program can define multiple aliases for a table, but it cannot define an alias for an alias. Review the program logic, and change it so that the oldname parameter is always the name of a real table in the database.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-6038 fires when dbalias()'s oldname parameter is itself already an alias — per the archived
catalogue, a table can have multiple aliases, but an alias cannot itself be aliased.
oldnamenaming an existing alias rather than a real table, per the archived catalogue — the direct, only cause.
Solutions / Resolution
- Always pass a real table name as
oldname, per the archived catalogue, never an existing alias.
Examples
N/A
No specific triggering statement is documented beyond the function-level condition described above.
Diagnostic Checks
- Confirm
oldnamenames a genuine table, not a previously-defined alias.
Related Errors / Related Topics
- -6036 — "An aliasname is the same as an existing table name within the database."
- -6037 — "An aliasname has been used previously."
- -6040 — "The aliased table was not found as a table name in the database."
oldname must always be a real table name — a table can have multiple aliases, but an alias cannot itself be aliased.