Welcome to 'Back to Basics'. I am Anita Singh. In today's episode, I'll be talking about
database migrations. We'll be focusing primarily on database migrations using Babelfish.
Babelfish is a tool that helps you migrate your applications running on Microsoft SQL Server databases to
Aurora PostgreSQL in AWS. In recent years, we have observed that many companies have a strong desire
to break free from commercial databases such as Microsoft SQL Server. One of the main driving
factors is licensing. Companies want to avoid high licensing costs and the complexities of adhering
to vendor licensing terms. Applications today have very high availability and
scalability requirements they require dynamic and flexible scaling options with optimal cost
and performance. Which is easily available with a cloud native database such as Aurora.
Over the years, I have performed multiple heterogeneous database migrations and one common
observation is that the most challenging and time consuming task is converting, rewriting, and testing
the application code changes. It involves multiple rounds of code rewrites and performance testing.
so let's talk about Babelfish. Babelfish is an open source tool that helps migrating applications
with minimal or no code changes, and hence it can save us up to 50 percent of the total database
migration effort. Babelfish also relieves us from the commercial database licensing
terms and conditions - as Aurora PostgreSQL does not have any licensing restrictions.
So, here's what a typical migration pattern looks like for an application when migrating
from Microsoft SQL Server to Aurora PostgreSQL without Babelfish. In this example we have an
application that uses a SQL Server connectivity driver to connect to the SQL Server database
endpoint using the tabular data stream protocol TDS and makes the database calls using T-SQL -
the proprietary language for SQL Server. We want to migrate the SQL Server database to
Aurora PostgreSQL and of course the application should be able to communicate with PostgreSQL.
So we have three major tasks to work on: Migrate the schema which can be done using AWS Schema
Conversion Tool (SCT). It might involve some manual fixes or conversions for mismatched data types.
Second, migrate the data using AWS Data Migration Service (DMS). And the third task
is to rewrite the entire code such that the application is compatible with PostgreSQL.
The code change involves countless development efforts and also we need to switch drivers to make the
application compatible with PostgreSQL. The most challenging task still remains - rewriting the code.
Now let's learn how a migration pattern looks with Babelfish. Babelfish expedites the
heterogeneous database migration because of its two key features.
First it supports the SQL Server specific TDS protocol for client server interactions
and secondly Babelfish makes Aurora PostgreSQL understand T-SQL. These two features let you
migrate your applications without having to change all your SQL code and without having to change any
client server connectivity drivers. When you create your Aurora PostgreSQL database cluster with the
Babelfish feature turned on. Aurora provisions the cluster with a PostgreSQL database named
Babelfish_DB. This database is where all migrated SQL Server objects reside. When connecting
through the TDS port you can continue to use the T-SQL code as you were doing prior to the migration.
Babelfish is my go-to pattern for migrating applications running on Microsoft SQL Server
databases to Aurora PostgreSQL databases. It helped us expedite our migration journey
because we got to keep most of our code in T-SQL. Thanks for watching 'Back to Basics', please check
out the links below for more information. See you next time!