Running Orthanc on Microsoft SQL Server through ODBC

Orthanc can keep its index in SQL Server or Azure SQL through the ODBC plugin, but the generic layer, driver choices and image requirements shape the build. This page explains what to decide before you start.

On this page

Running Orthanc on SQL Server through ODBC for an existing Microsoft estate

Orthanc reaches Microsoft SQL Server and Azure SQL through its ODBC database plugin, which lets the server keep its index in a database engine your organization already runs. This fits a hospital or imaging provider that has standardized on SQL Server, already has DBAs who back up, patch and monitor it, and needs Orthanc's index to sit under the same audit, backup and access rules as its other clinical systems. The alternative is the PostgreSQL plugin, which the Orthanc scalability guidance recommends for large datasets. The choice between them is therefore about existing skills, platform standards and who will be on call, not about default performance.

The ODBC plugin is generic. It talks to any database that has an ODBC driver, so it does not carry the SQL Server-specific tuning that a dedicated plugin would. Expect to spend more effort on query behavior, locking and transaction settings, and to test them against your own archive size rather than assume parity with PostgreSQL. Confirm with the Orthanc Book plugin documentation which ODBC configuration options and driver versions the plugin expects, and ask the DBA team to review the isolation level and connection settings before go-live. Your Orthanc release and plugin versions must also match, so check the Orthanc NEWS file for the current release before you commit to a version.

Decide early whether SQL Server will hold only the index while files stay on disk or object storage, and whether the DBA team will own the database backups and restore tests. Those decisions drive most of the operational work, and they should appear in the written scope before any build starts. Ask any implementation partner to state which SQL Server and driver versions they have validated against Orthanc, how they will measure index performance on an archive of your size, and who is responsible for patching the database and the plugin after go-live.

Configuration options and when each fits

This table compares the five index back ends a team can use with Orthanc: SQL Server and Azure SQL through ODBC, the PostgreSQL and MySQL/MariaDB plugins, and the built-in SQLite index. Read each row for the setting where it fits, the main trade-off, and what to confirm before choosing it for an archive that will grow.

OptionWhen it fitsMain trade-offWhat to confirm
SQL Server through ODBCYour hospital or enterprise already runs SQL Server and your DBAs will operate the Orthanc index alongside other systemsThe ODBC plugin is generic, so it carries a performance cost compared with a database-specific plugin; scale and multi-instance behavior should be validated for your workloadDriver and SQL Server version pairing, and whether your Orthanc build includes the SQL Server driver
Azure SQL through ODBCYour organization hosts workloads on Azure and wants a managed database service for the Orthanc indexSame generic ODBC cost as SQL Server, plus a dependency on Azure networking and service configurationConnectivity from your Orthanc hosts to the Azure SQL endpoint, and the driver version tested against it
PostgreSQL pluginYou expect a large archive and want the database engine the Orthanc documentation recommends for large datasetsRequires running and skilling up a PostgreSQL service if your team does not already operate oneYour target PostgreSQL version and the plugin version that supports it
MySQL or MariaDB pluginYour team already runs MySQL or MariaDB and wants a supported database-specific back endLess of a default recommendation for large datasets in the Orthanc documentation than PostgreSQL; confirm version requirements for your platformPlatform requirements, including any MySQL 8 requirement on Windows
Built-in SQLite indexSmall, single-instance setups such as a pilot, a test environment or a low-volume clinic archiveThe Orthanc documentation says to replace it with an enterprise engine once the archive reaches several hundred thousand DICOM instancesYour expected instance count over the planned retention period
Multiple Orthanc instances on one databaseYou need horizontal scaling or high availability against a shared indexSupported by the PostgreSQL and MySQL/MariaDB plugins from Orthanc 1.9.2 with plugins 4.0; not a general claim for every ODBC setupWhether your chosen ODBC driver and SQL Server edition are validated for concurrent writers

How Orthanc, the ODBC driver and SQL Server fit together

The diagram starts with modalities, PACS peers and API clients reaching Orthanc on its DICOM and REST ports, inside the hospital network boundary. Orthanc core hands index work to the ODBC index plugin, which goes through the driver manager and the SQL Server driver to SQL Server or Azure SQL. DICOM files stay in a separate storage area that Orthanc manages on its own. Check that the database host, the driver version and the storage path are all reachable from the Orthanc container, and that the database connection crosses the boundary only where your network policy allows.

