Migrating Oracle from Unix to Linux on the cloud, the easy way

Stelo is a startup company that provides online payments and mobile wallet solutions in Brazil.

All of our databases are Oracle and they were running on AIX on premises, inside an IBM Datacenter near São Paulo. We had an Oracle RAC for primary and a single instance Data Guard for disaster recovery purposes.


Although we have funding from two of the biggest banks in Brazil, we needed to migrate these databases from expensive AIX to cheap Linux on Intel and to be able to quickly provision databases to meet our development team’s needs. Migrating to the cloud seemed like the logical answer, but how could we convert these databases from Unix to Linux and migrate them to the cloud with minimal downtime?


Enter Delphix.

With Delphix, we were able to do exactly that, in the middle of the biggest project delivery of the year, painlessly.

How did we do it? You can see a sketch below of how we set up Delphix and used it to convert to Linux and then replicate it to the cloud.


We set a Delphix installation and a Staging Linux Server on premise in Brazil. We did it this way because, if you were unaware, Delphix provisions databases through NFS mounts, so it needs to be near the databases server to do it properly. To convert it from Unix to Linux, Delphix must first provision a clone to AIX and convert the datafile endianness there. It then unmounts the share and mounts it on Linux, where it will use the transportable tablespace method to finish the conversion, copying SYSTEM, SYSAUX, tablespace metadata etc. Our databases amount to 300 GB, but in Delphix, they only take about 50 GB, a 6:1 consolidation ratio. To keep track of all the changes and provide us nice snapshots of the databases, Delphix took almost 3 TB of changes and transformed it to only 40 GB, a 76:1 retention ration.

After we had a working copy of the database running on the Staging Linux Server, all we had to do was set up Delphix replication. It really works great, because Delphix is very effective at compressing, filtering, and de-duplicating the database, so the amount of data being transferred through the internet to our server on the cloud was reduced to a fraction of the size of production.

So, how does it work?

After you successfully configured Delphix on premises, first thing you have to do is to add AIX and Stage Linux servers.


You have to remember to designate a server to be used as staging. Most people will not want to allow a production server to be used as staging. If you are one of those people, you will need another server with the same OS version and the same Oracle version installed. Or you can use the standby server, if you have one.


We chose to leverage our active standby database as the source for Delphix, so we had to take care of disabling the recovery process before the snapshots were taken, and then re-enable it. Luckily, Delphix will let you automate that process through hook scripts when you set up your data source.


After you have your data sources configured, you’ll need to validate Unix to Linux transformation. There are a few Oracle pre-requisites you need to fulfill so you can transform the database (no regular user objects on SYSTEM tablespaces, no invalid objects etc). Just press the little green Icon on the lower left of your database card and Delphix will do it for you.


Delphix will let you set up pre- and post- transformation scripts and will let you quickly reenact the conversion over and over again, until you get it right. It literally takes a few minutes to rewind the database, tweak the transformation scripts, and try again. All that without disrupting the original data source, which, in many cases, will be your production database. If the validation is successful, the transform to Linux will be enabled and you’ll be able to finally provision the database on Linux:


Just select the Linux environment, fill in the information, set up any hook scripts if you need and you’re good to go.


Hopefully, your conversion will be successful and now you have a working copy of your database running on Linux. Delphix did the hard work using minimal amounts of storage, which is great.

Now what?

Now you replicate your newly converted database to the remote Delphix engine running on the cloud.


Tip: when you configure Delphix to replicate a database, it will also replicate its dependencies, because of how Delphix works internally. That means Delphix on premises will also need to replicate your AIX snapshots to Delphix on the cloud. At first, that doesn’t seem good, right? Wrong, it’s awesome. Do you remember that Delphix uses minimal amounts of storage to keep your Linux copy? If you set the replication of the AIX datasource beforehand, when you’re done converting, you will also have to send minimal amounts of data through the internet to the cloud, which effectively means that you will be able to send your converted database very quickly. Instead of gigabytes or even terabytes, you are sending megabytes.

After that, it’s as easy to provision your converted  database in the cloud. All you have to do is to provision your database to the Linux target you have previously configured. That’s it, you’re done.

As I said, we were able to convert our databases from AIX to Linux and send it to a server on the cloud very quickly, very easily and in a timely manner. We were able to convert all 300 GB of databases from AIX to Linux in about 45 minutes. Because we had previously  replicated the dependencies to the cloud, it only took 2 minutes to send those copies after the conversion. When we were ready to flush them to the SSD storage, it only took us a few more minutes.  All that in the middle of the biggest application deployment of the year. Delphix also let us replay the scripts we had to run on the database many times until we got it right, before we flushed the databases to ASM.

It was a great experience, really.

7 thoughts on “Migrating Oracle from Unix to Linux on the cloud, the easy way

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s