How to Load Data From Oracle to MariaDB? | 2 Easy Steps

• June 13th, 2022

Oracle to MariaDB - Featured Image

Oracle is a brand of commercial software created by Oracle Corporation. Oracle commonly uses RDBMS and enables speedy and secure data storage and retrieval. It is used to power Online Transaction Processing and Data Warehousing applications. Oracle is compatible with all major operating systems, including macOS, Unix, Windows, and Linux. Oracle features a networking stack that allows apps from different platforms to connect with Oracle seamlessly.

MariaDB is an open-source Relational Database Management System (RDBMS) that may be used in place of the popular MySQL Database technology. It was created by the MariaDB Foundation and was made available on October 29, 2009. MariaDB has a substantially higher number of new features than MySQL, making it superior in performance and usability.

This article will walk you through the two methods to connect Oracle to MariaDB smoothly. It also provides a quick overview of Oracle and MariaDB before delving into the procedures needed for Oracle to MariaDB Migration. Read along to understand the step-by-step process to perform Oracle to MariaDB Migration.

Table of Contents

What is Oracle?

Oracle to MariaDB: Oracle Logo | Hevo Data
Image Source

Oracle provides a multi-model Database Management System commonly used for Data Warehousing, Online Transaction Processing, and hybrid Database workloads. Oracle Database is available on various leading platforms, including Linux, UNIX, Windows, and macOS. Oracle was the first Database developed for Enterprise Grid Computing, the most cost-effective and versatile method of managing information and applications.

Enterprise Grid Computing develops large pools of industry-standard servers and flexible storage. This design enables the rapid provisioning of a new system from a collection of components. Peak workloads are not necessary as capacity may be readily transferred or added from the resource pool as needed. Provisioning and virtualization distinguish it from other forms of computing.

Grid Computing seeks to overcome a few prevalent challenges in Enterprise IT by developing more durable and cost-effective operating systems. Oracle provides on-the-grid computing capabilities to focus on offering centralized administration, robust security architecture, universal access, and powerful development tools to its users. This design allows Oracle to provide a complete Database at a reduced cost while maintaining more flexibility and service quality.

Oracle to MariaDB: Oracle Architecture | Hevo Data
Image Source

Key Features of Oracle

Here are some crucial aspects that have contributed to Oracle’s enormous success.

  • Integration Across Platforms: Oracle works with and supports all operating systems (OS), including Windows, macOS, and Linux.
  • ACID Compliant: Oracle DB provides ACID (Atomicity, Consistency, Isolation, and Durability) compliance to maintain the integrity of the Database throughout transaction processing.
  • Straightforward Communication: Communication between programs on various platforms is direct. Oracle’s native networking stack enables you to connect your Database to applications running on multiple platforms. For instance, you may easily connect and communicate with a Unix-based program using your Oracle Database (running on Windows).
  • Data Backup and Recovery: Oracle’s backup and recovery capabilities enable it to restore data from any accident or technological failure. The RAC architecture of Oracle ensures that all data and processes are backed up.
  • Analytics Solutions: Oracle Advanced Analytics and OLAP (Oracle Analytic Processing) may be used to fast analytical computations on corporate data.

Replicate Data From Oracle in Minutes Using Hevo’s No-Code Data Pipeline

Hevo Data, a Fully-managed Data Pipeline platform, can help you automate, simplify & enrich your data replication process in a few clicks. With Hevo’s wide variety of connectors and blazing-fast Data Pipelines, you can extract & load data from 100+ data sources such as Oracle or MariaDB straight into your Data Warehouse or any Database.

To further streamline and prepare your data for analysis, you can process and enrich raw granular data using Hevo’s robust & built-in Transformation Layer without writing a single line of code!

GET STARTED WITH HEVO FOR FREE

Hevo is the fastest, easiest, and most reliable data replication platform that will save your engineering bandwidth and time multifold. Try our 14-Day full access free trial today to experience an automated hassle-free Data Replication!

What is MariaDB?

Oracle to MariaDB: MariaDB Logo | Hevo Data
Image Source

MariaDB, a MySQL clone, is a popular Open-SQL RDBMS created by MySQL’s original creators. The fundamental similarity between them is that MariaDB is a software branch of MySQL. They are, however, not the same. MariaDB has advanced significantly since 2009 when numerous MySQL authors produced a distinct version from the same source.

When Oracle Corporation purchased MySQL, the developers were concerned about the future of their product. They were concerned that Oracle might terminate MySQL to eliminate a vital competitor. They also sought to ensure that their work was openly accessible. MariaDB originally arrived on the scene in this manner.

