Unable to connect to local Firebird with ISQL

I am trying to configure a local firebird instance for testing, but cannot connect to it even with ISQL. I tried to follow the following quick start guide here :

CONNECT ..\examples\empbuild\employee.fdb user SYSDBA password masterkey; 

The result is:

 Statement failed, SQLSTATE = 08001 unavailable database 

After some searching, I tried changing this to:

 CONNECT "localhost:C:\Program Files\Firebird\Firebird_2_5\examples\empbuild\employee.fdb" user SYSDBA password masterkey; 

The result is:

 Statement failed, SQLSTATE = 28000 cannot attach to password database 

After confirming that I had the correct path to the directories, I decided to continue connecting and try to create a new database:

 SQL>CREATE DATABASE 'C:\data\test.fdb' page_size 8192 CON>user 'SYSDBA' password 'masterkey'; 

Which also gave me an error:

 Statement failed, SQLSTATE = 08001 unavailable database 

Are there any common mistakes that I can hit? I also tried the commands above, both with and without firebird service. Also have a detailed link to SQLSTATE codes?

+7
firebird isql
source share
1 answer

As mentioned in my comments, the problem is caused by starting the Firebird server as an application. Firebird has a password database ( security2.fdb ) in C:\Program Files\Firebird\Firebird_2_5 . Since this database (almost, but not completely) is a normal Firebird database, the server requires write access to this database (for transactions, etc.).

By default (with UAC), users are not allowed to write to the password database, so this requires upgrading to administrator. Thus, access to Firebird requires that you either run the application as a service with sufficient rights (for example, as was done by the installer by default), or when starting the server as an application to run โ€œas an administratorโ€. Another option is not to install it in Program Files.

This BTW is applied twice when accessing the sample employee database, as this database file is also located in the Program Files folder.

+11
source share

All Articles