3/27/2012

How to install Firebird 3?

UPDATE 22/09/2015

At the moment Firebird 3 is close to Release Candidate, and there is a full installer is available for Beta 2 - you can download it here http://firebird3.com/en/download-firebird-3/.

If you want to install snapshot of Firebird, in order to get pre-RC1 version, you need to follow steps below. Official installer for Firebird 3 RC1 will be available later.

And below you can find the answer for the question "How to install Firebird".
It requires some manual steps.

First, you need to download snapshot of  Firebird 3 and unpack its archive into some suitable location, like C:\Firebird3.

Detailed explanation of Firebird 3 installation and initialization can be found here: Firebird 3 Quick Start Guide.

As you can see, folders structure in Firebird 3 was changed, and now there is no "Bin" folder, and executable files are in the root of Firebird installation.

Below is the list of files from Firebird-3.0.0.29875-0_Win32 snapshot:


Directory of C:\Firebird3

03/26/2012  10:10 AM    <DIR>          .
03/26/2012  10:10 AM    <DIR>          ..
03/26/2012  10:10 AM    <DIR>          doc
03/22/2012  01:03 PM           852,992 fbclient.dll
03/22/2012  01:08 PM           103,424 fbguard.exe
03/22/2012  01:08 PM            28,672 fbrmclib.dll
03/22/2012  01:07 PM            88,064 fbsvcmgr.exe
11/15/2011  09:56 AM             5,375 fbtrace.conf
03/22/2012  01:07 PM            86,528 fbtracemgr.exe
03/22/2012  01:08 PM           148,992 fb_lock_print.exe
03/22/2012  01:08 PM            27,256 firebird.conf
03/22/2012  01:08 PM           416,768 firebird.exe
03/22/2012  01:02 PM           139,176 firebird.msg
03/22/2012  01:08 PM           281,600 gbak.exe
03/22/2012  01:08 PM           100,864 gfix.exe
03/22/2012  01:08 PM           501,248 gpre.exe
03/22/2012  01:08 PM           145,408 gsec.exe
03/22/2012  01:08 PM            56,832 gsplit.exe
03/22/2012  01:08 PM           176,128 gstat.exe
03/26/2012  10:10 AM    <DIR>          help
03/22/2012  01:03 PM             7,680 ib_util.dll
03/22/2012  12:52 PM         1,558,016 icudt30.dll
03/22/2012  12:51 PM           331,776 icuin30.dll
03/22/2012  12:51 PM           546,304 icuuc30.dll
04/26/2011  11:29 AM            26,519 IDPLicense.txt
03/26/2012  10:10 AM    <DIR>          include
04/26/2011  11:29 AM               303 install_classic.bat
05/11/2011  08:40 AM               305 install_super.bat
03/22/2012  01:07 PM            16,896 instclient.exe
03/22/2012  01:07 PM            10,752 instreg.exe
03/22/2012  01:08 PM            59,392 instsvc.exe
03/26/2012  10:10 AM    <DIR>          intl
04/26/2011  11:29 AM            24,405 IPLicense.txt
03/22/2012  01:07 PM           289,792 isql.exe
03/26/2012  10:10 AM    <DIR>          lib
01/07/2011  11:39 PM           768,848 msvcr100.dll
03/22/2012  01:07 PM           171,520 nbackup.exe
03/26/2012  10:10 AM    <DIR>          plugins
03/22/2012  01:07 PM           286,720 qli.exe
03/26/2012  10:55 AM           933,888 security3.fdb
03/26/2012  10:10 AM    <DIR>          system32
03/26/2012  10:10 AM    <DIR>          udf
04/26/2011  11:29 AM               273 uninstall.bat
              33 File(s)      8,192,716 bytes
              10 Dir(s)  388,050,579,456 bytes free


The next discovery is that all Firebird architectures are implemented through the single executable file: firebird.exe. There is no fbserver.exe and fb_inet_server.exe anymore.

To start Firebird 3 as application, type in command line:
C:\Firebird3>firebird -a -m
Congratulations - you've launched Firebird 3.
In the right bottom corner of your Windows desktop you'll see Firebird icon: right-click on it and see Properties:

Nothing really interesting here at the moment :)
So, the next step is to connect to Firebird 3 and

Create database in Firebird 3

run isql.exe and run the following

C:\Firebird3>isql
Use CONNECT or CREATE DATABASE to specify a database
SQL> create database "C:\temp\myfb3.fdb";
SQL> exit;


Now Firebird is running in embedded mode, so you don't need user and password for the local connections.
If you try to create database through network interface, it will require username and password:

C:\Firebird3>isql
Use CONNECT or CREATE DATABASE to specify a database
SQL> create database "localhost:c:\temp\mydbfb3_again.fdb";
Statement failed, SQLSTATE = 28000
Your user name and password are not defined. Ask your database administrator to set up a Firebird login.
-Install incomplete, please read chapter "Initializing security database" in Quick Start Guide
SQL>

Why it refers to the chapter "Initializing security database" in Quick Start Guide? Let's just use our favourite SYSDBA/masterkey! And - oops:

SQL> create database "localhost:c:\temp\mydbfb3_again.fdb" USER "SYSDBA" password "masterkey";
Statement failed, SQLSTATE = 28000
Your user name and password are not defined. Ask your database administrator to set up a Firebird login.
-Install incomplete, please read chapter "Initializing security database" in Quick Start Guide

Yes, there is no more SYSDBA default user and  "masterkey" default password.

You need to add this user first (password can be not masterkey, of course):
C:\Firebird3>gsec -add SYSDBA -pass masterkey

and then create database with username/password.



More details can be found here: http://ib-aid.com/en/articles/firebird-3-quick-start-guide-initializing-security-database/ 


3 comments:

  1. I had to invoke gsec in a slightly different way:

    gsec -add SYSDBA -pw masterkey -admin yes

    It's important to specify the "-admin" parameter because otherwise you aren't able to create new databases.

    ReplyDelete
  2. In my case this do not work!
    gsec does not allow me to connect with my existing database.

    So, I install Firebird first Alpha version, set user/pass to SYSDBA, masterkey during install and copy both firebird.conf and security3.fdb.

    Then, I removed Firebird 3 Alpha 1, extract snapshop build, copy over firebird.conf and security3.fdb from the Alpha version to snapshot build, and then run:

    I run just for case...:
    gsec -add SYSDBA -pass masterkey

    And then:
    Firebird.exe -a -m

    Then I can connect with my database using SYSDBA/masterkey login.

    ReplyDelete
  3. hi,
    i have a question if don't mind !

    is there any way to protect metadata or prevent embedded connections ??

    ReplyDelete