Migrate Oracle to MariaDB
Certified — live-tested pathThe converter maps 15 Oracle column types to MariaDB. One of them changes kind on the way (DATE becomes datetime); the table below lists every one. DBShifts converts the schema, copies the rows in parallel batches and checks the result with row counts and checksums.
Free tier · no credit card
Oracle vs MariaDB
Oracle
Oracle Database, the long-standing enterprise standard.
MariaDB
the community-driven MySQL fork.
Oracle to MariaDB data type mapping
Pulled directly from DBShifts's own conversion rules — not a general reference table, this is what actually runs.
| Oracle | MariaDB |
|---|---|
| NUMBER(10) | bigint |
| NUMBER(19) | decimal(19,0) |
| NUMBER(10,2) | decimal(10,2) |
| VARCHAR2(255) | varchar(255) |
| NVARCHAR2(255) | varchar(255) |
| CHAR(10) | char(10) |
| CLOB | longtext |
| NCLOB | longtext |
| BLOB | longblob |
| DATE | datetime |
| TIMESTAMP | datetime |
| BINARY_FLOAT | float |
| BINARY_DOUBLE | double |
| RAW | LONGBLOB |
| LONG | longtext |
Example: Oracle to MariaDB schema conversion
Oracle
CREATE TABLE orders ( id NUMBER(10) GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, customer_id NUMBER(10) NOT NULL, total NUMBER(10,2) NOT NULL, notes CLOB, reference VARCHAR2(255), placed_at TIMESTAMP NOT NULL );
MariaDB
CREATE TABLE IF NOT EXISTS `orders` (
`id` bigint NOT NULL AUTO_INCREMENT,
`customer_id` bigint NOT NULL,
`total` decimal(10,2) NOT NULL,
`notes` longtext,
`reference` varchar(255),
`placed_at` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;NUMBER is the type that decides this migration
Oracle's NUMBER is a single decimal type covering everything from a boolean flag to a 38-digit value, and the conversion depends entirely on the declared precision and scale. NUMBER(10) with no scale becomes an integer type; NUMBER(10,2) becomes DECIMAL(10,2); NUMBER with no precision at all has no safe fixed mapping, because the column could hold anything within Oracle's 38 digits.
Unqualified NUMBER columns are worth auditing individually before the migration. Converting them to DOUBLE is the fast answer and the wrong one for money, because it introduces binary rounding into values that were exact in Oracle. DECIMAL(38,10) is the safe default at some cost in storage.
MariaDB's DECIMAL maximum is 65 digits total, comfortably above Oracle's 38, so precision itself is not the constraint. The constraint is knowing which precision each column actually needs.
Empty string is NULL in Oracle and is not in MariaDB
Oracle treats the empty string as NULL. Insert '' into a VARCHAR2 column and Oracle stores NULL, which means an Oracle NOT NULL column can never contain an empty string. MariaDB distinguishes the two, so after migration a column may contain both NULL and '' where the source could only express one.
This changes query results rather than breaking loads. Application code written against Oracle will use IS NULL to test for emptiness, and that test silently stops matching rows that arrived as empty strings from another source later. It is a correctness difference that no row count or checksum will flag, because both sides genuinely match at migration time.
Sequences, triggers and the identity pattern
Older Oracle schemas generate keys with a sequence plus a BEFORE INSERT trigger, because identity columns only arrived in Oracle 12c. That pattern converts to AUTO_INCREMENT, and the trigger should be dropped rather than translated, since keeping both produces a trigger fighting the auto-increment.
After the data loads, the AUTO_INCREMENT counter has to be set past the highest imported key or the first insert collides with existing rows. Sequences that are not tied to a single table, such as a shared sequence used across several tables, have no AUTO_INCREMENT equivalent and need a separate approach.
Oracle's PL/SQL packages have no MariaDB equivalent. Procedures and functions convert individually, but package-level state, package variables that persist for a session, has nowhere to go and needs redesign.
Oracle → MariaDB conversion notes
Engine-specific rules baked into the conversion and transfer pipeline — verified by live certification of this exact pair.
- NUMBER columns are fetched as exact decimals (38 digits), not lossy floats.
- Identifier case differences (Oracle uppercases unquoted names) are reconciled automatically during transfer.
- Empty string = NULL semantics are accounted for in validation so comparisons stay honest.
- Literal 'NULL' defaults reported by MariaDB's information schema are cleaned instead of becoming DEFAULT 'NULL' strings.
- AUTO_INCREMENT reseed after bulk load, same as MySQL.
Frequently asked questions
Is Oracle to MariaDB migration production-ready in DBShifts?
Yes. Oracle to MariaDB is a certified pair: it passes the live certification suite on real Oracle and MariaDB servers, which checks schema fidelity, row counts, type-aware checksums and paging across batches.
What happens to Oracle types that MariaDB doesn't have?
Each gets the nearest MariaDB type the converter treats as safe: DATE becomes datetime. Every such decision is in the migration plan before anything runs, and any mapping can be overridden per column.
Can I keep Oracle and MariaDB in sync after the initial migration?
Yes, until you cut over. DBShifts reads Flashback Version Query between SCNs, from an SCN captured before the first row is copied. A change has to still be in undo when it is read, so undo retention sets how long the stream can pause.
Which Oracle data types need a second look when moving to MariaDB?
The table above carries a note on 4 of them: NUMBER(10) (bigint), CLOB (longtext), DATE (datetime), RAW (LONGBLOB). Analysis flags the same columns on your own schema before any data moves.
Go deeper
How We Live-Certified All 49 Migration Paths
The certification harness behind this page's claims.
Zero-Downtime Migration with Change Data Capture
Snapshot, stream the changes made meanwhile, and stay in sync until cutover.
Reference
Compared with other tools
Errors you may hit
Ready to move Oracle to MariaDB?
Set up in under two minutes. Validation and rollback included.
Start Free Migration