Subject Re: [firebird-support] firebird 1.5
Author Helen Borrie
Hello robert,

Wednesday, May 11, 2016, 3:47:19 AM, you wrote:

> I got a database that was created with a firebird 1.5 on windows.
> Now I installed Firebird- an a windows 7 and on a
> windows 10 machine.
> I copied also the following files into the UDF folder:
> MD5
> UdfArithmetic
> UdfArithmetic.dll
> UdfControl
> UdfControl.dll
> UdfDateTime
> UdfDateTime.dll
> UdfString
> UdfString.dll

These are custom UDF libraries. They would be 32-bit, as Fb 1.5 did
not have any 64-bit versions. UDFs must be compiled with the same
"bitness" as the Firebird that is installed.

Any UDFs (custom ones and those shipped with Firebird) that are
actually required for use with your database are declared in the
system table RDB$FUNCTIONS and the argument descriptors in

I guess that the files without the ".dll" suffix would be text files
containing the declarations for the database.

> after some fiddling (I am new to firebird, and mostly working on linux)
> I could connect to the database.
> Now I would like to use this databse under linux using firebird version 2.5

> However the connection can not be established:

> Use CONNECT or CREATE DATABASE to specify a database
SQL>> connect "localhost:/home/robert/hermes/AFBS/VAS/VAS.fdb" user
> 'SYSDBA' password 'xxx';

> Statement failed, SQLSTATE = 08006
> Unable to complete network request to host "localhost".

There is likely to be more than one reason why you can't connect to
that database. Have you tried connecting to the sample database
EMPLOYEE.FDB? Try that as a reality check. There is an alias for it
in the default aliases.conf, so your connection path would be

That said, if the database has declarations for those custom UDFs, you
won't be able to connect, anyway, since the engine cannot find
libraries that don't exist. And any declarations for the native
UDFs would need to be dropped and recreated to point to the correct
ENTRY_POINT on Linux. (You can get the details from the Fb 2.5
Language Reference at the web site.)

> now my questions:
> do I need to load linux verions of the UDFs

As you have probably figured out already, you need to compile your
custom libraries on Linux, with the correct "bitness" to match the
Firebird engine version. It might not be straightforward, as
third-party libraries are notorious for having platform-specific

Perhaps a better strategy would be to analyse what each of your custom
functions is meant to do and replace those calls with an internal
(built-in) function. Between Fb 1.5 (2003) and Fb 2.5 a large number
of built-in functions have been added.

> how would I load this database under linux. do i need to convert it.

The platform is not necessarily an issue, if the Windows and Linux
environments are hardware-compatible and bitness-compatible. It is
rather a question of the on-disk structure (ODS) of the database. The
gbak tool (in the /bin/ directory) is used to upgrade the ODS.

[Not forgetting those UDF declarations! You would have to drop them
before attempting the migration.]

Make a gbak backup (see docs on-line) of the database on Windows under the Fb
1.5 server. Copy that backup file over to the Linux machine and
restore it using gbak -restore or -create under the new Fb version.
You will need to study the -fix* switches in the gbak documentation,
to fix the metadata and, if you have non-ascii data, the data. This
may be simple or not-so-simple, depending on what character set was
used to store the data.

Whatever you do, keep safe backups of the database and work only with
a good supply of copies that you don't mind trashing!