It is currently a stand-alone product among the world’s top ten most widely used relational Databases (holding the 9th position). It is completely GPL licensed and freely available to the public. Prominent MariaDB users are Google, Wikipedia, Tumblr, Amazon Web Services, Ubuntu, RedHat, and others.

MariaDB provides Linux and macOS versions in addition to the Windows version. This RDBMS is compatible with Intel and IBM Power8 hardware. It is offered on AWS, Rackspace Cloud, and Microsoft Azure. The procedure is easy to learn, safe, and convenient to utilize. It’s no wonder that it’s gaining popularity.

Oracle to MariaDB: MariaDB Architecture | Hevo Data
Image Source

Key Features of MariaDB

Here are some of the critical features of MariaDB

  • SQL Support: MariaDB supports most SQL statements, functions, procedures, definitions, variables, etc. Client apps are available, such as mysqladmin and mysqldump (these popular solutions for the command-line come with MariaDB). There are also other valuable plugins available, such as the audit plugin. All of these capabilities greatly simplify Database operations in MariaDB.
  • Executed Parallel Queries: This functionality is available in MariaDB versions 10.0 and above and allows several queries to be conducted concurrently. Some queries from the primary Database are essentially mirrored in the other Databases. In practice, it dramatically speeds up task completion. This allows OLAP capabilities for analytical queries to perform faster and more smoothly.
  • Thread Pooling: Thread Pooling is a concept that speeds up work on MariaDB with several connections to the Database. MariaDB uses a pool of previously open threads instead of starting a new thread for each connection. A new connection uses a thread to submit the query. All searches become quicker, which leads to faster results.
  • Database Views: Another performance-enhancing tool is Database Views. The fundamental differentiator when querying a view is the usage of virtual tables. MariaDB’s procedure will only concern that particular, unique table. Whether the query is directed at them, MySQL impacts all tables associated with that view. The optimized query of a Database view increases performance and decreases load.

Why Should you Migrate Data from Oracle to MariaDB?

You should migrate your data from Oracle to MariaDB because of the added advantages it offers over Oracle. These advantages include:

  • High Availability: To guarantee high availability in the case of a database, server, or data center failure, MariaDB provides replication with automated failover and multi-master clustering within a single data center or across many data centers. Disaster recovery is also provided by delayed replication, point-in-time rollback, and backup/restore.
  • Better Performance: To increase query efficiency, MariaDB provides both local and distributed partitions (i.e., sharding); table, row, or column compression to minimize disc I/O; and query result caching to reduce database load. Furthermore, MariaDB offers a storage engine designed for space and writing to increase write speed and minimize disc I/O in write-intensive applications.
  • Advanced Security: MariaDB offers data-in-motion encryption (e.g., connections and replication) as well as data-at-rest encryption, data protection via roles, dynamic data masking (full or partial), and database security against denial-of-service attacks. It also has a database firewall that may block queries based on syntax, role, frequency, and time.
  • High-Performance Analytics: MariaDB may duplicate data via a Change Data Capture (CDC) stream to facilitate scalable, high-performance analytics on near real-time data. MariaDB Enterprise Server supports ad hoc, on-demand analytics on billions of rows without the requirement for indexes by utilizing distributed, columnar storage and Massively Parallel Processing.

How to Migrate Data from Oracle to MariaDB?

In this section, you will learn how to perform Oracle to MariaDB Migration using the two methods mentioned below:

Method 1: Migrating Data from Oracle to MariaDB Using MariaDB MaxScale and MariaDB Enterprise Server

Step 1: Analyze the Current SQL Mode in MariaDB

  • It’s critical to double-check that SQL MODE is enabled since variables fluctuate and can be altered by third-party applications.
  • From a Linux terminal, check the current SQL mode:
sudo mariadb -e "show global variables like 'sql_mode';"
  • You can try to create a table with Oracle syntax using the default SQL_MODE:
MariaDB [oracle_migration]> CREATE TABLE "customers" (
"CUST_ID" NUMBER(8,0),
"FIRST_NAME" VARCHAR2(50 BYTE),
"LAST_NAME" VARCHAR2(50 BYTE),
"ADDRESS1" VARCHAR2(128 BYTE)
);
  • This will produce an error because the MariaDB client does not recognize this syntax by default.

Step 2: Configure SQLMode to Oracle Compatibility Mode

  • Change the SQL MODE of the session to Oracle compatibility mode:
SET SESSION sql_mode='ORACLE';
  • Try creating the same table once again:
MariaDB [oracle_migration]> CREATE TABLE "customers" (
"CUST_ID" NUMBER(8,0), 
"FIRST_NAME" VARCHAR2(50 BYTE), 
"LAST_NAME" VARCHAR2(50 BYTE), 
"ADDRESS1" VARCHAR2(128 BYTE)
);
  • This will end in displaying a BYTE error.

Step 3: Launch the MariaDB MaxScale GUI

You may set a rule on MaxScale to modify the live query before sending it to a MariaDB Server. This feature is handy when specific active queries need to be changed without affecting the application.

These features may also be used to correct mistakes in the application without requiring any deployment or impacting production.

Oracle to MariaDB: MariaDB MaxScale Welcome Image | Hevo Data
Image Source
  • Once configured, the MaxScale GUI is accessible by default on port 8989. You may go to this interface by going to https://127.0.0.1:8989.
  • Once connected, navigate to the MaxScale GUI monitoring page and choose the desired service.
Oracle to MariaDB: MariaDB MaxScale GUI | Hevo Data
Image Source
  • The MaxScale setup consists of multiple components. All of these modules are connected together in “Services.” The previous image shows that the service connects numerous servers, a monitoring system, a listening port, a routing rule, and maybe several filters.
  • In this scenario, only one service – the “Read-Write Service” – is defined. You can access the definition of this service by clicking on its name:
Oracle to MariaDB: Read-Write-Service | Hevo Data
Image Source

Step 4: Create a New Regex Rule for Migration

You may use a Regex filter on MariaDB MaxScale to rewrite live queries.

  • First, return to the MaxScale overview panel and click + Create New to configure a new filter:
Oracle to MariaDB: MaxScale Overview Panel | Hevo Data
Image Source
  • Select the option to create a new filter.
  • Choose “regexfilter” and provide a name corresponding to the filter aim.
  • In the parameter, enter the value to be replaced in the match parameter: BYTE (Remember to add escape special characters like parentheses with a backslash, as illustrated.)
  • Fill in the replace box with the appropriate value. It is parenthesis without escaping the special character in this situation.
  • Once finished, validate this new rule.

Step 5: Link your Migration Regex with MariaDB Service

  • Return to the service definition page and click the + Add Filters button in the Filters section after the new filter has been created.
Oracle to MariaDB: Read-Write-Service | Hevo Data
Image Source
  • Enable the newly created filter in the Add filters box to correlate it with the current service and listener.
  • After that, you can test your CREATE TABLE command again.

Step 6: Test the Created MariaDB Rule in MaxScale

  • Access the MaxScale service using the MariaDB command line.
$ mariadb -hmaxscale1.example.com -P4006 -utest -p
  • We can test the newly established rewrite rule after properly linking via the MaxScale interface.
  • Check the previously created database:
MariaDB [(none)]> use oracle_migration
  • Enable on the considered session the Oracle mode:
MariaDB [(none)]> SET SESSION sql_mode='ORACLE';
  • Create the table again with the same syntax, and you will observe that table was created without any errors since the application wasn’t modified.
MariaDB [oracle_migration]> CREATE TABLE "customers" (
"CUST_ID" NUMBER(8,0), 
"FIRST_NAME" VARCHAR2(50 BYTE), 
"LAST_NAME" VARCHAR2(50 BYTE), 
"ADDRESS1" VARCHAR2(128 BYTE)
);

With all these steps, you can migrate data from Oracle to MariaDB.

What Makes Hevo’s ETL Process Best-In-Class?

If you have a significant volume of data, providing a high-quality ETL solution might be challenging. Hevo’s Automated, No-code Platform provides you with everything you need for a seamless data replication experience.

Check out what makes Hevo so unique:

  • Fully Managed: Because Hevo is a fully automated platform, it does not require management or maintenance.
  • Data Transformation: Hevo provides a straightforward interface for perfecting, modifying, and enriching the data you want to convey.
  • Faster Insight Generation: Hevo provides near real-time data replication, allowing you to generate real-time insights and make faster decisions.
  • Schema Management: Hevo can automatically recognize the schema of incoming data and transfer it to the target schema.
  • Scalable Infrastructure: Hevo has in-built integrations for 100+ data sources such as Oracle & MariaDB (with 40+ free sources) that can help you scale your data infrastructure as required.
  • Live Support: The Hevo team is accessible round the clock to provide great assistance to its clients via chat, email, and support calls.
Sign up here for a 14-day free trial!

Method 2: Migrating Data from Oracle to MariaDB Using ESF Database Toolkit

