This article was originally posted on the Delphix Support blog on 15-Nov 2015, but with the deprecation of the XPP feature with the new 6.0 release and higher, it was decided best to remove this article.
So, I have saved it and posted it here instead, almost 4 years to the day after it was originally posted…
The topic of converting Oracle databases from one of the proprietary
UNIX platforms (i.e. Solaris, AIX, or HP-UX) to Linux seems at first pretty
esoteric and far-fetched.
Meh. Right?
Plus, a lot of folks who have used Solaris, AIX, and HP-UX over the years can
argue that those operating systems have far more capabilities and
technical advantages than Linux, and they may be absolutely correct. Who wants to get caught up in a religious debate?
Meh again. Right?
But interestingly enough, the big issue here is not the relative technical merit.
The Cloud is about the commoditization of servers and services. Unless you are using the hosting services or Cloud services offered by the operating system vendor themselves (i.e. Oracle for Solaris, IBM for AIX, or by HP or HP-UX), then the only operating systems being offered by hosting or Cloud vendors are either Linux or Windows on Intel x86 or x86_64.
So, converting an Oracle database from UNIX to Linux is a prerequisite to moving it to the Cloud. Betcha didn’t think of it that way, eh?
This is why Delphix uses the term modernization to describe the capability of cross-platform provisioning (i.e. XPP), also known as UNIX-to-Linux (i.e. U2L). It is not because Linux on x86/x86_64 platforms are any more modern than Solaris on SPARC, AIX on Power, or HP-UX on PA-RISC/Itanium, but because modernization involves moving the data center to hosting or the Cloud.
I’m not willing to engage in an argument about which platform has more technical merit than one another. However, I will assert that if you’re not running Oracle on Linux, then you are not positioned for the future, just based on the economics. If you really think technical merit beats economics, then I have a nice VAX running VMS for you.
So, Delphix XPP a.k.a. U2L is the on-ramp to the Cloud. I prefer the term “XPP” rather than “U2L”, so I’m going to use that going forward…
Now let’s be clear on a few things. Only Oracle can write the software to migrate an existing Oracle database from one operating system to another, from one “endian” chipset to another. So Delphix has not, and could not, write the basic processes to perform conversion, because Oracle datafile formats are themselves proprietary. But what Delphix has done is take the processes for conversion created by Oracle and actually made them feasible.
Here’s how…
The capability of cross-platform migration was introduced to Oracle RMAN in Oracle10g database release 1 (i.e. 10.1). This was the CONVERT DATABASE functionality, and it was only capable of converting same-endian chipsets.
The terms “big endian” and “little endian” were invented in Jonathan Swift’s satirical novel “Gulliver’s Travels”, first published in 1726.
The term refers to a civil war in the novel between the people of Lilliput, some of whom ate their soft-boiled eggs by cracking the blunt or “big” end of an egg, others who ate their soft-boiled eggs by cracking the pointy or “little” end of an egg. This wickedly sharp satire accurately portrays controversy and conflicts over the choices of ordering of bytes within words by processor manufacturers in the 1960s and 1970s, which have subsequently been propagated forward to this day.
-Jonathan Swift “Gulliver’s Travels”, 1726
All three of the proprietary UNIX variants (i.e. Solaris on SPARC, AIX on Power, and HP-UX on both PA-RISC and Itanium) are big-endian. All x86 and x86_64 chips are little-endian, so XPP involves converting numerics from big-endian to little-endian.
In Oracle10 release 2 (i.e. 10.2), Oracle added the CONVERT TABLESPACE and CONVERT DATAFILE functionality which permit conversion between endian platforms (i.e. big to little or little to big).
So, at this point in time, XPP is functionality that has existed in Oracle for about 10 years now, or as long as Oracle10gR2 has been available.
But XPP hasn’t been a frequently-used feature over that time, as you are no doubt aware. I know lots of people have known about it, but very few have actually done it. And even fewer have done it outside of playgrounds, out in real-life databases.
There are two reasons for this: 1) the trend toward commoditization of x86/x86_64 is only now accelerating with the maturation of the Cloud and 2) there are substantial obstacles.
The most substantial obstacle is the fact that the functionality involving endian conversion (i.e. CONVERT DATAFILE/TABLESPACE) also includes Oracle’s transportable tablespace (a.k.a. TTS) functionality. TTS requires that the source database be in read-only state during any tablespace transport operations.
Now, if you’re trying to convert a Linux copy of a UNIX production database, you don’t want to have to interrupt service in the production database by making it read-only. In the IT biz, we call that down time and it is bad. Instead, what you’re going to have to do is create a full copy of the UNIX production database, and then make that copy read-only.
This sounds innocuous enough, but let’s think that through? If our production database on UNIX is several terabytes or larger, and we wish to simply test the conversion to Linux using CONVERT DATAFILE / TABLESPACE, then we need enough space for two additional copies of the production database: one for the source UNIX copy (to be set to read-only) and one for the target converted Linux copy. To paraphrase an old saying, “A couple terabytes here and a couple terabytes there, and pretty soon you’re talking real storage“. And of course, it is not just about allocating twice the volume of the production storage for this test, there is also the time involved in copying two complete sets of the production database. Needless to say, it is not easy to enter into this exercise lightly. Nor repeatedly. And so, this 10 year old functionality remains generally a big mystery.
Enter Delphix data virtualization.
Delphix can create a virtual database (VDB) for the read-only UNIX copy of the production database, requiring only a few minutes to completely provision regardless of the size of the database. Of course, practically no additional storage is required for this virtual database which is set to read-only almost immediately and stays read-only throughout its brief lifetime.
Even better, Delphix can also create a VDB for the converted Linux copy of the database, and because the Delphix file-system is able to transparently deduplicate (or mooch) blocks that contain the same contents but in different endian format, even the converted Linux copy of the database consumes very little storage as a result of the conversion.
To use numbers from actual experience, converting a 5 TB production UNIX database without Delphix requires the allocation and copying of 10 TB of additional storage. Converting the same 5 TB production UNIX database using Delphix requires less than 12 GB of additional storage.
Please note the change from “TB” to “GB” in that last sentence? That is an order of magnitude difference.
Admittedly, while the storage savings are consistent, the amount of time needed to perform XPP potentially has one or both of two long-running operations, which is one fewer long-running operation than when not using Delphix. Those long-running operations are…
- Copying the production UNIX database to create the non-production UNIX database copy
- Copying database metadata for TTS operations from the non-production UNIX database copy to the converted Linux database
- Using the RMAN CONVERT DATAFILE command to convert all datafile blocks from UNIX to Linux
Item #1 is a long-running and expensive step only without Delphix XPP; with XPP, it is fast and inexpensive.
Item #2 is only an issue for certain databases supporting enormous applications like Peoplesoft which contain millions of objects like tables and indexes. For most applications, there are only several thousand objects, so the single-threaded export/import of database metadata is not a concern
Item #3 might be an issue if the database is very large, because the RMAN CONVERT DATAFILE operation is converting every single block in the database.
Both items #2 and #3 could issues regardless of whether Delphix XPP is used or not.
So please understand from the beginning that XPP might be a long-running process because of the one or two long-running steps. At least, with Delphix XPP there are only the one or two potentially long-running steps, because without Delphix XPP there is always one more long-running step.
Also, please understand that without the orchestration provided by Delphix, there are about a dozen non-trivial smaller steps to be performed manually in addition to the 2-3 long-running steps mentioned above. For example, after the RMAN CONVERT DATAFILE processes are complete, there are several small post-processing tasks, such as recompiling all PL/SQL objects in the database, and so on. Doing these steps manually as documented by Oracle is prone to human error, and the additional time and effort of automating these steps is strongly recommended without Delphix.
From a cookbook standpoint, there are two major phases of a Delphix XPP operation: 1) validation and 2) conversion, as documented online here.
The validation step, or validating an Oracle dSource for XPP, is documented online here. It automates the creation of a UNIX database copy to be set to read-only so that validation procedures like the CHECK_DB and CHECK_EXTERNAL procedures in the DBMS_TDB package and the TRANSPORT_SET_CHECK procedure in the DBMS_TTS package can be executed automatically. These procedures will fail if the database is not in read-only mode, and will verify whether the database contains any of the many restrictions listed in Oracle documentation for conversions online here and for transporting tablespaces online here. Validation with Delphix XPP is fast and easy, so it can be performed over and over, to ensure that any restrictions encountered have been addressed and eliminated, one way or the other. Delphix XPP also allows the upload of a SQL script to fix issues identified during validation, if it is not feasible to fix the problem in the source production database itself. The creation and upload of scripts to fix identified XPP issues is documented online here.
The conversion step, or provisioning a Linux VDB from a UNIX dSource, is fully automated and is documented online here. Conversion is possible only after validation is successfully completed. If a SQL script was uploaded to address restrictions encountered during validation, then that script should continue to be used during conversion. During conversion, Delphix automates the many small and large steps, including the provisioning of a read-only UNIX database copy, the export/import of database metadata, and the RMAN CONVERT DATAFILE processes.
So you can see that a lot of blood, sweat, and tears have been put into this feature.
XPP is another example of the enabling power of data virtualization. Without it, Oracle cross-platform migration is a complicated, expensive, and slow process with many manual steps. With Delphix data virtualization, XPP is simple and inexpensive. It is still not a fast process due to the long-running steps described earlier, but even so it may be fast or easy enough to become feasible as your organization moves toward migration into the Cloud.