Informix Error -32402
-32402 The user cannot change the dbspace name when altering an existing table.
You have specified the location in which to table is to be stored. You have explicitly specified a dbspace or the dbspace of the database has already been used. When you attempted to alter a table, you tried to change the dbspace in which the table is stored. This action is illegal. You can specify the dbspace only when you create the table.
Download any data in the existing table. Drop that table. Create a new table. Specify the dbspace that you want to use and upload the data into the new table.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-32402 fires when an ALTER TABLE/DB-Access session attempts to change the dbspace a
table is stored in — per the official guidance, the dbspace can only be specified at
table creation.
- An attempt to change a table's storage dbspace via alter, per the official guidance — the direct, only cause.
Solutions / Resolution
- Download the table's data, drop the table, create a new table specifying the desired dbspace, and upload the data into it, per the official guidance.
Examples
N/A
No specific triggering statement is documented — the dbspace restriction applies generally to any alter attempt.
Diagnostic Checks
- Confirm the change being requested is to the storage dbspace, and plan a download/drop/recreate/upload cycle instead of an alter.
Related Errors / Related Topics
- -32401 — "The initial extent size cannot be changed when altering a table." The same class of restriction, on the initial-extent size rather than the dbspace.
A table's storage dbspace can't be changed via ALTER TABLE — recreate the table in the
desired dbspace.