Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Today I though I'd give Firebird 3.0 a shot, but for some reason I can't seem to get it installed - at least not in a way that I can connect from a JDBC application.

What I did was to follow this article:

http://firebird3.blogspot.com.br/2012/03/how-to-install-firebird-3.html

This is what happened:

c:\etc\Firebird30>gsec -add sysdba -pass masterkey

c:\etc\Firebird30>start firebird.exe -a -m

c:\etc\Firebird30>isql
Use CONNECT or CREATE DATABASE to specify a database
SQL> create database "localhost:c:\temp\mydbfb3.fdb" user "sysdba" password "masterkey";
Statement failed, SQLSTATE = 08006
Error reading data from the connection.
SQL>

Now creating the database "locally" works:

SQL> create database "c:\temp\mydbfb3.fdb" user "sysdba" password "masterkey";
SQL> commit;
SQL>

But in that case, when I connect from a JDBC application (still everything "localhost"), I get the error message (using sysdba/masterkey to log in)

GDS Exception. 335544472. Your user name and password are not defined. Ask your database administrator to set up a Firebird login.
Reason: Your user name and password are not defined. Ask your database administrator to set up a Firebird login.

I double-checked (more than once) that the username and password in the JDBC application is sysdba/masterkey.

From the commandline I can indeed access that newly created database:

SQL> connect 'c:\temp\mydbfb3.fdb';
Database:  'c:\temp\mydbfb3.fdb'
SQL> create table foo  (bar integer);
SQL> insert into foo values (1);
SQL> select * from foo;

         BAR
============
           1

SQL> commit;
SQL>

I'm sure I'm missing something obvious, but what?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

The problem is twofold:

First Firebird 3 uses tighter security and has the old authentication mechanism disabled by default. So clients depending on older connection libraries will not work out of the box.

To allow the old authentication mechanism to work, the following setting needs to be set in firebird.conf:

AuthServer = Legacy_Auth, Srp, Win_Sspi

(be sure to remove the # prefix)

Second, the pure-java wire protocol implementation of Jaybird (the Firebird JDBC driver) uses an outdated authentication mechanism that is not supported by this Legacy_Auth option. Using Jaybird to connect to Firebird 3 at this time will only work if you use the native option (with the jdbc:firebirdsql:native: URL-prefix and jaybird2x.dll and fbclient.dll).

Addendum

Firebird 3 (since Alpha 1) has now also implemented the old authentication method used by Jaybird, so Jaybird will now also work without using the native library (as long as the legacy authentication is enabled, and the user has been setup with the legacy usermanager).

share|improve this answer
    
Thanks. I will wait until the final version of Firebird and Jaybird is released. –  a_horse_with_no_name Apr 18 '12 at 20:24
    
Although I don't understand why I cannot connect using isql. using localhost:mydb (where mydb is an existing alias). The isql tool that comes with FB 3.0 should support the new authentication mechanism, shouldn't it? (I did change the AuthServer as you recommended) –  a_horse_with_no_name Apr 18 '12 at 22:10
    
I am not sure what is causing the problem. Can you file a ticket at tracker.firebirdsql.org ? –  Mark Rotteveel Apr 19 '12 at 17:25
    
Where you by any chance running another Firebird instance as well? –  Mark Rotteveel Apr 19 '12 at 17:34

Yes shoot it before it shoots you back. I have used it before in couple of projects; way back. Its got all types of problem, you would not want to face in a DBMS. Seriously I would recommend you NOT using it;

A far more better solution similar to its nature is SQL(www.sqlite.org), which ofcourse has greater compatibility with numerous programming language.

share|improve this answer
1  
I'm not planning to use it in a production environment. I just want to play around with it checking out the new 3.0 features. Version 2.5 works without problems so I guess my problems are simply related to the fact that it's still an alpha version. Guess I'll just wait until it's stable –  a_horse_with_no_name Mar 29 '12 at 8:39
    
oh then gudluck; i'll post back if i find some for the matter.. –  Mrigesh Raj Shrestha Mar 29 '12 at 10:20
2  
I did some systems in Firebird and they're working flawlessly for almost half decade - I know it as the person maintaining it tell me that. –  Fabricio Araujo Jun 4 '12 at 17:44
    
oh good to know it worked for u. –  Mrigesh Raj Shrestha Jun 12 '12 at 6:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.