Firebird News

Sunday, May 31, 2009

Firebird Weekly News #1

This is the firebird related news from 25-31 May Week

News around firebird world:
Firebird Romanian community had an small booth and tequila/beer meeting at eliberatica.ro event
I was in the middle of ubuntu.ro/fedoraproject.ro people also one suseromania.ro guy also I want to mention www.rosedu.org and softwareliber.ro.

Here are the picture with faces and names on it



Music/Book/Movie Label uses Firebird
Preparing for 6th FDD - Firebird Developers Day
Firebird Maestro 9.5 released

FirebirdConfig 0.2.0.34 released
Change Manager from Embarcadero will add Firebird support (at last)
Firebird Python PowerConsole 0.7 is released

Flamerobin will switch from subversion to git
Flamerobin Blob Editor on the way

Nice Requests and Bugs:
Ability to rename a table

Firebird Source Patches and Commits:
Make engine create lock files in /tmp/firebird

Lock files location should not be affected by value of TMP environment variable
Do not overload placement new operator. That is not valid accordingly to C++ standard.
Robocop fixed the VC9 project files.
Feature CORE-2470 - Support for alternate format of strings literals but on Firebird-Architect there was an long thread about it .
Added possibility to user inform external routines body , Made external routines entrypoint optional.
Fixed issue with two-phase procedure store and DDL triggers
HVlad Fixed MSVC8 build
Firebird Use COMMONAPPDATA folder on Windows for shared memory files placement (lock table, even table, etc).
Alex Peshkoff worked on Solaris port, related cleanup
Let's not crash while internally disconnecting a Classic process after a database shutdown.
Fix AV in trace when UNICODE collation is not found - thanks to Alex
Multi Threaded safe floating point exceptions control. Raise error in case of FP overflow according to SQL standard requirements.
Alex Peshkoff fixed warnings in AIX port.
Better error reporting. Also, don't block the requester in the case of error.
More fixes for bug CORE-2444 : make remapping of shared memory work correctly.
Fixed CORE-2482: Monitoring tables data collection is unstable when attaching or detaching database.

.:():..:():..:():.

Wednesday, May 06, 2009

Firebird issues with ruby on centos - ruby: symbol lookup error

Here is the thread , it looks familar to me
.:():..:():..:():.

firebird driver for ruby updated to 0.6

you can see the latest fixes for ruby 1.9 and version is now at 0.6 in the gem.spec

seems that you can install directly from github with gem (see the gem ruby icon in the right )


.:():..:():..:():.

Tuesday, March 17, 2009

databene benerator - added support for firebird

The new freshmeat website is now at version 3.0 and in the new clean interface you can read about this new

.:():..:():..:():.

The true story of Blob on reddit

You can read the true story of blob on reddit also an good thing is to vote if you have an account
Jim Starkey showed me the movie that inspired his boss
in requesting the Blob inside the RDBMS




.:():..:():..:():.

Saturday, March 07, 2009

Redhat/Fedora port in progress for Firebird

Here is the bug with Firebird Port in progress for Fedora/Redhat


.:():..:():..:():.

Installing Firebird on FreeBSD - FFAP (Firebird Apache Php)

By far the easiest way to install Firebird is via a package, or the ports tree.
When people in the FreeBSD community get a package running on FreeBSD, they often submit how they did it as a 'port', back to FreeBSD.
( This saves you working out what configure scripts to change, which make to use (make, gmake, bmake, aimk, etc) )

So we'll follow the road they've already blazed. Of course, feel free to download the source tarball, and get it building yourself, but it could take a while...