Modalities and clients reach Orthanc, which indexes studies in SQL Server through ODBC while files stay in a separate storage area.

Setup sequence for Orthanc on SQL Server

This sequence takes an Orthanc instance from version confirmation to a verified SQL Server-backed archive that can store, find and return a sample study. Each step ends with a check, so problems surface before real patient data arrives.

  1. Confirm the Orthanc version and image

    Your team picks the Orthanc core release and the packaging it will run from, either a Windows or Linux package or a Docker image. Confirm that the ODBC plugins you need ship in that build and that the release notes for your chosen version do not list changes that affect database back ends. Check the Orthanc NEWS file for the release you target, and record the exact version in your change ticket. The step is done when the version, the image tag or package name, and the plugin list are written down and agreed by the database and application owners.

  2. Provision SQL Server or Azure SQL access

    Your database team creates the target database on SQL Server or Azure SQL, then creates a dedicated login with only the permissions Orthanc needs to create and maintain its schema and to read and write index rows. Do not reuse an administrative account. Confirm network reachability from the Orthanc host to the database listener, and confirm whether the login uses SQL authentication or a managed identity or Windows authentication, since the plugin documentation determines which options are supported. The step is done when a connection test from the Orthanc host succeeds with the dedicated login and the database is empty.

  3. Install the supported ODBC driver

    Install the Microsoft ODBC driver for SQL Server version that the Orthanc ODBC plugin documentation lists as validated for your release, either directly on the host or inside the container image. Confirm the driver version against the plugin documentation rather than choosing the newest driver by default. Verify the installation with the driver listing tool on the host, or by running a shell inside the container, and confirm that the driver name matches the value you will use in the connection string. The step is done when the driver is listed under the expected name and a test query through it returns a result.

  4. Configure the ODBC connection and storage area

    Your platform engineer edits the Orthanc configuration to load the ODBC index plugin and, if the database will also hold files, the storage plugin, then sets the connection string with the driver name, server, database, login and encryption options. Choose the storage area location deliberately, because it determines where DICOM files are written. Confirm each configuration key and its accepted values in the plugin documentation for your version, including how the connection string is passed. Store the password in a secret manager or environment variable, not in a file committed to version control. The step is done when the configuration file validates and the values match the approved design.

  5. Start Orthanc and verify schema creation

    Start the Orthanc service or container and watch the startup log for plugin loading and database initialization messages. Confirm that the expected tables and schema objects appear in the target database using a read-only review by the database team. Check that Orthanc reports a healthy status through its system endpoint and that the database version recorded by Orthanc matches the release you planned. If startup fails, compare the error with the driver, connection string and login permissions before changing anything else. The step is done when Orthanc starts cleanly, the schema exists, and the database login has no unexpected administrative rights.

  6. Test store with a sample study

    Upload a sample study that contains no real patient data, through the REST API or a DICOM store from a test modality, and confirm that Orthanc returns the expected instance and study identifiers. Then check the database for the corresponding index rows and, if file storage is configured, confirm that the files appear in the storage area. Repeat with a second study to confirm that multiple writes behave correctly. The step is done when both studies are indexed, the file count matches the uploaded instance count, and the logs show no write errors.

  7. Test query and retrieve with a sample study

    Run a query by patient or study attributes through the REST API and through a DICOM C-FIND request from a test peer, then retrieve the sample study with C-MOVE or C-GET to a second destination. Confirm that the results match the stored metadata and that the retrieved instances are byte-for-byte consistent with the originals, using checksums where practical. Record response times for these operations as a baseline, since the ODBC path is generic and its performance should be measured on your own hardware and data volume. The step is done when queries return the expected results, retrieval completes without error, and the baseline measurements are saved with the change record.

Where the performance cost of genericity appears

A generic ODBC layer trades some speed for portability across database engines. The costs below sit between Orthanc's index logic and SQL Server, and they add up on large archives, so measure each one on your own data volumes before you commit to the design.

Query translation overhead

