How-To Guides
Integration Guides
Microsoft SQL Server SSL Integration Guide
10min
review the following guide for setting up an integration between litmus edge and a microsoft sql server database using ssl authentication before you begin you will need the following access to a microsoft sql server database that uses ssl authentication the ca certificate associated with the database refer to the following links to learn more microsoft sql server ubuntu based images sqlcmd utility deploy and connect to sql server docker containers certificate requirements for sql server configure sql server database engine for encrypting connections 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 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 step 3 add the microsoft sql server ssl connector follow the steps to add a connector docid\ ogw7fkqbwidbabn4wl5rr and select the db microsoft sql server ssl provider configure the following parameters name enter a name for the connector hostname enter the ip address to access the database port the port to access the database the default value is 1433 ssl mode select the ssl mode disable , true , or false ca certificate paste or upload the ca certificate username enter the username to access the database password enter the password associated with the username database enter the database name table enter the table that will be receiving the data if you are sending data to an existing table, use the corresponding name 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\ g834 z 0m5fp7j6p6pzwo to learn more to add key/value pairs for the custom table, see work with tables in sql connectors (create table and show mapping) docid\ g834 z 0m5fp7j6p6pzwo 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\ g834 z 0m5fp7j6p6pzwo to learn more 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 bulk insert count 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 throttling limit the maximum number of messages per second to be processed the default value is zero, which means that there is no limit 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 queue mode select the queue mode as lifo (last in first out) or fifo (first in first out) selecting lifo means that the last data entry is processed first, and selecting fifo means the first data entry is processed first step 4 enable the connector after adding the connector, click the toggle in the connector tile to enable it if you see a failed status, you can review the manage connectors docid 3u7jzldinehy8shvifd d and relevant error messages 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 to create outbound topics click the connector tile the connector dashboard appears click the topics tab click the import from devicehub tags icon the devicehub import dialog box appears after adding all required topics, navigate to the integration overview page and ensure the connector is not disabled and still shows a connected status step 6 enable topics to enable the topics, return to the topics tab and click the enable all topics icon step 7 create flow you can now create a flow in litmus edge to verify the connection to create the flow in litmus edge, navigate to flows manager click the go to flow definition icon for a selected flows manager the flow canvas opens in a new browser tab from the node palette, drag the datahub subscribe node (dataconnector section) to the canvas drag the debug node to the canvas and connect the two nodes double click the datahub subscribe node the edit datahub subscribe node dialog box appears in the topic field, paste the topic name copied in step 5 enter tag imported to mssql db in the name field if needed, configure the datahub subscribe connection see the step 3 configure connector nodes section in create a flow docid\ veyyte7xdcangglzbqya0 to learn more click done click deploy expand the message window beneath the flow and click the debug icon verify that messages are displaying step 9 make microsoft sql queries you can now verify that you can view data in the microsoft sql (mssql) database update credentials, the database name, and the table as needed for your specific configurations to make microsoft sql queries from the mssql terminal window, enter /opt/mssql tools/bin/sqlcmd s localhost u sa p \<sa password> , and then press enter enter select db name (), and then press enter enter go , and then press enter the master database name appears enter select name from sys databases , and then press enter enter go , and then press enter all database names appear enter use master , and then press enter enter go , and then press enter changed database context to master appears enter select from information schema tables; and press enter enter go , and then press enter the table catalog for the master database appears enter select from test table (or the table name you configured in step 4), and then press enter enter go , and then press enter if you selected create table in step 3, identification messages from the topic appear, including the deviceid and registerid at the end of each message if you selected show mapping in step 3, the custom mapping you configured appears