If you can't find a pre-compiled binary package on FreeBSD.org, firebirdsql.org, or ibphoenix.com, sync up your ports tree.
(Building it yourself ensure's it's built using optimisations for the processor you're running, too)


once ports tree is updated, do:


code:

cd /usr/ports/databases/firebird2-server
make install



Once this is finished, all dependencies are installed, the database is installed, the startup scripts are in place, the firebird user is added, and we're ready to go.

As the comment at the end of the install process suggests, we should change the password of the sysdba user, so lets do that now.

Starting Firebird
This involves running

code:

/usr/local/etc/rc.d/000.firebird.sh start
killall -HUP inetd


Or, simply reboot

Setting up Firebird's SYSDBA User

code:

cd /usr/local/firebird
./bin/gsec -user SYSDBA -pass masterkey
( the ./bin/ is required if you haven't got /usr/local/firebird/bin in your path )
GSEC> modify SYSDBA -pw

( We might add a user while we're here )
GSEC> add testuser -pw testuser

( Now quit out )
GSEC> quit



Done. Now we're ready for databases. the Firebird runs as the user firebird, thusly needs read/write permissions to a directory to store the databases.
I usually make one called '/usr/db':

code:

mkdir /usr/db
chown firebird /usr/db
chgrp firebird /usr/db
chown 770 /usr/db



There we have a nice, secure little home for our databases.
This directory isn't created by the install,as people will always want their databases stored in a different place, on a different HDD controller, etc.

Lets make a database

using your favourite editor, start a file in your home directory called 'fire1.sql', and in it, put the following:

code:

CREATE DATABASE "localhost:/usr/db/fire1.gdb".
COMMIT.

CREATE TABLE tbl_test1(
str_name VARCHAR(100) NOT NULL,
str_phone VARCHAR(20),
PRIMARY KEY(str_name)
).


Then save, and exit the file

Now, well create the database
( It may pay to put '/usr/local/firebird/bin' in your path, to save using the full path to the binaries every time )

code:

isql -u testuser -p testuser <>
Logging in for the very first time
Lets log in, and have a look. Run:

isql -u testuser -p testuser localhost:/usr/db/fire1.gdb

Database: localhost:/usr/db/fire1.gdb, User: testuser
SQL>

You're in! Lets see what's inside:
( Note. Put a semi-colon at the end of every command. It's the terminator at the moment )


SQL> show tables;
TBL_TEST1
SQL>

Let see how that table's made up:
SQL> show table tbl_test1;
STR_NAME VARCHAR(200) Not Null
STR_PHONE VARCHAR(20) Nullable
CONSTRAINT INTEG_2:
Primary key (STR_NAME)
SQL >

Lovely! put some data in
SQL> insert into tbl_test1 (str_name, str_phone)
CON> values ('henry','12345678');
SQL>

( Note the 'CON>' appears while a statement is continuing )

Let's select everything in the table
SQL> select * from tbl_test1;
STR_NAME STR_PHONE
===== ===
henry 12345678

Lets put some more in
SQL> insert into tbl_test1 (str_name, str_phone)
CON> values ('jane','87654321');
SQL>

Select all
SQL> select * from tbl_test1;
STR_NAME STR_PHONE
==== ========
henry 12345678
jane 87654321

Select henry
select * from tbl_test1 where str_name = 'henry';

select people starting with 'h'
select * from tbl_test where str_name like 'h%';

select the first record
select first 1 * from tbl_test1;

select 1 record, but skip 1
select first 1 skip 1 * from tbl_test1;

select any records with the letter 'e' in them
select * from tbl_test1 where str_name containing 'e';

As you can see, the SQL is very similar to other databases.
Next we will instal the apache to FAP (Firebird,Apache, Php)


portsnap fetch
portsnap extract
Installing apache 2.2
cd /usr/ports/www/apache22/
make install clean

Installing php extension
cd /usr/ports/lang/php5
make install clean
cd /usr/ports/lang/php5-extensions
make install clean
cd /usr/ports/database/php5-interbase
make install clean

We need now to enable the Php and firebird extension for it (interbase.so)

Firstly we will edit apache’s config - this lives in /usr/local/etc/apache22/

Open /usr/local/etc/apache22/httpd.conf in your favroute editior (or nano while your learning to love vi)

Look for this line : LoadModule rewrite_module libexec/apache22/mod_rewrite.so
directly underneath this line add the following 3


LoadModule php5_module libexec/apache22/libphp5.so
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

Then find this line : DirectoryIndex index.html and change it to DirectoryIndex index.php index.html

After this is done we need to give php an ini - the easiest way to do this is to copy the dist one into place

cp /usr/local/etc/php.ini-dist /usr/local/etc/php.ini

open /usr/local/etc/php/extensions.ini in your favroute editor and look for this line : extension=interbase.so if it isnt there, add it.

one last change and we are good to go!

open /etc/rc.conf in your text editor of choice and add these lines :


apache2_enable="YES"

once your done reboot and enjoy!



Recomdeded Reading :
1.The Complete FreeBSD Book
2.Free BSD Handbook
I was inspired for the Apache/Php install from this article

Monday, January 12, 2009

creating an db with isql-fb in firebird classic

If you try to create an db from isql-fb utility and you use firebird classic
then you might need to add the host in the connection string

$ isql-fb -user SYSDBA -password masterkey
Use CONNECT or CREATE DATABASE to specify a database
SQL> create database "/var/lib/firebird/2.1/data/fooozz.fdb"
CON> ;
Statement failed, SQLCODE = -902
cannot attach to password database
SQL>

Here is the correct way to create the database with classic
$ isql-fb -user SYSDBA -password masterkey
SQL> create database "localhost:/var/lib/firebird/2.1/data/fooozz.fdb"
CON> ;


.:():..:():..:():.

Even Postgresql developers prefer Firebird over Mysql

Read an interesting interview where one developer when asked

If you should decide between Firebird and MySQL, though it would not be available to PostgreSQL, what with you in a generally won? And why?

I have three years of application development platform for Interbase / Firebird. So it is clear what I have preferences. Firebird is a very nice small compact database that I like and fandím it.



.:():..:():..:():.

Tuesday, December 02, 2008

News of the Libgda front

New jdbc wrapper and updated firebird drivers 
see the article 


.:():..:():..:():.

Sunday, November 16, 2008

convert security.fdb to security2.fdb in firebird

converting sercurity.fdb to security2.fdb (needed during 1.5 to 2.0 migration)
.:():..:():..:():.

Sunday, October 12, 2008

Firebird OdbcJdbc 2.0 driver changes

Interesting changes
  • - added Linux x64 support
  • - added Windows x64 support, thanks to Alexander Potapchenko.

and others
http://fisheye1.atlassian.com/browse/firebird/OdbcJdbc/changes-v20.log?r=1.1.2.4


.:():..:():..:():.

Tuesday, September 02, 2008

why firebird is better than mssql

http://www.sinatica.com/blog/en/index.php/2008/09/know-your-server


Thanks to its multi-generational architecture Firebird does not block readers. So it’s natural that this problem may seem strange to us. But each architecture has its pros and cons. This same multi-generational architecture, if not correctly used, can be a problem. It’s the case of long running transactions or "stuck transactions".
Such transactions cause record versions to accumulate in the database. (These versions can also be called generations. It’s multi-generational architecture, remember?) The more versions accumulate more work Firebird has to do to find the correct version of each record. If stuck for long enough Firebird server can get slow to the point of looking like it’s dead. How much time depends of the database load and the server’s hardware. Could be a month, could be an hour.
I’ve seen it happen many times. In some of those occasions I saw managers argue for hours that MS SQL Server or Oracle don’t have such problem. The fact is that they have other architectural details that you must take into account in your application. For example, some databases block readers. Simply switching databases, as some of those managers suggested, is not a solution.

Although having StackOverflow powered by Firebird would not be a bad idea. ;)

Friday, July 25, 2008

OSCON gets under way - clarion is used with firebird

But this is an open source conference, and Clarion is a closed source product. What exactly is ClarionMag doing here?

In my experience there are are plenty of Clarion developers already using open source products and tools. For the most part that means databases such as MySQL, Firebird, PostgreSQL and Ingres, and web tools, of which there are a great many (Apache and PHP are popular choices).

.:():..:():..:():.

On MySQL forks and MySQL’s non-Open Source documentation

One of the things that sets MySQL apart (in, IMHO, a very bad way) from other Open Source database projects/products such as PostgreSQL (license) and Firebird (license) is that the MySQL documentation is NOT Open Source. The MySQL documentation is and always has been copyright MySQL AB, and “… use of this documentation, in whole or in part, in another publication, requires the prior written consent from an authorized representative of MySQL AB”.

http://jcole.us/blog/archives/2008/07/23/on-mysql-forks-and-mysqls-non-open-source-documentation/

.:():..:():..:():.

Friday, July 18, 2008

Zeos is Now Ready for FB 2.1.1

Here is the full blog post

The first FB 2.1 version has a problem when attempt first connect to the database but the version 2.1.1 seem already fix that bug, as in the Zeos forum "Seawolf" analyze that "(CORE-1868) The server could crash in isc_dsql_free_statement(). fixed by A. Peshkof" is the problem that make Zeos crash at first connection to the DB. Here is the link to the discussion about this problem in Zeos forum. So if you want to use the Firebird 2.1 version with Zeos then move to Firebird version 2.1.1


.:():..:():..:():.

Firebird - Technical Question

Just starting to migrate our application from an Access backend to Firebird. We have created a firebird database and can connect to it through our app however our SQL statements require objects to be quoted, i.e.

.:():..:():..:():.

Thursday, July 10, 2008

Firebird Embedded use on linux

Here is the guide for firebird 1.5.x on linux , I will try to use the guide on ubuntu and
later with firebird 2.x

also i will try to use it with both c++ and mono
http://tirania.org/blog/archive/2005/Sep-30-2.html
http://www.firebirdfaq.org/Firebird-Embedded-Linux-HOWTO.html#Final_directory_structure

To use Firebird on Linux without needing to add users or set permissions, you can use the Classic server and get it down to just a few files. I used FirebirdCS-1.5.x on SuSE 9.2 but it should work for any Linux distribution and any recent Firebird release. What you need is:

1. A directory to setup a mini Firebird environment. I used ~/firebird and you need these files in the directory:

libfbembed.so
firebird.conf
security.fdb
intl/fbintl
bin/fb_lock_mgr

2. You need to link with or dynamically load the libfbembed.so library. It will allow direct connection to the database without needing a server process.

3. The firebird.conf file just needs one line with "RootDirectory=?" where ? is the full path of the mini Firebird environment directory.

4. The security.fdb file will be used to validate the username and password when you connect so you can either setup users in it or just set the sysdba password to a known value and login using sysdba. This security file is really a dummy file and will not provide any real security but its an embedded database so you are not looking for the same type of security a networked server would need.

5. The files all need to be owned by the user who will be opening the database so in my case they were all owned by me. Special care needs to be taken with the fb_lock_mgr since the one in /opt/firebird/bin is setup owned by firebird.firebird and with the setuid bit turned on but you will not need any of this for this configuration. In general if you're application is running as user "foo" then that user needs to have read/write access to the database you are trying to open, to the security.fdb file, and to the directory you installed the Firebird mini environment.

In your code you need to set the environment variable FIREBIRD to the location of the mini Firebird environment and then you should be able to use isc_attach_database and just pass a full pathname to the database file you want to use.

Here is the original article , but the site seems to be missing
http://web.archive.org/web/20070611151645/http://fbtalk.net/viewtopic.php?id=194
.:():..:():..:():.

Thursday, June 19, 2008

Back in from the cold - to firebird

I've been looking at several tools for this venture. Delphi is a requirement as I can deliver a great application to the intended audience using Delphi. I've looked very seriously at both Firebird and ElevateDB as the intended database that I will be using. I still have not made up my mind on these yet as both have their strong points.

If I end up going with Firebird, then I'll most likely be using the IBObjects components. I've used these before at a customer's site and have been impressed at the genuine speed that results.


http://stevepeacocke.blogspot.com/2008/06/back-in-from-cold.html



.:():..:():..:():.