Migrate Oracle to SQL Server
Certified — live-tested pathThe converter maps 15 Oracle column types to SQL Server. One of them changes kind on the way (DATE becomes DATETIME2); 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 SQL Server
Oracle
Oracle Database, the long-standing enterprise standard.
SQL Server
Microsoft's enterprise relational database.
Oracle to SQL Server data type mapping
Pulled directly from DBShifts's own conversion rules — not a general reference table, this is what actually runs.
| Oracle | SQL Server |
|---|---|
| NUMBER(10) | BIGINT |
| NUMBER(19) | DECIMAL(19,0) |
| NUMBER(10,2) | DECIMAL(10,2) |
| VARCHAR2(255) | NVARCHAR(255) |
| NVARCHAR2(255) | NVARCHAR(255) |
| CHAR(10) | NCHAR(10) |
| CLOB | NVARCHAR(MAX) |
| NCLOB | NVARCHAR(MAX) |
| BLOB | VARBINARY(MAX) |
| DATE | DATETIME2 |
| TIMESTAMP | DATETIME2 |
| BINARY_FLOAT | FLOAT |
| BINARY_DOUBLE | FLOAT(53) |
| RAW | VARBINARY(MAX) |
| LONG | NVARCHAR(MAX) |
Example: Oracle to SQL Server 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 );
SQL Server
IF OBJECT_ID(N'orders', 'U') IS NULL
CREATE TABLE [orders] (
[id] BIGINT IDENTITY(1,1) NOT NULL,
[customer_id] BIGINT NOT NULL,
[total] DECIMAL(10,2) NOT NULL,
[notes] NVARCHAR(MAX),
[reference] NVARCHAR(255),
[placed_at] DATETIME2 NOT NULL,
CONSTRAINT [PK_orders] PRIMARY KEY ([id])
);Sequences transfer directly here, unlike most Oracle routes
SQL Server has had real sequence objects since 2012, so Oracle's CREATE SEQUENCE has a genuine counterpart rather than needing to be rewritten as an identity column. Cache sizes, increments and cycling all carry over. This makes SQL Server an easier target than MySQL for schemas that lean on sequences shared between tables, which is a common Oracle pattern and has no clean MySQL equivalent.
What does not carry is the trigger-plus-sequence idiom used for auto-numbering before Oracle 12c. Those become either a DEFAULT NEXT VALUE FOR on the column or an IDENTITY, and the two behave differently on explicit inserts, so pick based on whether the application ever supplies the key itself.
Packages are the work; the tables are not
Estimate this migration by counting PL/SQL, not tables. SQL Server has no package construct — no grouping of related procedures behind a shared specification, and crucially no package-level variables persisting for the session. A package that caches lookup values in a package variable between calls has no direct translation, and the usual rewrite is a temporary table or a session context, both of which have different lifetime and concurrency behaviour.
CONNECT BY has no T-SQL equivalent and becomes a recursive common table expression. The rewrite is mechanical for simple hierarchies and genuinely difficult where CONNECT BY NOCYCLE, LEVEL and SYS_CONNECT_BY_PATH are combined. Budget for it explicitly rather than treating it as a syntax substitution.
NUMBER without precision has no exact target
Oracle's NUMBER can be declared with no precision at all, in which case it stores up to 38 significant digits with whatever scale each value happens to carry. SQL Server has no equivalent — DECIMAL requires a fixed precision and scale at definition time.
So an unconstrained NUMBER column has to be given bounds that did not previously exist, and whatever is chosen is a guess unless the real values are inspected first. Query MAX, MIN and the maximum observed scale on the Oracle side before converting. Choosing DECIMAL(38,10) as a blanket default wastes storage on every row and still truncates a value that happened to carry eleven decimal places.
Oracle → SQL Server 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.
- IDENTITY_INSERT is managed per table so explicit IDs from the source load correctly, then counters are reseeded with DBCC CHECKIDENT.
- Binary columns always carry an explicit length — bare VARBINARY (which means 1 byte) never reaches the target.
- TRUNCATE falls back to DELETE on FK-referenced tables automatically.
Frequently asked questions
Is Oracle to SQL Server migration production-ready in DBShifts?
Yes. Oracle to SQL Server is a certified pair: it passes the live certification suite on real Oracle and SQL Server servers, which checks schema fidelity, row counts, type-aware checksums and paging across batches.
What happens to Oracle types that SQL Server doesn't have?
Each gets the nearest SQL Server type the converter treats as safe: DATE becomes DATETIME2. Every such decision is in the migration plan before anything runs, and any mapping can be overridden per column.
Can I keep Oracle and SQL Server 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 SQL Server?
The table above carries a note on 4 of them: NUMBER(10) (BIGINT), CLOB (NVARCHAR(MAX)), DATE (DATETIME2), RAW (VARBINARY(MAX)). 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.
Masking PII in Flight: Production Data Without Production Risk
Mask during the migration, not after, so real PII never sits in a lower environment.
Reference
Compared with other tools
Errors you may hit
Ready to move Oracle to SQL Server?
Set up in under two minutes. Validation and rollback included.
Start Free Migration