A Node-RED contrib node for connecting to Microsoft SQL Server and Azure SQL databases. Current version 0.0.7 (stable) uses the mssql npm package and provides pre-built Linux TDS drivers, eliminating the need for system-level ODBC setup. It offers a visual node for query execution and connection management within Node-RED flows, with basic configuration for server, database, authentication, and TLS. Released under RedConnect, it targets Node-RED users requiring fast, driver-free SQL Server integration.
npm install node-red-contrib-mssqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to configure and use the MSSQL node in Node-RED, including server config and query execution.
Use a Linux environment (or Docker) for native support, or manually install unixODBC and set up drivers on other OSes.
Set the query mode to 'fixed' and provide the SQL query in the node configuration, or ensure msg.payload contains the query string.
Pin Node.js to v12 or use an alternative like node-red-contrib-mssql-plus.
Wrap SQL queries in TRY-CATCH or use Node-RED catch nodes to handle errors gracefully.
Start SQL Server service and ensure the port is reachable (telnet <host> 1433).
Verify the username/password. Ensure SQL Server has 'SQL Server and Windows Authentication mode' enabled (properties -> Security).
Provide a SQL query in msg.payload from an inject node or change query mode to 'fixed' and enter the query in the config.