---
title: "MSSQL"
slug: "mssql"
updated: 2026-07-28T15:53:33Z
published: 2026-07-28T15:53:33Z
canonical: "help.hyperscience.ai/mssql"
---
> ## Documentation Index
> Fetch the complete documentation index at: https://help.hyperscience.ai/llms.txt
> Use this file to discover all available pages before exploring further.
# MSSQL
Hyperscience supports the following implementations of MSSQL:
- **On premise**
- For a list of supported MSSQL versions, see [Infrastructure Requirements (Production)](/deployment/docs/infrastructure-requirements).
- **Azure SQL Managed Instance**
- Supported in Hyperscience v28 and later
- To learn more, see Microsoft’s [What is Azure SQL Managed Instance?](https://docs.microsoft.com/en-us/azure/azure-sql/managed-instance/sql-managed-instance-paas-overview)
- For information on how to create a managed instance, see Microsoft’s [Quickstart: Create an Azure SQL Managed Instance](https://docs.microsoft.com/en-us/azure/azure-sql/managed-instance/instance-create-quickstart).
- Because Azure SQL Database does not support Servicer Broker, Hyperscience **does not support Azure SQL Database**.
## Configuring MSSQL
To configure MSSQL for your Hyperscience instance, follow these steps.
1. Create your database with case-sensitive collation.
Microsoft SQL Server defaults to case-insensitive collation. Hyperscience requires the MSSQL database (*FORMS_DB_NAME* in the example configuration below) to be created with case-sensitive collation.
```sql
CREATE DATABASE [] COLLATE SQL_Latin1_General_CP1_CS_AS
```
2. Configure the isolation level.
The isolation level of the database should be set to *READ_COMMITTED_SNAPSHOT* with the following command:
```sql
ALTER DATABASE [] SET READ_COMMITTED_SNAPSHOT ON WITH ROLLBACK IMMEDIATE
```
3. Enable Service Broker.
> [!NOTE]
> **Does not apply to Azure SQL Managed Instance**
>
> If you are using Azure SQL Managed Instance, Service Broker is enabled by default and cannot be disabled.
If you are using MSSQL on premise, enable Service Broker with the following command:
```sql
ALTER DATABASE [] SET ENABLE_BROKER WITH ROLLBACK IMMEDIATE
```
To automatically apply the *ALTER* statement for both the isolation level and Service Broker, add the following to the “.env” file:
```sql
SQLSERVER_SKIP_DB_INITIALIZATION=false
```
However, please note that doing so may cause deployment failure in some cases.
4. Create a SQL Server user for Hyperscience.
You can connect Hyperscience to SQL Server in one of the following ways:
- Using SQL Server login credentials.
- In v32.0.4 and later, using an Azure Active Directory (Azure AD) domain user and password to connect to Azure SQL Server Managed Instance service.
- In v32.0.4 and later, using an Azure Directory Federation Services (ADFS) domain user and password to connect to Azure SQL Server Managed Instance service.
The user you create for Hyperscience must have the following permissions:
- *ALTER DATABASE* permissions
- *VIEW SERVER STATE* permissions
- *ALTER ANY CONNECTION* permissions
Adding the *VIEW SERVER STATE* and *ALTER ANY CONNECTION* permissions allows us to monitor and periodically clean up any unnecessary database sessions that may be preventing submissions in Hyperscience from processing in a timely manner.
5. Configure SQLSERVER_OPTIONS_EXTRA_PARAMS parameter.
The *SQLSERVER_OPTIONS_EXTRA_PARAMS* parameter allows you to configure the following options:
- Enable Always On availability groups:
```plaintext
MultiSubnetFailover=Yes
```
- Use a domain user for authentication:
```plaintext
Authentication=ActiveDirectoryPassword
```
- [v41 and earlier] Configure TLS
```plaintext
Encrypt=Yes
```
- [v42 and later] Disable TLS
```plaintext
Encrypt=No
```
- Add certificate information:
```plaintext
TrustServerCertificate=Yes
```
You need to add the *SQLSERVER_OPTIONS_EXTRA_PARAMS* parameter to the “.env” file. You can delimit multiple options by using a semicolon. The options’ order does not matter.
Here is an example of defining multiple options:
```plaintext
SQLSERVER_OPTIONS_EXTRA_PARAMS=Authentication=ActiveDirectoryPassword;MultiSubnetFailover=Yes
```
In the sections below, you can find more information about each of the above-mentioned options.
#### a. Enable Always On availability groups.
If using Always On availability groups, ensure Service Broker is enabled, and add the *MultiSubnetFailover=Yes* option to the *SQLSERVER_OPTIONS_EXTRA_PARAMS* parameter.
Here is an example of adding the *MultiSubnetFailover=Yes* option to the *SQLSERVER_OPTIONS_EXTRA_PARAMS* parameter:
```plaintext
SQLSERVER_OPTIONS_EXTRA_PARAMS=MultiSubnetFailover=Yes
```
#### b. Use a domain user for authentication.
To use a domain user for authentication, you need to add the *Authentication=ActiveDirectoryPassword* option to the *SQLSERVER_OPTIONS_EXTRA_PARAMS* parameter.
Here is an example of adding the *Authentication=ActiveDirectoryPassword* option to the *SQLSERVER_OPTIONS_EXTRA_PARAMS* parameter:
```plaintext
SQLSERVER_OPTIONS_EXTRA_PARAMS=Authentication=ActiveDirectoryPassword
```
Azure AD users are created and managed directly within the Azure Active Directory cloud service, whereas ADFS federates an on-premise Active Directory instance to Azure Active Directory.
> [!NOTE]
> Note that Azure Active Directory federation through PingFederate is not supported. To learn more about PingFederate, see Microsoft’s [Configuring federation with PingFederate](https://docs.microsoft.com/en-us/azure/active-directory/hybrid/how-to-connect-install-custom#configuring-federation-with-pingfederate).
#### c. [v41 and earlier] Configure TLS.
In order to enable TLS in v41 and earlier, TLS must be configured for your server. You also need to add the *Encrypt=Yes* option to the *SQLSERVER_OPTIONS_EXTRA_PARAMS* parameter.
Here is an example of adding the *Encrypt=Yes* option to the *SQLSERVER_OPTIONS_EXTRA_PARAMS* parameter:
```plaintext
SQLSERVER_OPTIONS_EXTRA_PARAMS=Encrypt=Yes
```
#### d. [v42 and later] Disable TLS.
In v42 and later, the database connection uses TLS encryption by default. This change is due to the upgrade of the ODBC driver to v18. For more information, see Microsoft’s [ODBC DSN and Connection String Keywords and Attributes](https://learn.microsoft.com/en-us/sql/connect/odbc/dsn-connection-string-attribute?view=sql-server-ver16#encrypt).
To disable TLS, do **one** of the following:
- Have a server certificate signed and issued by a trusted Certificate Authority (CA) in your database server.
- Have a self-signed server certificate in your database server and set the *TrustServerCertificate* parameter in *SQLSERVER_OPTIONS_EXTRA_PARAMS* to *Yes* (see [e. Add certificate information](/deployment/docs/mssql#e-add-certificate-information)). (Not recommended due to reduced security)
- Set the *Encrypt* parameter in *SQLSERVER_OPTIONS_EXTRA_PARAMS* to *No* (Not recommended due to reduced security):
```plaintext
SQLSERVER_OPTIONS_EXTRA_PARAMS=Encrypt=No
```
#### e. Add certificate information.
If you're using a self-signed certificate, you can configure your authentication process to trust the certificate without validating it. To do so, add the *TrustServerCertificate=Yes* option to the *SQLSERVER_OPTIONS_EXTRA_PARAMS* parameter.
Here is an example of adding the *TrustServerCertificate=Yes* option to the *SQLSERVER_OPTIONS_EXTRA_PARAMS* parameter:
```plaintext
SQLSERVER_OPTIONS_EXTRA_PARAMS=Encrypt=Yes;TrustServerCertificate=Yes
```
6. Add MSSQL variables.
The following variables should also be included in the “.env” file:
```bash
FORMS_DB_TYPE=mssql
FORMS_DB_NAME=
FORMS_DB_USER= <>
FORMS_DB_PASS=
FORMS_DB_HOST=
FORMS_DB_PORT=
```
> [!NOTE]
> In v32 and later, you can choose to store your system-level credentials in a secrets manager. To learn more about our secrets-management integration, see [Secrets Management](/deployment/docs/secrets-management).
Proactively set up transaction logs and monitor the amount of disk space the logs are using. If you've configured your SQL Server's recovery model with *recovery_model=full* (see Microsoft's [Recovery Models (SQL Server)](https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/recovery-models-sql-server?view=sql-server-ver15)), the size of the transaction logs can grow indefinitely unless you take action to periodically shrink them. To learn more about shrinking the log file's size, see Microsoft's [Manage the size of the transaction log file](https://docs.microsoft.com/en-us/sql/relational-databases/logs/manage-the-size-of-the-transaction-log-file?view=sql-server-ver15).