Installing Perl DBI driver for Firebird 2.5 RDBMS server in #ubuntu and #debian

DBI driver for Firebird and RDBMS server is located in git now

This was tested on ubuntu ubuntu 11.10 oneiric with firebird 2.5 SuperServer installed from repository

Check if firebird dev headers are installed (this package is both for Super and for Classic)
also check if the perl module DBI is already installed

sudo apt-get install firebird2.5-dev libdbi-perl
git clone git://github.com/mariuz/perl-dbd-firebird.git
cd perl-dbd-firebird/
perl Makefile.PL
sudo make install

you can run the test if you want

ISC_PASSWORD=masterkey make test

Firebird: how to find SQL queries which use bad index?

In the first part of our optimization story (“How to ruin Firebird performance…“) we mentioned that indices should be analyzed before dropping, even if they appeared to be very bad in IBAnalyst in terms of garbage and number of unique values.
In essence, we need to log all queries used in applications, get their execution plans and check, how indices are used.
For this we need to log all SQL traffic between applications and Firebird database.
Keep reading in IBSurgeon blog.

Centos 5.X – Build Firebird / Interbase (extension and PDO extension) support into PHP

Sent by Luis Rodrigues <luisrodrigues.pt@gmail.com>

1º  # Install Firebird
# for this tutorial I use FirebirdSS-2.5.0.26074-0.amd64.rpm (downloaded by Firebird website)
rpm -ivh FirebirdSS-2.5.0.26074-0.amd64.rpm

2º Obtain php source code

a)
# create the /etc/yum.repos.d/CentOS-SRPMS.repo with the following content

[base-SRPMS]
name=CentOS-$releasever – Base SRPMS
baseurl=http://mirror.centos.org/centos/$releasever/os/SRPMS/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
priority=1
enabled=1

#released updates
[update-SRPMS]
name=CentOS-$releasever – Updates SRPMS
baseurl=http://mirror.centos.org/centos/$releasever/updates/SRPMS/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
priority=1
enabled=1

b)
yum install yum-utils
yumdownloader –source php

3º # Install php-devel for phpize
yum install php-devel

######################################################
#   if you want to build interbase.so extension only
######################################################

4º # change to the folder where the extension code is and run the following command set.
cd /usr/src/redhat/BUILD/php-5.1.6/ext/interbase
phpize
./configure –with-interbase=shared,/opt/firebird
make

5º # the extension interbase.so if builded sucessfully is located  at:
/usr/src/redhat/BUILD/php-5.1.6/ext/interbase/modules

6º i’m using 64bits system so i need to copy the extension
cp interbase.so /usr/lib64/php/modules

7º last we need to activate extension into PHP
vi /etc/php.ini

#add the following line do extensions section

extension=interbase.so

#######################################################
#  if you want to build Firebird Driver
#######################################################
4º # change to the folder where the extension code is and run the following command set.
cd /usr/src/redhat/BUILD/php-5.1.6/ext/pdo_firebird
phpize
./configure –with-pdo-firebird=/opt/firebird/
make

5º # the extension interbase.so if builded sucessfully is located  at:
/usr/src/redhat/BUILD/php-5.1.6/ext/pdo_firebird/modules

6º i’m using 64bits system so i need to copy the extension
cp pdo_firebird.so /usr/lib64/php/modules

7º last we need to activate extension into PHP

#to work PDO driver need PDO (if you don’t have it, install it using yum)
yum install php-pdo

vi /etc/php.ini

#add the following line do extensions section

extension= pdo.so
extension= pdo_firebird.so

8º restart apache
service httpd restart

 

Next step for world domination : Do you think that Firebird should create new documentation ?

Since Intebase 6 release of the source code, Firebird created a lot of changes and additions to the engine.

The only updates that we see today, are small references for new or changed features for specific version.

Further more, the time has changed, and wiki, and other format of documentation should also be in place, including the ability of users to comment and even share how to things in the proper page.

So what do you think on this ?

Firebird nagios plugin written in #python

At work we use a lot of Firebird databases, and so far our system admins checked the availability of a Firebird Database by simply trying to connect via telnet to the port 3050 and see if they would get a response. With this kind of check you can’t really determine if the database is really up and running,

Therefore they asked me if I could write a plugin for nagios which would do a real check to ensure that the Databases are up and running, here is my result.

I chose to write the plugin in python, due it’s simplicity, and because I already wrote some script using the python-kinterbasdb extension

Firebird 2.0 (and up) Maximum Number Of Records In Table

Maximum number of records in table in Firebird is depended on record_size and page_size.
Here is a spreadsheet in Open/Libre Office Calc (for all calculations look at sheet 1, sheet 2, sheet 3 and sheet 4):
I would like to here from developers from Firebird is this calculations are correct.
Here is the original blog post , and here are the related threads on firebird-support
1 19 20 21 22 23 78