Migrate MariaDB to Oracle
Certified — live-tested pathThe converter maps 20 MariaDB column types to Oracle. 6 of them change kind on the way (TINYINT(1) becomes NUMBER(1), TIME becomes VARCHAR2(18), YEAR becomes NUMBER(4), and more); 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
MariaDB vs Oracle
MariaDB
the community-driven MySQL fork.
Oracle
Oracle Database, the long-standing enterprise standard.
MariaDB to Oracle data type mapping
Pulled directly from DBShifts's own conversion rules — not a general reference table, this is what actually runs.
| MariaDB | Oracle |
|---|---|
| INT | NUMBER(10) |
| BIGINT | NUMBER(19) |
| SMALLINT | NUMBER(5) |
| TINYINT(1) | NUMBER(1) |
| DECIMAL(10,2) | NUMBER(10,2) |
| FLOAT | BINARY_FLOAT |
| DOUBLE | BINARY_DOUBLE |
| VARCHAR(255) | VARCHAR2(255 CHAR) |
| TEXT | CLOB |
| LONGTEXT | CLOB |
| CHAR(10) | CHAR(10 CHAR) |
| DATE | DATE |
| DATETIME | TIMESTAMP |
| TIMESTAMP | TIMESTAMP WITH TIME ZONE |
| TIME | VARCHAR2(18) |
| YEAR | NUMBER(4) |
| BLOB | BLOB |
| JSON | CLOB |
| ENUM('a','b') | VARCHAR2(255) |
| SET('a','b') | VARCHAR2(4000) |
Example: MariaDB to Oracle schema conversion
MariaDB
CREATE TABLE orders (
id INT AUTO_INCREMENT PRIMARY KEY,
customer_id INT NOT NULL,
status ENUM('new','paid','shipped') NOT NULL DEFAULT 'new',
total DECIMAL(10,2) NOT NULL,
is_gift TINYINT(1) NOT NULL DEFAULT 0,
notes TEXT,
metadata JSON,
placed_at DATETIME NOT NULL
);Oracle
CREATE TABLE "orders" (
"id" NUMBER GENERATED BY DEFAULT AS IDENTITY NOT NULL,
"customer_id" NUMBER(10) NOT NULL,
"status" VARCHAR2(255) DEFAULT 'new' NOT NULL,
"total" NUMBER(10,2) NOT NULL,
"is_gift" NUMBER(1) DEFAULT 0 NOT NULL,
"notes" CLOB,
"metadata" CLOB,
"placed_at" TIMESTAMP NOT NULL,
CONSTRAINT pk_orders PRIMARY KEY ("id")
);Identifier length, case and quoting
Oracle folds unquoted identifiers to uppercase, and MariaDB does not. A table created as customer_orders in MariaDB becomes CUSTOMER_ORDERS in Oracle unless it is quoted, and quoting it preserves the lowercase name at the cost of requiring quotes in every query from then on. Choose one convention before converting, because mixing them produces tables that appear to exist and cannot be selected from.
Identifier length is the other constraint. Oracle allowed 30 bytes before 12.2 and 128 after, while MariaDB allows 64 characters. Long generated names, particularly for foreign keys and indexes, are the ones that overflow, and they overflow at DDL time rather than during the data load.
Case sensitivity in data, not just in names
MariaDB's default collation is case-insensitive, so 'ACME' and 'acme' are equal in a WHERE clause and cannot both exist in a unique index. Oracle compares strings case-sensitively by default. After migration, queries that matched on mixed case stop matching, and a unique index that rejected a duplicate on MariaDB will accept it on Oracle.
That second effect is the dangerous one, because it does not fail. It quietly permits data the source considered duplicate, and the divergence grows from the moment the application starts writing to Oracle.
Text types, and why TEXT becomes CLOB
MariaDB TEXT holds up to 65,535 bytes and LONGTEXT up to 4GB, while Oracle VARCHAR2 stops at 4000 bytes in standard SQL semantics. Anything above that has to become CLOB, which is why the table above maps TEXT to CLOB rather than to a large VARCHAR2.
CLOB is not a drop-in replacement. It cannot be indexed like a VARCHAR2, comparison semantics differ, and some drivers require explicit handling to read it. A column that is declared TEXT but never exceeds a few hundred characters is much better converted to VARCHAR2, so it is worth measuring the real maximum length per column rather than trusting the declared type.
Oracle also counts VARCHAR2 in bytes by default rather than characters. A 255-character column holding multi-byte UTF-8 needs VARCHAR2(255 CHAR) or it will reject rows that fit comfortably in MariaDB.
MariaDB → Oracle conversion notes
Engine-specific rules baked into the conversion and transfer pipeline — verified by live certification of this exact pair.
- MariaDB's JSON columns (LONGTEXT + json_valid CHECK) are detected and mapped to real JSON types on targets that have them.
- Engine-specific CHECK constraints like json_valid() are filtered on targets that don't support them — data still migrates.
- Display-width unsigned types (bigint(20) unsigned) are recognized and widened correctly.
- CHAR columns use character semantics, so multi-byte UTF-8 doesn't overflow byte-sized columns.
- Booleans land as NUMBER(1) with values bound as integers (Oracle drivers can't bind Python booleans to NUMBER).
- DROP TABLE … CASCADE CONSTRAINTS wrappers handle re-runs without manual cleanup.
Frequently asked questions
Is MariaDB to Oracle migration production-ready in DBShifts?
Yes. MariaDB to Oracle is a certified pair: it passes the live certification suite on real MariaDB and Oracle servers, which checks schema fidelity, row counts, type-aware checksums and paging across batches.
What happens to MariaDB types that Oracle doesn't have?
Each gets the nearest Oracle type the converter treats as safe: TINYINT(1) becomes NUMBER(1), TIME becomes VARCHAR2(18), YEAR becomes NUMBER(4), JSON becomes CLOB, ENUM('a','b') becomes VARCHAR2(255). Every such decision is in the migration plan before anything runs, and any mapping can be overridden per column.
Can I keep MariaDB and Oracle in sync after the initial migration?
Yes, until you cut over. DBShifts reads the row-based binary log (binlog_format = ROW). With zero-downtime mode on, the log position is captured before the first row is copied, so writes made during the copy are replayed afterwards.
Which MariaDB data types need a second look when moving to Oracle?
The table above carries a note on 9 of them: TINYINT(1) (NUMBER(1)), FLOAT (BINARY_FLOAT), DOUBLE (BINARY_DOUBLE), TIMESTAMP (TIMESTAMP WITH TIME ZONE) and more. 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 MariaDB to Oracle?
Set up in under two minutes. Validation and rollback included.
Start Free Migration