Steps to Upgrade Firebird v2.5.x to version 3.0.0 on Windows

Introduction

Just a few days ago Firebird v3.0.0 was released, and since many will update Firebird soon I wanted to make a small guide on how to do that on Windows. Read http://www.firebirdsql.org/en/news/firebird-3-0-is-released/ for more information about the release.

In this step-by-step guide I’ll outline what needs to be done to upgrade an existing Firebird v2.5.x server to version v3.0.0

After the steps the result should be a Stock (default) installation of Firebird v3.0.0 64bit.

What this guide does not have

I will not outline the process for upgrading the security database from old to new. This is an important step many installations, so be sure to check the Getting Started Guide from firebirdsql for more info!

What needs to be done for clients/client applications

Clients should ideally not have to change their code, only copy the new FBCLIENT.DLL file that resides in the Firebird Server installation folder to the clients.

By default the folders where the fbclient.dll files are (on the Server):

64bit installation:  C:\Program Files\Firebird\Firebird_3_0

32bit installation:  C:\Program Files (x86)\Firebird\Firebird_3_0

32bit and 64bit client DLL’s

You must remember to take the correct DLL for your application. If you install a 64bit Firebird the 32bit dll’s needed are stored under the WOW64\ folder in the installation folder.

 

Steps to Upgrade Firebird

Step 1 – Download what you will need

Download the installation files from http://www.firebirdsql.org/en/downloads.

Choose the installer versions, as the installer will prepare your environment for your during installation.

Also make sure you read the Getting Started Guide for details & additional information.

Step 2 – Backup any old Databases

The file format (ODS version) changes, so be sure to backup your databases before you continue. Firebird 3 will not open old ODS format files.

Step 3- Shutdown/Uninstall old Firebird

In order to install the new Firebird v3 you need to shutdown and/or Uninstall the old one.

Shutdown and rename (leave installed if v3 installation fails for easy rollback):

Open services.msc and set Startup=Disabled for the Firebird Guardian (and the Firebird) process.

Go to C:\Program Files (x86)\Firebird and rename the “Firebird_2_5” folder to “Firebird_2_5-old”. This will make the new installer think there is no installation of Firebird on the server.

Uninstallation

Run the uninstaller for Firebird v2.5

Step 4 – Install new Firebird Server

Run the installer you downloaded in step 1

After the installer has run, you should have a new Firebird server running on your machine as a Service.

Step 5 – Restore Databases

Using your preferred tools, restore the backed up databases.

Step 6 – Replace old fbclient.dll files

Copy the FBCLIENT.DLL file to all client machines, directories etc. The exact location depends on your client apps.

– Replace 32bit app fbclient.dll’s with new WOW64/fbclient.dll file
– Replace 64bit app fbclient.dll’s with new fbclient.dll file

 

And that’s about it! Test your applications and hopefully you can start enjoying the benefits of FBv3 immediately.

Advertisements

Firebird v2.5 Alpha 1 really makes a differance

While on vacation I’ve been working on a pet-project that has been around for many years now. The service is a mobile device chat and is powered by Firebird and PHP.

There used to be lots of problems handling more than 400 simultaneous users, but after a DB upgrade to Firebird v2.5 Alpha 1 things really look different.

Previously the DB machine (Dualcore) had one of the CPU’s running at 100% and the other not doing much (FB was Superserver) but after the switch the TOTAL CPU now ranges between 10% and 50% on the DB machine. At the same time the WebServer CPU load also decreased and is constantly under 60% where it used to be over 95% all the time!

So by just switching to the new DB engine a tremendous performance gain was achieved! Also a lot less errors are reported to the PHP error logs. The ones still coming are a deadlocks, but around 30 / 24h which is a lot less than it used to be!

To the Firebird team I want to say “THANK YOU for making a great database engine” !

Firebird v2.5 Alpha 1 UPPER() SQL statement resource hog

During my testing of the Firebird Performance I encountered a strange issue with the UPPER() command in SQL statements. Using the UPPER() command my SQL queries suddenly consumed 100% CPU from the server. All transaction times spike from 1-2 seconds to over 10 for the login operation, and the CPU on the DB machine goes to 100% flat instead of jumping between 30% and 90%… Read More »

Apache, PHP and Firebird Performance Tuning

In the last post I commented that I had a test-bed application, based on Apache, PHP and Firebird, and once the problem with the images was solved I could finally start doing the actual performance testing/tuning that I originally wanted to do.

The only major changes from the last post is that I’ve now upgraded the database engine to the “Firebird v2.5 Alpha 1” that supports SMP, and that the application now contains more base data in the tables.Read More »