The ODBC plugin issues SQL that must be generic enough to run across the database engines it supports, so it cannot use every T-SQL construct or index hint a tuned dedicated layer would. Ask the team that owns the build which queries Orthanc runs most often during C-FIND and REST searches, then compare their plans on SQL Server with a representative index. Confirm the exact statements in the plugin version you plan to deploy.

Orthanc plugins

Round trips per operation

Each study, series or instance write can involve several statements, and every statement crosses the ODBC driver and the network to the SQL Server instance. The cost rises with latency between the Orthanc host and the database, so a database placed in another network zone or region can slow ingest more than the query itself. Measure ingest of a realistic batch of studies with the database on the same network segment as Orthanc.

Driver-specific behavior

Microsoft's ODBC Driver for SQL Server and other supported drivers differ in data type mapping, connection pooling, timeout handling and how they report errors. Two drivers that pass a smoke test can behave differently under concurrent load. Pin one driver version, record it in your change records, and repeat your test suite after each driver update rather than assuming the behavior carries over.

Locking and transaction handling

Orthanc expects its database to honor the isolation and locking behavior it was built around, and generic SQL can make lock escalation and deadlock patterns harder to predict on SQL Server. Under several Orthanc instances writing one database, these effects are most visible. Ask for the isolation level and transaction settings the build uses, and run a concurrent ingest and delete test that records deadlocks and blocked sessions.

Tuning limits against dedicated plugins

A generic layer exposes fewer engine-specific knobs, so some tuning options that a dedicated PostgreSQL or MySQL plugin offers may not have a direct SQL Server equivalent in the ODBC path. Before sizing hardware, list the settings you expect to tune, such as connection counts, transaction behavior and index maintenance, and confirm which ones the ODBC plugin exposes. Compare that list with the dedicated plugin options when you weigh the two paths.

Questions buyers ask about Orthanc on SQL Server

Should we choose SQL Server or PostgreSQL for Orthanc?

Choose the database that your organization already operates, backs up and staffs well, because the Orthanc index is only one part of the archive. The Orthanc scalability guidance recommends the PostgreSQL plugin for large datasets, and it is the plugin with the most direct path for production scale. The ODBC route is the right choice when a SQL Server estate, its DBA practices and its security tooling are a firm requirement. Ask Orthanc Team or your own DBAs to confirm which database plugin and driver versions are validated for your Orthanc release before you commit.

What does the team need to run Orthanc on SQL Server?

You need someone who can administer SQL Server (login management, backups, index maintenance and patching), someone who can manage Linux or Windows hosts with the ODBC driver installed, and someone who owns the Orthanc configuration and upgrades. Network reviewers will also need to confirm TLS settings between Orthanc and the database. Plan for on-call coverage for the archive, since a database outage stops ingest and retrieval. Confirm these roles with your own staff before you scope the work.

What drives the cost of an Orthanc SQL Server engagement?

The main cost drivers are the number of environments (test, staging and production), the hosting model, the archive size that must be migrated or validated, the number of integrations with viewers and modalities, and the security review your organization requires. Costs are usually split between one-time work (design, build, migration rehearsal and validation) and recurring work (patching, upgrades and support). A fixed-scope quote from DeployOpen lists deliverables, environments, test cases and the handover material in writing before work starts. Ask for each of those items to be named separately so you can compare quotes.

Can our own team build Orthanc on SQL Server without a partner?

Yes, if your team has Orthanc, SQL Server and Linux or Windows administration experience and time for validation. The work is well defined, but it has many failure points: driver compatibility, connection and locking settings, backup and restore testing, and the DICOM workflows that depend on the index. A partner is most useful when the team lacks one of these skills, has a tight deadline, or needs an independent review of the design. Orthanc Team also offers its own deployment and configuration services, so compare those with an engagement from DeployOpen before deciding.

How long does validation take for different archive sizes?

Validation time grows with archive size because a migration rehearsal, index checks and restore tests must process real data volumes. No duration figure is supplied here, so ask for a timeline based on your own archive: number of studies and instances, total storage size, and the DICOM workflows you need to verify. The Orthanc Book reports production hospital deployments holding more than 65 TB of data, 340,000 studies and around 150 million instances, which shows the scale that the platform has reached, but it does not give a time for your validation. Ask for the test plan and the data sample to be agreed in writing.

What changes when we upgrade Orthanc or the ODBC driver?

