Using Microsoft SQL Server With Node-Red and MQTT

SQLServer

Node-Red and MQTT is awesome for real-time data, but what if you want to store and retrieve messages? Its rather straight forward to use Microsoft SQL Server as your database. MSSQL is free and easy to get started with.

Quick Start Instructions

  • Microsoft SQL Server 2016 Installation
    • Install MSSQL Server as the default instance
    • Use Mixed Mode Security
    • Be sure to add your windows user as an administrator during the installation process
    • Add a SQL User for Node-Red
    • Turn on Named Pipes and TCPIP communication using the SQL Server configuration tool
    • Create a database
    • Create a table
    • Add a unique ID column (optional)
      • ALTER TABLE [MQTTData] ADD id INT IDENTITY(1,1)

 

 

Using Microsoft SQL Server With Node-Red and MQTT

 

Installing MIcrosoft SQL Server for Node-Red MQTT Data

If you haven’t installed MSSQL before here is a quick video to get you going, I also show creating the security role and table to receive the MQTT data.

Leave a Comment