Logo Logo Comparison: Oracle vs SQL Server

Modified date: Monday, June 30, 2025

Table of Contents

General

FeatureOracleSQL ServerDefinition
introOracle Database is a DBMS developed by Oracle Corporation.Microsoft SQL Server is a relational database management system (RDBMS).in their own words - but I reserved the rights to remove some bold claims like "the best", unless it is widely recognized.
vendorOracleMicrosoft
initial release19801989
latested version23ai2022 (16.x)We don't put a release date here as the software is patching frequently. So tracking it is not much useful.
supported platformsWindows, Linux, Solaris, HP-UX, AIX, z/OSWindows, Linuxsupported OS/CPU platforms
db-engines ranking13ranks from https://db-engines.com/en/ranking (06/25)
relational?

yes

Oracle also has an open source nosql database.
yesIs it a relational database? (1) Most database are actually with some extensions, for example, nested data types, graph support, etc, which we usually called "multi-model". (2) Some of them are product family, meaning they have more than one database. Here we focus on the main one but explain others when needed.
open source?nonomainly the engine code
licensecommercialcommercial
on-premise offeringyesyesif no means you can't buy "box" software from them
cloud offeringOracle Cloud and other cloud vendorsSQL Azure and other cloud vendors
technical dochttps://docs.oracle.com/en/database/https://learn.microsoft.com/en-us/sql/sql-server/
price: box software

$3,586 ~ $13,748 (2024)

2024: Licensing costs range from $3,586 for the Standard Edition to $13,748 for the Enterprise Edition (for two cores); the server and CAL model run $899 for the server plus $209 per user.

Data Types

FeatureOracleSQL ServerDefinition
int: 4-bytes int nameintint
char(n): max bytes20008000
BLOB: max size

(4B-1) * pages

Page size is defined by DB_BLOCK_SIZE in Oracle, which is ranging from 2K to 32K. This gives BLOB size from 8T to 128TB.
JSON: max size32MB
Literal: max size4000characters or numbers in SQL or PL/SQL
int: 1-bytes int nametinyint
int: 2-bytes int namesmallint
int: 8-bytes int namebigint
decimal: storage size5 to 17
decimal: rangefrom -10^38 + 1 through 10^38 - 1also called number, numeric in different systems

SQL

FeatureOracleSQL ServerDefinition
SQL: standard complaincehighhigh
max SQL length

undefined

The actual limit may depends on limits of the SUT, for example, its memory/system swap settings: Oracle internally must use a malloc'ed buffer to hold the SQL string.
64Kmaximal SQL statement length
PL: mainSQL + PL/SQLT-SQL (procedure support included)main programming lanage: most database suports SQL because SQL is a well established standard. However, each database would like to extend SQL more or less.
PL: other language supportyesyesPL lanaguage other than PL/SQL, like PL/Java, PL/Rust etc
SQL: query hintscompletecompleteif it allows use query hints to guide the optimizer
SQL: explicit lockingyesyesLocking is usually an internal matter - so does it allow explicit locking? What levels do they support?
Triggers?yesyesIf support triggers
Object-Relational?somesome
SP: max parameters2100
UDF: max parameters2100
SQL: max nested subqueries32Maximum levels of subqueries in a SQL statement
Triggers: scopetables, viewsWhat objects can have triggers
Triggers: typeAFTER, INSTEAD OFTypes of triggers supported
Group By: max number of expressions

sum of all group by expressions bytes < 8060

Because SQL Server internally implements hash aggregation (or sometimes sort aggregation) using worktables or hash buckets stored in pages with 8KB size limit (8060 bytes of usable data per page). The combined size of the group key expressions must fit into one internal row structure, which is restricted by SQL Server’s page architecture.
Extension MechanismSQL level

Storage and System

FeatureOracleSQL ServerDefinition
arch: server

C/S

