Firebird Database Setup on Ubuntu Linux

Sponsored Link
Firebird is a relational database offering many ANSI SQL standard features that runs on Linux, Windows, and a variety of Unix platforms. Firebird offers excellent concurrency, high performance, and powerful language support for stored procedures and triggers. It has been used in production systems, under a variety of names, since 1981.

The version of Firebird packaged with Ubuntu “Edgy Eft” is 1.5.3.4870-10 but is labelled "firebirdsql2" and Firebird packaged with Ubuntu “Feisty” is 1.5.3.4870-12.

Install Firebird Database on Ubuntu

sudo apt-get install firebird2-super-server

Apt's dependency tracking will automatically propose all the packages required for a complete installation.Ignore the “firebird2-server” virtual package which will just ask you to select either the “Classic” or “Super” server.

The packages will then download and install on the target machine, a new user “firebird” will be created to run the server, and the server will be started immediately

Setting up firebird2-super-server (1.5.3.4870-10) ...
Created default security.fdb
Starting Firebird server: server has been successfully started

You will then be asked to enter a new password for the SYSDBA user, spelling mistake included:

Plase enter new password for SYSDBA user:
You will then be returned to a shell prompt with the following output, that's it!

GSEC> GSEC>

a new user “firebird” is created on the target machine. With administrator access, set a password for this new user:

sudo passwd firebird
Enter new UNIX password:
Retype new UNIX password:

Now you can switch to the firebird user with the su command

If you try to stop the server from running with the init.d command an error message will appear.

sudo /etc/init.d/firebird2 stop
/etc/init.d/firebird2: 28: source: not found
Stopping Firebird server: Your user name and password are not
defined. Ask your database administrator to set up a Firebird
login.
can not attach to server

The same will happen if you try and start the server.To stop the server use the following command

sudo su -c "fbmgr -shut -password SYSDBApassword" firebird
Password:
server shutdown completed

Where SYSDBApassword is the password you entered immediately after installation and the second password is the firebird user password. To start the server again

su -c "fbmgr -start" firebird

With the installation complete, you can now begin using Firebird on Ubuntu Linux. The base package does not include any example databases, so if you like, install some with

sudo apt-get install firebird2-examples

These will be installed in /usr/share/doc/firebird2-examples/. While you're at it, install the utilities package

sudo apt-get install firebird2-utils-super

This will give you an interactive shell, and backup and reporting tools among others. Now you can test your Firebird installation by connecting to an example database. Decompress the example “employee.fdb” database

gunzip /usr/share/doc/firebird2-examples/examples/employee.fdb.gz

Fire up the interactive shell.

isql-fb

At the SQL> prompt, connect to the database with:

SQL> connect "employee.fdb" user ‘SYSDBA' password ‘SYSDBApassword';

If you get an error message like “Statement failed, SQLCODE = -551 no permission for read-write access to database /usr/share/doc/firebird2-examples/examples/employee.fdb”, then the server process doesn't have read or write access to the database file. Change the ownership of the database to the user firebird with

sudo chown firebird:firebird employee.fdb

When you manage to successfully connect to the database you will see the message:

Database: "employee.fdb", User: SYSDBA
Now, from the SQL> prompt, feel free to browse around the employee database:

SQL> show tables;
COUNTRY CUSTOMER
DEPARTMENT EMPLOYEE
EMPLOYEE_PROJECT JOB
PHONE_LIST PROJECT
PROJ_DEPT_BUDGET SALARY_HISTORY
SALES

That' it this will complete the firebird database setup in Ubuntu

Sponsored Link

You may also like...

5 Responses

  1. airtonix says:

    1 – at the part where you gunzip the template….in shich directory am i supposed to be in? my home directory?

    2 – if not where.

    3 – can you provide steps by step example how to create databse.

    4 – i followed you steps, but i cant make anything, its saying im not allowed to.

    5 – do i run the interactive prog with sudo por not?

    6 – how do i become the firebord user when using firebird? do i do it within firebord at the conn> prompt? or at the linux prompt.

    your guide is not clear and i am having problems getting it to work as expected.

  2. Saiyine says:

    I just getting this error, “Your user name and password are not defined. Ask your database administrator to set up a Firebird login.”, so I can’t do anything.

    What can I do with that?

  3. Mardhanaya says:

    This may not be revelant but i figured i’d post this anyway. If you’re using ubuntu 8.10 you may be in for some issues with the network manager. For some unknown reason it stops functioning. You will need to manually set you’re resolv.conf with your ISP’s DNS servers. That file is located in /etc/network/resolv.conf

  4. EsliJr says:

    Saiyrine,

    i have the same problem with v 1.5.6.5026.
    If run the script /opt/firebird/bin/changeDBAPassword.sh and show this message.
    “Your user name and password are not defined. Ask your database administrator to set up a Firebird login.”. My problem is with this xinetd…won’t read the /opt/firebird/SYSDBA.password (user and password are correct) or firebird.conf.

    To solve..in my case. I run GSEC
    /opt/firebird/bin/gsec

    In console of GSEC:

    ~ modify sysdba -pw masterkey
    ~ exit

    And restart the service. Try this.

    Recently I installed in Ubuntu 10.04 server and it’s works.
    Sorry for my english…

  5. tapas parida says:

    Thank you, the GSEC modify worked for me!!

Leave a Reply

Your email address will not be published. Required fields are marked *