System migration from MySQL to Oracle 

By January 7, 2021November 4th, 2021Services

Last year, we conducted a migration of the Command Support System for Polish Emergency Medical Services (SWD PRM) from MySQL to Oracle. The system was deployed in 37 medical dispatching centers. Learn more about the migration challenges and solution architecture.

The system supports all the emergency calls that require medical teams. SWD PRM is the first system in Polish Healthcare that successfully enabled centralized management of every medical dispatching center as well as over 1500 ambulances in the country.

MySQL or Oracle?

The system was launched back in 2016 and to date it has worked on the MySQL database. Last year the decision was made to migrate the system to Oracle – why?

  • Oracle is considered a database for large systems
  • The owner of the system (National Medical Rescue Monitoring Center) took over the responsibility for administrating their database along with the migration
  • MySQL-based solution was prone to data replication failures

Migrating a system of this class that operates on production can be tricky:

  • The system needs to maintain the highest reliability and continuity of operation. In every way, the system that had been developed on MySQL had to now operate on Oracle.
  • A seamless transition from MySQL to Oracle was an absolute must – there was no room for system downtime. Emergency medical services operate 24 hours a day without any breaks, and so should the system.
  • Large amount of data needed to be transferred – approximately 2 terabytes.
  • Changes in the system architecture.

Challenges and how we overcame them

In the version of the system running on MySQL, the architecture of two national centers operating in the active-active mode was used in the server layer. Each of the national centers located in various cities could handle traffic from the application throughout Poland, and the data between databases was automatically replicated. In the solution based on the Oracle database, the active-passive architecture was adopted at the database level using Oracle Data Guard. We had to make changes to the basic structures of the system.

MySQL and Oracle databases can be considered similar on the general level: both are relational SQL databases. But, on the level of detailed technical solutions, they are two completely different platforms. They differ greatly in the syntax of the SQL language itself, as well as in many other aspects – such as the method of generating object identifiers.

One of the challenges was the appropriate selection of the Oracle database configuration parameters, which determine the performance and stability of the database engine. It was even more difficult because the parameters could not be selected experimentally. The system had to be configured from the beginning to accept full production traffic from all over Poland. From the moment of switching production, it was impossible to stop the database.

From MySQL to Oracle

We tackled all the challenges – the system was switched to production in August 2020. After stopping the system running on MySQL, after only about 20 minutes, users started working on the system running on Oracle. The system functioned at nearly 100% from the very first moment. Any faults were non-critical and quickly fixed.

Over the following few days, our experts were observing and analyzing the system on the new platform. A few elements needed optimization to minimize the load. What’s interesting is that even though Oracle is a more advanced system, MySQL handled some types of queries faster, without special optimization.

Within two weeks, we implemented necessary changes and improvements – both in the database (triggers, procedures, and indexes) and in Wildfly’s application servers, communicating with the database using Hibernate technology.

Successful migration

We have managed to conduct the project in 6 months. It was one of the biggest challenges in SWD PRM system, requiring many specialists to cooperate: database administrators, software architects, and testers, who had to make sure that the system was working at full production load. The next weeks of stable and reliable work proved that we achieved the project goals!

If you are interested in more details about the MySQL-Oracle migration or the Command Support System for Polish Emergency Medical Services – contact us!