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/26/2012

Where can I download Firebird 3?

Firebird 3 is in alpha development stage (see roadmap for details), and it means that it's published as "snapshots" - regular builds from the current source code. Snapshots can be found at Firebird SQL web site: http://www.firebirdsql.org/en/snapshot-builds/.

They contain also code for future minor releases for Firebird 2.x, so look carefully what you download. Source code behind these snapshots (as well as other Firebird versions) is stored in Firebird code repositiory: now it's in trunk, and later, at beta stage, it will be forked to the separate branch.

At the moment SVN URL for Firebird 3 is https://firebird.svn.sourceforge.net/svnroot/firebird/firebird/trunk
 (to extract sources you need SVN client like Tortoise SVN).

In fact, there is no need to get source code, until you are not a C++ developer with intention to join Firebird Project. Snapshots are enough to have a quick look at Firebird 3 and play with it.


Resources:



Firebird 3: interesting even in alpha version

Firebird 3 is in alpha stage now (March 2012), but it's already interesting for many developers due to the many new features and performance improvements. So it's a natural to try Firebird 3 with your existing application and see it in action. In this blog we'll consider Firebird 3 on its way to the release.