# Database

Supported database engines:

| **Database engine**  | **Requirement**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| PostgreSQL           | Version: 13 to 17                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| Microsoft SQL Server | <p>Version:</p><p>• 2022 (MSSQL Server 16.0); 2019 (MSSQL Server 15.0); 2017 (MSSQL Server 14.0); 2016 (MSSQL Server 13.0).</p><p>• With bundled Microsoft JDBC driver.</p><p><strong>Notes</strong>:</p><p>• Express Edition is supported.</p><p>• Windows and SQL Server authentication are both supported.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| Oracle               | <p>Version: 23ai, 21C, 19C, XE Editions.</p><p><strong>Recommendation</strong>: Use the latest Oracle JDBC driver.</p><p><strong>Notes:</strong></p><p>• The driver ojdbc14.jar is not supported.</p><p>• Only the thin mode is supported, not OCI.</p><p>• Only MAX\_STRING\_SIZE=STANDARD parameter is supported, not EXTENDED.</p><p>• Must be configured to use a UTF8-family charset (see the NLS\_CHARACTERSET).</p><p>• The Oracle JDBC driver versions 12.1.0.1 and 12.1.0.2 have major bugs, and are not recommended for use with SonarQube Server (see more details).</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| H2                   | <p><strong>Recommendation</strong>: Use the H2 embedded database for non-production use cases:</p><p>• Development/Testing: H2 is ideal for quick prototypes, unit or integration tests, or CI/CD pipelines due to its lightweight setup.</p><p>• Trials: H2 allows users to try SonarQube without configuring a full database setup like PostgreSQL, Oracle, or MS SQL.</p><p><strong>Why avoid H2 in production</strong>:</p><p>• Scalability Limits: H2 cannot handle high transaction volumes or concurrent users.</p><p>• Data Risks: In-memory mode risks data loss; file-based mode lacks robust durability.</p><p>• Concurrency Issues: H2 struggles with heavy concurrent access, which could cause slowdowns or deadlocks.</p><p>• Limited Features: H2 lacks replication, high availability, advanced security, or robust backups.</p><p>• SQL Compatibility: H2 may differ from production databases, risking transition issues.</p><p>Use PostgreSQL, Oracle, or MS SQL for production to ensure reliability and scalability. Limit H2 to development, testing, or trials.</p> |

{% hint style="info" %}
We recommend that for production installation, the database used by SonarQube Server is hosted on a machine that is physically separate from the SonarQube Server host, with low latency between both hosts.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sonarsource.com/sonarqube-server/2025.2/setup-and-update/installation-requirements/database-requirements.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