Oracle has a family of databases, even with nonsql one.
C/SEmbedded or traditional C/S?
arch: run in browser?nonoIt also known as a client-side database, is a database that is stored and managed within a user's web browser, rather than on a remote server.
arch: clustering/HARAC, Data GuardAlways On Aaliablity Group, Failover clustering
arch: in-memory supportOracle Database In-Memory optionIn-memory OLTP (Hekaton)
arch: Multi-master support?yesnoif multi-master support?
arch: primary/read replica?yesyesif primary + mulitiple read replica supported
replication: sync/asyncbothbothCan commits wait or w/o wait for replicas to acknowledge
replication: WAL shippingyesyesUses write-ahead log (WAL) shipping for replication
sessions: max262143
tables: max number per databaseundefined

MAXINT

Tables, views, triggers etc are objects in SQL Server. They the same an integer range as object ID, so maximal number of tables is at most MAXINT if there is no other objects.
tables: max number of columns4096Max number of columns per table
contraints: max per columnundefined
partitions: methodsRange, List, Hash, Composite (sub-partitions supported).Range, List, Hash, Composite (nested partitioning supported since 2016).Supported partitioning strategies (range, list, hash, etc.).
partitions: global indexyesindex across partitions
constraints: max per database4,294,967,293
rows: max rows per tableundefinedundefinedThe actual number depends on storage etc
index: max allowed indexundefined

999

v14-17 allows 999, and 8 is allowed before that
Max number of indices allowed per table
index: max allowable size6400900 clustered index, 1700 non-clustered indexMax index record size (bytes). This constraint is mainly coming from the fact of the database page size: if we exclude blob data types, database engine usally do not allow a record expand more than one page.
index: max number of fields32v14-17 allows 32 and 16 is allowed before thatMax number of columns allowed in one index
partition: max allowed partitions1M-1

15000

In versions earlier than SQL Server 2012 (11.x), the number of partitions was limited to 1,000 by default. The reason it struggles to increase the limit is due to the challenges I listed.
Meta data challenge: 1M partitions just like 1M tables, system have to hold them in memory. Optimizer challenge: O(N) algorithm may lead to very long planning time if there are excessive partitions.
partition: max allowed key columns16
partition: max number of subpartitions1M-1
ACIDyes/yesyes/yesfor DML and DDL
ACID: max isolation level

SI

The Snapshot Isolation (SI) implemented by Oracle allows some anomalies, including write skew. But the SI does satisfies ANSI's serializable definition.

Serializable

SQL Server implements traditional two phase locking (2PL) locking for serializability. It also supports SI, similar to Oracle, it is not serializable.
ACID: max ANSI isolation levelSerializableSerializable
ACID: durabilityyesyes
Materialized View: support?yesyes
replication: quorum-based commityesMultiple synchronous replicas with quorum for commit

Benchmarking

FeatureOracleSQL ServerDefinition
any official TPC benchmarks?yesyesThe TPC benchmark includes a set of tests simulating real-world scenarios to evaluate database performance.
TPCC: most recent tpmC

8,552,523

System cost: 4,663,073 USD

1,207,982

System cost: 1,046,759 USD
TPCC: most recent submit date3/26/201311/14/2011
TPCC: most recent per thread perf835237749
TPCC: best tpmC

30,249,688

System cost: 30,528,863 USD

1807347

System cost: 879,563 USD
TPCC: best perf submit date12/2/20108/27/2010
TPCC: best perf per thread perf218828240

Tools

FeatureOracleSQL ServerDefinition
command line clientsqlcmdit means "sql client" for database supporting SQL. For embedded atabase, the client includes the server together.

Export Regulations

FeatureOracleSQL ServerDefinition
JurisdictionUSUSWhich country controls export
ECCN5D992.c5D992.cAn Export Control Classification Number (ECCN) is a five-character alphanumeric code used to categorize items on the Commerce Control List (CCL) for export control purposes. Most database may fall into 5D992.c category, "mass market encryption", which means it has some ordinary encryption related code, for example, the SSL connection code.
Eligible License Exception / CCATS

NLR

NLR essentially means that a commodity has been classified within the Commodity Classification Automated Tracking System and determined to not require a BIS export license for its export.

G065307

All big 3 (Oracle, DB2, SQL Server) shall be similar on this aspect.
A License Exception is an authorization that allows you to export or reexport items subject to the EAR without needing to obtain a specific export license, provided certain conditions are met. CCATS stands for Commodity Classification Automated Tracking System. The BIS assigns a CCATS number to products that it has classified under the Commerce Control List (CCL).
Encryption ComponentsTDE, SSLTDE, SSLCrypto functionality that triggers control

