---
title: Microsoft SQL Server SSL Integration Guide
slug: litmusedge-v1/how-to-guides/integration-guides/microsoft-sql-ssl-server
description: Learn how to set up the Microsoft SQL Server with SSL connector. 
docTags: 
createdAt: 2024-01-16T19:11:48.555Z
---

Review the following guide for setting up an integration between Litmus Edge and a Microsoft SQL Server database using SSL authentication.&#x20;

# Before You Begin

You will need the following:

- Access to a Microsoft SQL Server database that uses SSL authentication.&#x20;
- The CA Certificate associated with the database.&#x20;

Refer to the following links to learn more:

- [Microsoft SQL Server - Ubuntu based images](https://hub.docker.com/_/microsoft-mssql-server)
- [sqlcmd Utility](https://learn.microsoft.com/en-us/sql/tools/sqlcmd-utility?view=sql-server-ver15)
- [Deploy and connect to SQL Server Docker containers](https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-docker-container-deployment?view=sql-server-ver15\&pivots=cs1-bash)
- [Certificate requirements for SQL Server](https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/certificate-requirements?view=sql-server-ver16)
- [Configure SQL Server Database Engine for encrypting connections](https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/configure-sql-server-encryption?view=sql-server-ver16)

# Step 1: Add Device

Follow the steps to [Connect a Device](docId:3eyAfPpweuVmBLCEy17sq). The device will be used to store tags that will be eventually used to create outbound topics in the connector. Make sure to select the **Enable Data Store** checkbox.&#x20;

# Step 2: Add Tags

After connecting the device in Litmus Edge, you can [Add Tags](docId:8sE7z3PmRfwL1nmzcwaLX) to the device. Create tags that you want to use to create outbound topics for the connector.&#x20;

# Step 3: Add the Microsoft SQL Server SSL Connector

Follow the steps to [Add a Connector](docId\:b7eMDh8AO2-NOqDHwPD7Y) and select the **DB - Microsoft SQL Server SSL&#x20;**&#x70;rovider.&#x20;

Configure the following parameters.&#x20;

- **Name**: Enter a name for the connector.&#x20;
- **Hostname**: Enter the IP address to access the database. &#x20;
- **Port**: The port to access the database. The default value is **1433**.&#x20;
- **SSL Mode**: Select the SSL mode: **disable**, **true**, or **false**.&#x20;
- **CA Certificate**: Paste the CA certificate. For Litmus Edge version 3.11.0 and later, you have the option to upload the certificate.&#x20;
- **Username**: Enter the username to access the database.&#x20;
- **Password**: Enter the password associated with the username.&#x20;
- **Database**: Enter the database name.&#x20;
- **Table**: Enter the table that will be receiving the data. If you are sending data to an existing table, use the corresponding name.&#x20;
- **Show Mapping**: If you want to send data to a custom table, select this check box and unselect *Create table*. See [Work with Tables in SQL Connectors (Create Table and Show Mapping)](docId\:Yj_sKBPP9J_TH3_qvC1Tm) to learn more. To add key/value pairs for the custom table, see [Configure Key/Value Pairs](docId\:Yj_sKBPP9J_TH3_qvC1Tm).&#x20;
- **Create table**: If you want to send data to an existing table in the default format, or you want to create a new table in the default format, select this check box and unselect *Show Mapping*. See [Work with Tables in SQL Connectors (Create Table and Show Mapping)](docId\:Yj_sKBPP9J_TH3_qvC1Tm) to learn more.&#x20;
- **Commit timeout**: Enter the transaction commit timeout in (ms).
- **Max transaction size**: Enter the maximum number of messages before a transaction is committed, regardless of timeout parameter.&#x20;
- **Bulk insert count**: (Available for Litmus Edge version 3.11.1 and later) To enable this option, enter the number of messages to group together and send as one bulk insert statement. Enabling this option can improve how quickly data is processed when dealing with high volumes of tags.&#x20;
- **Throttling limit**: The maximum number of messages per second to be processed. The default value is zero, which means that there is no limit.&#x20;
- **Persistent storage**: When enabled, this will cause messages to undergo a store-and-forward procedure. Messages will be stored within Litmus Edge when cloud providers are online. &#x20;
- **Queue Mode**: Select the queue mode as **lifo&#x20;**(last in first out) or **fifo&#x20;**(first in first out). Selecting **lifo&#x20;**&#x6D;eans that the last data entry is processed first, and selecting **fifo&#x20;**&#x6D;eans the first data entry is processed first.&#x20;

# Step 4: Enable the Connector

After adding the connector, click the toggle in the connector tile to enable it.&#x20;

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/5QW7Ca4yxLS_s1Hj4Wwep_mssqlssl.png" size="60" width="388" height="358" position="center" showCaption="false"}

If you see a *Failed&#x20;*&#x73;tatus, you can review the [Connector Logs](docId:5hctoRLhgaX3Ikh_lvi0A) and relevant error messages.&#x20;

# Step 5: Create Topics for Connector

You will now need to import the tags created in Step 2 as topics for the Microsoft connector. The topics will be created as outbound topics.&#x20;

**To create outbound topics:**

1. Click the connector tile.
   The connector *Dashboard&#x20;*&#x61;ppears.&#x20;
2. Click the **Topics&#x20;**&#x74;ab.&#x20;
3. Click the **Import from DeviceHub** tags icon.&#x20;
   The *DeviceHub Import&#x20;*&#x64;ialog box appears.

![](https://api.archbee.com/api/optimize/xSuIWwMa6RnsbeD5Kdqd7-zaOGMDYbPZWYALvLBgotp-20250606-203859.png)

After adding all required topics, navigate to the Integration overview page and ensure the connector is not disabled and still shows a CONNECTED status.&#x20;

# Step 6: Enable Topics

To enable the topics, return to the *Topics* tab and click the **Enable all topics** icon.&#x20;

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/Iq7BWYqGWueu4US73iBl3_image.png" size="80" width="1220" height="330" caption="Enable all topics icon" position="center" showCaption="true"}

# Step 7: Create Flow

You can now create a flow in Litmus Edge to verify the connection.&#x20;

**To create the flow:&#x20;**

1. In Litmus Edge, navigate to **Flows Manager**.&#x20;
2. Click the **Go To Flow Definition** icon for a selected **Flows Manager**.&#x20;
   Th&#x65;*&#x20;Flow canvas&#x20;*&#x6F;pens in a new browser tab.&#x20;
   ::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/6PlxhptXn4xZ_4ZdrIAuf_gotoflowdefinition.png" size="80" width="944" height="366" caption="Go To Flow Definition icon" position="center" showCaption="true"}
3. From the node palette, drag the **DataHub Subscribe** node (DataConnector section) to the canvas.
   ::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/j2Sz7jq3aibQ0V56l3Cy8_datahubsubscribenode.png" size="80" width="1055" height="690" caption="DataHub Subscribe node" position="center" showCaption="true"}
4. Drag the **Debug&#xA0;**&#x6E;ode to the canvas and connect the two nodes.
5. Double click the **DataHub Subscribe** node.&#x20;
   The *Edit DataHub Subscribe Node&#x20;*&#x64;ialog box appears.
6. In the **Topic&#x20;**&#x66;ield, paste the topic name copied in Step 5.
7. Enter `tag imported to mssql db` in the **Name&#xA0;**&#x66;ield.
8. If needed, configure the *Datahub Subscribe* connection. See the *Step 3: Configure Connector Nodes* section in [Create a Flow](docId:7x0n7C4DxswTD61vpIBza) to learn more.&#x20;
9. Click **Done**.&#x20;
10. Click **Deploy**.&#x20;
11. Expan&#x64;**&#xA0;**&#x74;he message window beneath the flow and click the **Debug&#xA0;**&#x69;con. Verify that messages are displaying.&#x20;
    ::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/gPJk6NsW3loIyEUdOJWuM_debugicon.png" size="80" width="885" height="365" caption="Debug node messages" position="center" showCaption="true"}

# Step 9: Make Microsoft SQL Queries

You can now verify that you can view data in the Microsoft SQL (MSSQL) database.&#x20;

Update credentials, the database name, and the table as needed for your specific configurations

**To make Microsoft SQL queries:**

1. From the MSSQL terminal window, enter `/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P <sa password>`**&#xA0;**, and then press **ENTER**.
2. Enter `select DB_NAME (),` and then press **ENTER**.
3. Enter `go`, and then press **ENTER**.
   The master database name appears.
4. Enter `select name from sys.databases`, and then press ENTER.
5. Enter `go`, and then press **ENTER**.
   All database names appear.
6. Enter `use master`, and then press **ENTER**
7. Enter `go`, and then press **ENTER**.****
   Changed database context to *master&#x20;*&#x61;ppears.
8. Enter `select * from information_schema.tables;` and press **ENTER**.
9. Enter `go`, and then press **ENTER**.
   The *Table Catalog* for the master database appears.
10. Enter `select * from test_table` (or the table name you configured in Step 4), and then press **ENTER**.
11. Enter `go`, and then press **ENTER**.
    If you selected *Create table* in Step 3, identification messages from the topic appear, including the *deviceId&#x20;*&#x61;nd *registerId&#x20;*&#x61;t the end of each message.
    If you selected *Show Mapping* in Step 3, the custom mapping you configured appears.&#x20;

