Informix Error -4305: The database "name" cannot be found or opened. If the database exists, check the database permissions on the database. In addition, check the system permissions on the database directory and its ascendant directories.
Cause and resolution
The database "name" cannot be found or opened. If the database exists, check the database permissions on the database. In addition, check the system permissions on the database directory and its ascendant directories.
Check the spelling of the database name. Check that the database name exists in your current directory or in a directory included in your DBPATH environment variable. If the database is in a different directory, make sure that you have the ability to read that directory (to test this, make it the current directory and list the names of files in it). If these items are correct, make sure that you have at least CONNECT privilege for the database.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4305 fires when a DATABASE statement's named database can't be found or opened — per the
official guidance, this could be a spelling issue, a DBPATH issue, a directory-read
permission issue, or a missing CONNECT privilege.
- A misspelled database name, per the official guidance — the first named cause.
- The database isn't in the current directory or a
DBPATHdirectory, per the official guidance — the second named cause. - Insufficient read permission on the database's directory (or an ancestor directory), per the official guidance — the third named cause.
- Missing
CONNECTprivilege on the database, per the official guidance — the fourth named cause.
Solutions / Resolution
- Check the spelling of the database name, per the official guidance.
- Check that the database exists in the current directory or a
DBPATHdirectory, per the official guidance. - Check read access to the database's directory (test by making it current and listing its files), per the official guidance.
- Confirm at least
CONNECTprivilege on the database, per the official guidance.
Examples
Checking DBPATH and directory access
echo $DBPATH
ls mydb.dbs
Diagnostic Checks
- Check the database name's spelling,
DBPATH, directory read access, andCONNECTprivilege, in that order.
Related Errors / Related Topics
- -3010 — "Database database-name not found." A closely related database-lookup error in the ISQL/Form Runtime context, covering the same general causes.
The named database can't be found or opened — check its spelling, DBPATH, directory
permissions, and CONNECT privilege.