Informix Error -425
-425 Database is currently opened by another user.
Another user has opened the requested database in exclusive mode, or you have more than one connection to the database server. Repeat the statement after a short delay or when the database is known to be idle.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-425 fires when a statement requiring exclusive database access (typically DATABASE ... EXCLUSIVE) can't proceed because another user has the database open in exclusive mode already,
or because there are multiple existing connections to it.
- Another session already holds the database open in
EXCLUSIVEmode. - Multiple ordinary (non-exclusive) connections to the database exist, blocking a new session's attempt to open it exclusively.
- A maintenance operation requiring exclusive access is attempted during normal application traffic, when other sessions are actively connected.
Solutions / Resolution
- Repeat the statement after a short delay, or when the database is known to be idle, per the official guidance — many occurrences are transient, resolving once other sessions disconnect.
- Identify other sessions currently connected to the database, to understand what's holding
it open:
onstat -g ses -- lists active sessions; check each session's detail -- (onstat -g ses <sid>) for the database it's connected to - Schedule exclusive-access maintenance operations during a genuine maintenance window, rather than during active application traffic.
Examples
Checking for other sessions before retrying
onstat -g ses
-- identify what's currently connected before retrying an
-- exclusive-access operation
Retrying after a short delay
DATABASE sales EXCLUSIVE;
-- -425: another user has it open
-- wait briefly, then retry:
DATABASE sales EXCLUSIVE;
Diagnostic Checks
- Check
onstat -g sesfor other sessions currently connected to the target database. - Confirm whether the operation genuinely needs exclusive access, or whether it can be restructured to avoid that requirement.
Related Errors / Related Topics
- -359 — "Cannot drop or rename the current database or any open database." A related database-level concurrent-access restriction, though at the drop/rename level rather than the exclusive-open level.
- -314 — "Table table-name currently in use." A related concurrent-access restriction, at the table level rather than the whole-database level.
Most occurrences are transient — check for other active sessions first, then retry during a genuine low-traffic or maintenance window if exclusive access is truly required.