Each Orthanc release can change the database schema, plugin behavior and supported driver versions, so upgrades must be tested against the same SQL Server version and driver you run in production. Recent releases include 1.12.10 on 2025-11-26, 1.12.11 on 2026-04-14 and 1.13.0 on 2026-08-15, and 1.13.0 includes a rewrite of storage-area access and DICOM parsing and transcoding. Read the release notes before each upgrade, rehearse on a copy of the archive, and keep a tested rollback path. The upgrade plan should also cover driver updates and SQL Server patching.

How do Orthanc Team support and a DeployOpen engagement fit together?

Orthanc Team sells deployment, configuration and development services for Orthanc and offers pre-paid dedicated support hours valid for 12 months, quoted on request. DeployOpen is a separate company that plans, implements, hardens, backs up, upgrades and documents open-source platforms inside your own infrastructure, and it runs security testing and compliance readiness work. The two can be used together, but the scope and responsibility for each task should be written down so nobody assumes that the other party owns a fix. Ask each provider to state what it covers, its response terms and who holds the configuration documentation.

Keeping the SQL Server back end current after go-live

Upgrades on a SQL Server back end involve four moving parts that must be tested together: the Orthanc core, the ODBC plugin, the ODBC driver installed in the Orthanc container or host, and the SQL Server version itself. Changing one of them without re-testing the other three is the most common way to break a working archive. Before any upgrade, record the exact Orthanc version, plugin build, driver version and SQL Server build currently in production, and rehearse the change on a copy of the database and a representative sample of storage. Confirm the driver and server combinations you rely on against the vendor's support matrices, since this page does not assume any particular combination is validated.

Plugin versions also decide which scalability features you can use. Orthanc's multi-instance support, where several instances read and write the same database, depends on the database plugin version matching the core release line, and the Orthanc Book states that multiple instances need Orthanc 1.9.2 or later with the PostgreSQL and MySQL plugins at version 4.0. Confirm with the ODBC plugin documentation whether the same multi-instance guarantees apply to your plugin build before you add a second node or a load balancer. Also check the release notes for each core version, because a change such as the storage and parsing rewrite in Orthanc 1.13.0 can alter caching and memory behavior that your sizing was based on.

Backups are two separate jobs and need separate owners, schedules and restore tests. The SQL Server database holds the index, and the file storage area holds the DICOM files; a database backup alone cannot rebuild the files, and a file copy alone cannot rebuild the index in a consistent state. Test a restore of both into a staging environment, then open a sample of studies and confirm the instance counts and file checksums match what the index expects. Ask your SQL Server team to define the recovery model and backup chain for the Orthanc database, and document how the two backups are aligned in time so that a restore does not produce orphaned records or missing files.

How DeployOpen scopes and delivers an Orthanc SQL Server build

DeployOpen plans and delivers Orthanc on Microsoft SQL Server through ODBC inside infrastructure you control, starting from a written scope that names the driver, the Orthanc build and the storage layout. The work is delivered as a fixed-scope engagement, with the database, image and test choices documented so your team can review them.

How we scope

  • Confirm whether the target is on-premises SQL Server or Azure SQL, and which ODBC driver version your environment supports.
  • Agree the Orthanc version and whether the full Docker image or a Windows or Linux package is required for the SQL Server driver.
  • Record expected instance counts, query patterns and performance targets in the written scope before any build begins.

How we build

  • Install and configure the ODBC index plugin against a database account with least-privilege permissions agreed with your DBAs.
  • Set up the storage area, network access and reverse proxy so only approved clients reach the Orthanc REST interface.
  • Load representative test studies and measure ingest, search and retrieve behavior before the configuration is accepted.

How we hand over

  • Deliver configuration files, deployment steps, driver and image versions, and the list of settings that were changed from defaults.
  • Document the database backup and restore procedure, including how the Orthanc index and file store are kept consistent.
  • Walk your operations and DBA teams through the runbook, upgrade considerations and the known limits of the ODBC generic layer.

How we support

  • Offer ongoing support, upgrades and continuous testing as a retainer after handover, with the scope agreed in writing.
  • Plan Orthanc core and plugin upgrades with a retest of the SQL Server path before each change goes to production.
  • Re-run performance and security checks when the database version, driver or Orthanc release changes.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.