---
title: "node-red-contrib-mssql-plus • FlowFuse Integrations"
description: "FlowFuse builds your first industrial solution with your team, proves it at one plant, then helps you roll it out to every plant, faster each time."
canonical_url: "https://flowfuse.com/integrations/node-red-contrib-mssql-plus/"
meta:
  "og:description": "FlowFuse builds your first industrial solution with your team, proves it at one plant, then helps you roll it out to every plant, faster each time."
  "og:title": "node-red-contrib-mssql-plus • FlowFuse Integrations"
---

> Index of every page on this site: [llms.txt](https://flowfuse.com/llms.txt)

# **node-red-contrib-mssql-plus**

FlowFuse Recommended

A node-red node to execute queries, stored procedures and bulk inserts in Microsoft SQL Server and Azure Databases SQL2000 \~ SQL2022

**Version:** 0.13.1**Weekly Downloads:** 5,296**Author:**Redconnect.io**Updated:** May 16, 2025

## **FlowFuse Recommended Node **

FlowFuse recommends this node as a well-maintained, dependable choice for production Node-RED projects.

# node-red-contrib-mssql-plus

A [Node-RED](http://nodered.org) node to execute queries, stored procedures and bulk inserts in Microsoft SQL Server and Azure Databases SQL2000 \~ SQL2022.

Importantly, this package comes with pre-built linux drivers for communicating with the Azure & MS SQL services (using TDS protocol), removing the need to set-up environment level MSSQL (or similar) drivers.

---

## Screen shot

![image](https://user-images.githubusercontent.com/44235289/87884584-14287900-ca07-11ea-8825-0030943f3c4a.png)

## Features include...

- Connect to multiple SQL Servers and Azure databases from SQL2000 \~ 2022
- Perform multiple queries in one go & get back multiple recordsets (depends on the queries sent)
- Supports Stored Procedure execute
- Supports Bulk Insert
- Built in examples (node-red hamburger menu → import → examples → node-red-contrib-mssql-plus)
  - TVP - A demo of calling a stored procedure and passing in a table valued parameters
  - BULK - A demo of inserting a large amount of data in bulk mode
- Use env vars in the config node for all fields (including credentials). e.g...
  - Server `{{{SQL_IP}}}`
  - Password `{{{SQL_PW}}}`
- Use mustache in your SQL queries including msg, flow and global context. e.g...
  - `SELECT TOP {{{payload.maxRows}}} * FROM [MyTable] WHERE Name = '{{{flow.name}}}' AND quantity <= {{{global.maxQty}}}`
  - View the final query (mustache rendered into values) in `msg.query` to understanding what happened to your {{{mustache}}} parameters
- Enter parameters in the UI or send parameters in via `msg`, `flow` or `global` variables for use in your SQL queries e.g...
  - `SELECT * FROM [MyTable] WHERE Name = @name AND quantity <= @maxQty`
  - View the final parameters (rendered with final values) in `msg.queryParams` that were used in the query to aid debugging
  - View output parameters values in `msg.queryParams` after the query has executed
- Choose between throwing an error to the catch node or outputting an error property in `msg.error`
- Additional properties are in the msg object (use a debug node with "complete msg object" set to see whats available)

## Install

### Easiest

Use the Manage Palette > Install option from the menu inside node-red

### Harder

Alternatively in your Node-RED user directory, typically \~/.node-red, run

```bash
npm install node-red-contrib-mssql-plus
```

## Usage

Please refer to the built in help in the info panel in node red.

## Sample flow

Demonstrating mustache rendering, input parameters, mutliple queries, print info...

- Payload: `{"count": 5, "age": 35}`
- Parameters
  - `name`, `varchar(20)`, `stephen`
  - `age`, `int`, `msg.payload.age`
- Query:

```
      PRINT @name
      SELECT TOP {{{payload.count}}} * 
      FROM testdb.dbo.[MyTable] WHERE Name = @name
      SELECT TOP {{{payload.count}}} * 
      FROM testdb.dbo.[MyTable] WHERE Age = @age
      PRINT 'complete'
```

- After Rendering Mustache:

```
      PRINT @name
      SELECT TOP 5 * 
      FROM testdb.dbo.[MyTable] WHERE Name = @name
      SELECT TOP 5 * 
      FROM testdb.dbo.[MyTable] WHERE Age = @age
      PRINT 'complete'
```

flow...

```json
[{"id":"61625aaf.479d84","type":"inject","z":"595a5dd5.a963a4","name":"{\"count\": 5, \"age\": 35}","topic":"","payload":"{\"count\": 5, \"age\": 35}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":220,"y":320,"wires":[["6e09980a.127878"]]},{"id":"6e09980a.127878","type":"MSSQL","z":"595a5dd5.a963a4","mssqlCN":"a51e405c.10f64","name":"","outField":"payload","returnType":"1","throwErrors":"0","query":"PRINT @name\n\nSELECT TOP {{{payload.count}}} * \nFROM testdb.dbo.[MyTable] WHERE Name = @name\n\nSELECT TOP {{{payload.count}}} * \nFROM testdb.dbo.[MyTable] WHERE Age = @age\n\nPRINT 'complete'","modeOpt":"","modeOptType":"query","queryOpt":"","queryOptType":"editor","paramsOpt":"","paramsOptType":"editor","params":[{"output":false,"name":"name","type":"VarChar(20)","valueType":"str","value":"stephen"},{"output":false,"name":"age","type":"int","valueType":"msg","value":"payload.age"}],"x":260,"y":380,"wires":[["babb6d0.5ae7e9"]]},{"id":"babb6d0.5ae7e9","type":"debug","z":"595a5dd5.a963a4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":270,"y":440,"wires":[]},{"id":"a51e405c.10f64","type":"MSSQL-CN","z":"","tdsVersion":"7_4","name":"My SQL Server","server":"192.168.1.38","port":"1433","encyption":false,"database":"testdb","useUTC":false,"connectTimeout":"15000","requestTimeout":"15000","cancelTimeout":"5000","pool":"5","parseJSON":false}]
```

## Other

This node based on [node-red-contrib-mssql](https://github.com/redconnect-io/node-red-contrib-mssql).

Thanks to [Redconnect.io](http://www.redconnect.io).

## **Installation **

Install in Node-RED via the [**palette manager**](https://flowfuse.com/docs/node-red/getting-started/library/#using-the-palette-manager).

![Node-RED Palette Manager dialog with the node selected and the Install button visible.](https://flowfuse.com/images/integrations/palette-manager-install.png)

## **Quick Stats**

Current Version**0.13.1**

Weekly Downloads**5,296**

First Published**Apr 24, 2018**

Last Updated**May 16, 2025**

## **GitHub Stats**

[Open Issues ![GitHub Issues](https://img.shields.io/github/issues/bestlong/node-red-contrib-mssql-plus.svg?style=flat-square)](https://github.com/bestlong/node-red-contrib-mssql-plus/issues) [ Stars ![GitHub Stars](https://img.shields.io/github/stars/bestlong/node-red-contrib-mssql-plus.svg?style=flat-square)](https://github.com/bestlong/node-red-contrib-mssql-plus/stargazers) [ Forks ![GitHub Forks](https://img.shields.io/github/forks/bestlong/node-red-contrib-mssql-plus.svg?style=flat-square)](https://github.com/bestlong/node-red-contrib-mssql-plus/network/members)

## **External Resources**

[View on NPM](https://www.npmjs.com/package/node-red-contrib-mssql-plus) [ View Repository](https://github.com/bestlong/node-red-contrib-mssql-plus)

## **Need Help?**

Get professional support for your Node-RED projects with FlowFuse.

[**Contact Us**](https://flowfuse.com/contact-us/)

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://flowfuse.com/#website","@type":"WebSite","description":"FlowFuse builds your first industrial solution with your team, proves it at one plant, then helps you roll it out to every plant, faster each time.","inLanguage":"en","name":"FlowFuse","url":"https://flowfuse.com/","alternateName":["FlowForge","Flow Fuse"],"publisher":{"@id":"https://flowfuse.com/#identity"}},{"@id":"https://flowfuse.com/integrations/node-red-contrib-mssql-plus/#webpage","@type":"WebPage","description":"FlowFuse builds your first industrial solution with your team, proves it at one plant, then helps you roll it out to every plant, faster each time.","name":"node-red-contrib-mssql-plus","url":"https://flowfuse.com/integrations/node-red-contrib-mssql-plus/","isPartOf":{"@id":"https://flowfuse.com/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://flowfuse.com/integrations/node-red-contrib-mssql-plus/"]}],"primaryImageOfPage":{"@id":"https://flowfuse.com/#logo"}},{"@id":"https://flowfuse.com/#identity","@type":"Organization","legalName":"FlowFuse Inc.","name":"FlowFuse","url":"https://flowfuse.com","alternateName":["FlowForge","Flow Fuse"],"logo":{"@id":"https://flowfuse.com/#logo"},"sameAs":["https://twitter.com/FlowFuseinc","https://github.com/FlowFuse","https://www.linkedin.com/company/flowfuse/","https://www.facebook.com/FlowFuse/","https://www.youtube.com/channel/UCbBzP8NZbv3WDtlt4UouA-g"]},{"@id":"https://flowfuse.com/#logo","@type":"ImageObject","caption":"FlowFuse","contentUrl":"https://flowfuse.com/handbook/images/logos/ff-logo--square--dark.png","inLanguage":"en","url":"https://flowfuse.com/handbook/images/logos/ff-logo--square--dark.png"}]}
```

## Sitemap

See the full [sitemap](https://flowfuse.com/sitemap.md) for all pages.