Step 1: Select Oracle as a Source in Choose a Data Source Dialog Box

  • Enter the server name (localhost by default) and port (default.: 1521).
  • Enter the username (the default is “system”) and password.
  • Choose your login method (SID, Service Name, or TNS).
  • In the “Database” field, provide the source Oracle SID or Service_Name, or leave it blank if using the TNS technique.
  • Enter the schema name or leave it blank (the default is the same as the username, you can press the “Refresh” button to list all schemas).
Oracle to MariaDB: Database Migration Toolkit - Choose a Data Source | Hevo Data
Image Source

Step 2: Select MariaDB as a Destination in Choose a Destination Dialog Box

  • Enter the server name (localhost), port (3306), username, and password.
  • MariaDB supports a variety of Storage Engines; for more information on the MariaDB Storage Engine, please visit here.
  • Select a character set, such as UTF-8.
  • To list all MariaDB Databases programmatically, click the “Refresh” button. You may select an existing Database or input a new Database name; this toolkit will construct the new Database during the migration process.
Oracle to MariaDB: Database Migration Toolkit - Choose a Destination | Hevo Data
Image Source

Step 3: Select Source Table (s) & View (s) will pop up

  • Choose the tables/views that will be migrated.
Oracle to MariaDB: Database Migration Toolkit - Select Source Table(s) & View(s) | Hevo Data
Image Source
  • To change the table parameters or remap the table structure, click “…”.
Oracle to MariaDB: Transform | Hevo Data
Image Source
  • Before transferring data, you may specify the data transfer technique (Overwrite Table/Empty Data/Append Data/Skip Table) and filter the data.
  • If you select “Field Mapping,” you may redefine the fields in the destination table, such as field name, data type, default value, remark, etc.

Step 4: Execute Dialog Box will pop up

  • To begin the migration, click “Submit.” This toolkit will assist you in swiftly migrating data from Oracle to MariaDB without intervention.
Oracle to MariaDB: Database Migration Toolkit - Execution | Hevo Data
Image Source
  • To view the complete migration log, click “Browse Log.”
  • Click “Save as job” to save the migration settings to a job file, which you can then “Load Task” to quickly reload the migration job or execute via command-prompt in the future. To receive the complete command parameters, use “esf-cmd —help” in the command prompt.

Step 5: Migration Executed

  • The program will finish the data migration from Oracle to MariaDB as soon as feasible and provide you with a migration report.

What are the Best Practices for Migrating Data from Oracle to MariaDB?

Multiple methods are available to migrate data from Oracle to MariaDB. You can use a tool such as Oracle to MariaDB Migration tool, or you can take the benefit of MariaDB MaxScale and MariaDB Enterprise Server to migrate the data. There are several best practices to keep in mind regardless of the method you use for data migration:

  • Data Backup: Before proceeding, make a backup of the data. You cannot afford to lose data if something goes wrong during the installation. Before proceeding, ensure that backup resources are available and have been tested.
  • Determining Data Migration Schedule: Once you’ve decided on the rules and regions of responsibility, create a plan with start and finish dates. Include dates for progress checks or milestones if required.
  • Execute Multiple Tests: Test the data migration during the planning and design phases and during implementation and maintenance to ensure that you will finally get the intended result.
  • Keep Data Secure: It is easy to neglect security settings or permissions while moving data. Your data is subject to misuse or corruption if security is neglected.

Conclusion

This article gives you an overview of Oracle and MariaDB. It also reflects the two methods that can be used to migrate data from Oracle to MariaDB. Both methods offer specific advantages and disadvantages to their users, but Method 2 has a certain edge over the other. ESF Database Migration Toolkit is robust and delivers high performance while performing Oracle to MariaDB Migration. Moving your data using ESF Database Migration Toolkit allows you to quickly transfer data from Oracle to MariaDB, saving you time and effort.

Hevo Data is a No-code Data Pipeline that can transport real-time data from 100+ data sources such as Oracle, or MariaDB (including 40+ free sources), to a Data Warehouse or any other destination of your choice. It is a strong, fully automated, and secure solution that does not require coding!

VISIT OUR WEBSITE TO EXPLORE HEVO

Hevo can effortlessly automate data integration and allows you to focus on other aspects of your business like Analytics, Customer Management, etc.

You can perform on-demand transformations on the Data using Hevo Models and Workflows and prepare it for analysis suitable for your BI tool.

Want to take Hevo for a ride? SIGN UP for a full access free 14-day trial to streamline your data integration process. You may examine Hevo’s pricing plans and decide on the best plan for your business needs.

You may share your experience of migrating data from Oracle to MariaDB in the comments below.

No-Code Data Pipeline for Oracle