Internal

FeatureOracleSQL ServerDefinition
concurrency controlMVCCLocking + MVCC
MVCC: implemented?yesyesif implement MVCC for concurrency control
MVCC: rollback segmentyesyesif uses rollback segment (RS) to store old versions. Without RS, old versions and new versions are mixed stored, then the database engine has to find a way to efficiently drop the old versions at certain point.
Implementation languageCC++A DBMS may use mulitple programming languages, for example, supports its stored procedure. The major programming language used to implement the engine.

Internal - Optimizer

FeatureOracleSQL ServerDefinition
CBO?yesyesif it employees a cost based optimizer
frameworkSystem-RCascadesSystem-R is more like a dynamic programming, bottom up optimizer, while Cascades/Volcano gebaseerd optimizer is more like top-down optimizer.
query hints?completecompleteif it allows use query hints to guide the optimizer
join order searchMemo storage with a bunch of transformation rules like associative rule, commutative rule ecHow join order permutations are explored during plan generation.
stats: multi columnyesMulti-column stats may cause storage space bloat: for example, if one dimension has 100 buckets, then three dimensions will require 1M buckets - but reducing the total number of buckets will result in reduced accuracy.
plan guide?yesCan we use plan guide to correct the plan? This is a more systematic and accurate way to repair the plan than plan hints. Especially during system upgrades, if the plan becomes worse, we can use plan guide to force a query to use a previous plan.

Internal - Runtime

FeatureOracleSQL ServerDefinition
resource managementcompletecomplete: per query grantHow execution memory is allocated and limited.
support intra-parallel query?yesyesmeaning a single query can utilize multi hardware threads to run it
vectorizationyesyesSpeed ​​up OLAP queries using vectorized execution. A vectorized runtime exchange a bunch of rows between iterators, and these rows are physically sotre with column-oriented order.
iterator: join methodsall 3all 3Hash Join (HJ), Sort-Merge Join (MJ) and Nested loop Join (NLJ) are 3 major ones
spilling supportyes"spilling" refers to the process of writing temporary data or intermediate results of a query to disk when the available memory is exhausted. This is crucial for handling large datasets or complex queries that require more memory than available.
modelVolcano + push for parallel runThe operator scheduling model: pull-gebaseerd (Volcano), push etc.
adaptive execution (AQP)?

Adaptive joins, adaptive memory grants, etc

SQL Server has introduced these features since 2019, with name intelligent query processing (IQP).
Traditionally, after the optimizer determines the plan, the runtime must execute it completely without any room for adjustment, such as which of the two tables should be built. The adaptive method allows the runtime to make some adjustments based on the actual situation, and the optimizer must also prepare for this uncertainty, such as preparing an alternative plan.
Error: out-of-range and overflowabort the transactionTo maintain atomic requirement of ACID, database engine usually fail the statement and abort the transaction.

Internal - Storage Engine

FeatureOracleSQL ServerDefinition
Page Size2K-32K8K fixedThe physical disk block size for storage and I/O.
partition tablecompletecompletePartitioning capabilities for large tables.
partition table: prunningbothbothAbility to eliminate partitions at query compile time and runtime
ACID: durability mechanismWALWALHow is it implements durability. Database's classic way is write ahead logging (WAL).
Storage CompressionRow, page, and columnstore compression supported.
Row Overflow / Large Row HandlingRow within a page and large columns pointing to LOB storageHow rows larger than page size are handled. Usually a row must be within one page, but big columns can only save a pointer with the row and pointing to the actual storage. This is also why there is a limit of maximal columns per table.
Index: primary clusterClustered index is default (one per table).Whether physical rows are ordered by primary index.
Index: secondaryB+Tree, Bitmap, XML, Fulltext, Spatial, Columnstore.Supported index types beyond the primary key.
index: column store as primaryyesif column-store as primary storage supported
index: column store as secondaryyesif column-store as secondary index supported
index: pause and resumeyesPause and resume index building. This gives DBA flexibility to schedule index rebuild without having to wait it done.