Does this site look plain?

This site uses advanced css techniques

[Evolution logo]

The Evolution™ payroll service-bureau software system is built around the Firebird SQL database system, with a Windows server as the middle tier and Linux for the backend database server.

Each client file is its own separate database file (CL_123.gdb, CL_1032.gdb, etc.), plus there are several centralized files used by the whole system:

Generally speaking, one ought not go into these files directly, as they are managed exclusively by Evolution, and it's akin to fooling with the registry on Windows: it can be dangerous.

Nevertheless, it's possible to perform some readonly queries that won't endanger anything, this Evo Tip is about one such query. We're going to ask a particular database file about its patch version.

When upgrading from one major release to another, a series of patches (SQL update rules) are applied to all the database files, and this makes all the changes required for the new version. The last step of all patches is to update this version information, and it can be queried to find out if a patch has been applied or not.

It can also be used to find out which version of the SYSTEM database has been installed; this has a major version (e.g. 7.5 = Irasburg), plus an individual patch level. This can be discovered from Evolution (the SYSTEM version number is in the title bar), but it can also be fetched directly from the database while on the Linux or Windows machines.

This is done with the isql command, and can be run from either the Linux database machine or any Windows machine having a package server installed.

From the Windows machine

This process starts by getting to a command prompt, running the isql command, and making one SQL query. Old-timers all call this the "MS-DOS window": it's launched by clicking Start, Run, then entering cmd followed by RETURN. This opens a (usually) black windows with a prompt, waiting for your commands.

Inside the command window, we'll use Firebird's isql command to connect to a particular database file on the database server. We need three pieces of data to do this:

Putting this together, we launch isql:

C:\> cd \Program Files\Firebird\Firebird_1_5\bin

C:\> isql -u EUSER -p password hostname:/db/evolution/S_BUREAU.gdb
Database:  evodb:/db/evolution/S_BUREAU.gdb, User: EUSER
SQL> select * from VERSION_INFO;

MAJOR_VERSION MINOR_VERSION PATCH_VERSION
============= ============= =============
            7             5             0   ««— version information

SQL>> control-C
C:\> exit

This shows that the file has been patched to version 7.5, which corresponds to Irasburg.

Note: if the isql command is not found, it means that the system command path is not set up properly, and you'll need to get some help to fix this.

On the Linux database machine

These instructions are similar to that used on Windows, and it starts by getting onto the Linux system itself. This is usually done over the network with a secure-shell client, such as SecureCRT or PuTTY.

Once on the system as root, launch the isql command much like before, though we don't need a hostname component because it's done on the local machine.

# /opt/firebird/bin/isql -u EUSER -p password /db/evolution/S_BUREAU.gdb
Database:  /db/evolution/S_BUREAU.gdb, User: EUSER
SQL> select * from VERSION_INFO;

MAJOR_VERSION MINOR_VERSION PATCH_VERSION
============= ============= =============
            7             5             0   ««— version information

SQL> control-D
#

Likewise, this shows version 7.5, which is Irasburg.


This information is not produced or endorsed by iSystems, LLC.

First published: 2006/08/11