Informix Error -563: Cannot acquire exclusive lock for database conversion.
Cause and resolution
Cannot acquire exclusive lock for database conversion.
You are running a new version of the database server, and you have just opened a database for the first time with this level of the software. The database server has tried to upgrade the database automatically, probably by defining an additional system catalog table. However, it needs to lock the database for exclusive use to do this conversion, and some other user has the database open. Wait a short time, and try this statement again. At that time, the database might be free (or another user's action might have updated it).
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-563 fires the first time a database created under an older server version is opened by a newer server version that needs to automatically upgrade its catalog — the upgrade requires an exclusive lock on the database, and another session already has it open.
- Another session holding the database open at the exact moment the first connection under the new server version tries to trigger the automatic catalog upgrade — per the official guidance, the direct, only cause.
- Multiple application instances connecting simultaneously right after a server upgrade, each racing to be the one that triggers (and needs exclusive access for) the conversion.
- A long-running session left open across the server upgrade window, holding the database open when the first post-upgrade connection attempt occurs.
Solutions / Resolution
- Wait a short time and retry, per the official guidance — the database may become free, or another session's action may complete the needed state.
- Identify and close the session holding the database open, if retries keep failing, so the
automatic conversion can acquire its exclusive lock:
to find sessions with the database open, and coordinate closing them.onstat -g ses - Schedule the first post-upgrade connection deliberately, during a maintenance window with no other sessions open, rather than letting application instances race to trigger the conversion concurrently.
Examples
Retrying after a short wait
DATABASE stores7;
-- -563: another session has the database open during automatic conversion
-- wait briefly, then:
DATABASE stores7;
-- succeeds once the database is free
Diagnostic Checks
- Run
onstat -g sesto find which sessions currently have the database open. - Coordinate a quiet window (no other sessions connecting to the database) for the first connection after a server version upgrade, to let the automatic conversion complete cleanly.
Related Errors / Related Topics
- -562 — "Database conversion failed." A related automatic-catalog-upgrade error: the conversion actually started and failed, rather than never being able to acquire the lock to start.
A lock-contention condition during the one-time automatic catalog upgrade — wait and retry, or close the session holding the database open.