Informix Error -387
-387 No connect permission.
You cannot access the database that this statement requests because you have not been granted CONNECT privilege to it. Contact a person who has Database Administrator privilege to that database and ask to be granted CONNECT privileges to it.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-387 is a straightforward database-level privilege check: the current user was never granted
CONNECT privilege on the target database — one of the three database-level privileges
(CONNECT, DBA, RESOURCE) mentioned alongside -353, and the minimum one needed to access a
database at all.
- A user account that was never granted
CONNECTon the target database — the most common cause, especially for newly created accounts. - A user whose
CONNECTprivilege was later revoked — for example, during an access review or account deprovisioning that wasn't fully reverted. - An application connecting to the wrong database where its service account genuinely doesn't have access, as opposed to the one it was intended to use.
Solutions / Resolution
- Contact a database administrator to grant
CONNECTprivilege, per the official guidance:GRANT CONNECT TO app_user; - Verify the account is connecting to the intended database — if privileges look correct but the error persists, confirm the database name itself.
- Check whether
CONNECTwas previously granted and later revoked, if this is a regression on a previously working account.
Examples
Granting the missing privilege
GRANT CONNECT TO app_user;
Checking current privileges before escalating to a DBA
SELECT t.tabname, a.grantee FROM systabauth a, systables t
WHERE a.tabid = t.tabid AND a.grantee = 'app_user';
-- CONNECT is a database-level privilege, so it isn't listed
-- against a specific table — check with a DBA directly if unsure
Diagnostic Checks
- Confirm which database the connection is actually targeting, in case the wrong database is the real issue rather than a genuine privilege gap.
- Check with a DBA whether
CONNECTwas ever granted, and whether it was later revoked.
Related Errors / Related Topics
- -353 — "No table or view specified when granting/revoking privileges." A related
GRANT/REVOKEstructural error — explains the distinction between database-level privileges likeCONNECTand table-level ones. - -329 — "Database not found or no system permission." A related database-access error, though about the database not being locatable at all rather than a specific privilege gap on a database that is found.
CONNECT is a database-level privilege, granted without an ON table_name clause — a DBA needs
to grant it directly to resolve this.