Firebird Documentation IndexFirebird ODBC/JDBC Driver ManualFirebird ODBC Configuration → Configuring a DSN on Linux
Firebird Home Firebird Home Prev: Configuring a DSN on WindowsFirebird Documentation IndexUp: Firebird ODBC ConfigurationNext: Connecting to Firebird from Applications

Configuring a DSN on Linux

Table of Contents

Testing the Configuration
Pavel Cisar

Configuration depends on the Linux distribution but, somewhere in /etc or /etc/unixODBC, should be two files named odbc.ini and odbcinst.ini.

Add to odbcinst.ini:

[Firebird]
Description     = InterBase/Firebird ODBC Driver
Driver          = /usr/local/lib64/libOdbcFb.so
Setup           = /usr/local/lib64/libOdbcFb.so
Threading       = 1
FileUsage       = 1
CPTimeout       =
CPReuse         =
      

Add to odbc.ini:

[employee]
Description     = Firebird
Driver          = Firebird
Dbname          = localhost:/opt/firebird/examples/empbuild/employee.fdb
User            = SYSDBA
Password        = masterkey
Role            =
CharacterSet    =
ReadOnly        = No
NoWait          = No
      

Testing the Configuration

UnixODBC has a tool named ISQL (not to be confused with Firebird's tool of the same name!) that you can use to test the connection, as follows:

  isql -v employee
        

If you have connection problems, make sure that the directory where you placed the Firebird ODBC shared library, e.g., /usr/local/lib64/libOdbcFb.so, is on the system loadable library path. If not you could set:

  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/odbc
        

or, more simply,

  export LD_LIBRARY_PATH=/usr/lib/odbc
        

If you still have problems, the next thing is to try an strace to try to identify them:

  strace -o output.txt isql -v employee
        

Prev: Configuring a DSN on WindowsFirebird Documentation IndexUp: Firebird ODBC ConfigurationNext: Connecting to Firebird from Applications
Firebird Documentation IndexFirebird ODBC/JDBC Driver ManualFirebird ODBC Configuration → Configuring a DSN on Linux