{"id":41615,"library":"node-red-contrib-mssql-plus","title":"node-red-contrib-mssql-plus","description":"Node-RED node for executing queries, stored procedures, and bulk inserts on Microsoft SQL Server and Azure SQL databases (SQL2000–SQL2022). Current stable version is 0.13.1. Released on npm with no fixed cadence; maintained as active. Key differentiator: includes pre-built Linux TDS drivers so no ODBC driver setup is needed. Supports environment variable interpolation, Mustache templates in queries, input and output parameters, multiple result sets, and error handling via catch node or msg.error. Requires Node-RED and Node.js >=18.","status":"active","version":"0.13.1","language":"javascript","source_language":"en","source_url":"https://github.com/bestlong/node-red-contrib-mssql-plus","tags":["javascript","node-red","odbc","unixodbc","mssql","sql","Microsoft","database","sql-server"],"install":[{"cmd":"npm install node-red-contrib-mssql-plus","lang":"bash","label":"npm"},{"cmd":"yarn add node-red-contrib-mssql-plus","lang":"bash","label":"yarn"},{"cmd":"pnpm add node-red-contrib-mssql-plus","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"This is a Node-RED node; it only runs inside a Node-RED instance.","package":"node-red","optional":false},{"reason":"Core database driver for SQL Server connections.","package":"mssql","optional":false},{"reason":"TDS protocol implementation used by mssql; may be included as a dependency of mssql.","package":"tedious","optional":true}],"imports":[{"note":"This package provides Node-RED nodes, not programmable exports. Use within Node-RED flows.","wrong":"Using 'node-red-contrib-mssql-plus' as a regular npm module (it is a Node-RED plugin, not a JS library).","symbol":"MSSQL node (Node-RED)","correct":"Drag 'MSSQL' node from palette or import flow JSON with type: 'MSSQL'"},{"note":"Config nodes can use environment variables via triple-moustache syntax, e.g., {{{SQL_IP}}}.","wrong":"Directly hardcoding credentials in flow nodes without using config node.","symbol":"Configuration node (MSSQL config)","correct":"Add a 'MSSQL' config node (type: 'MSSQL config') with server, database, auth details."},{"note":"Parameters can come from msg, flow, or global context, as well as static values.","wrong":"Using string interpolation inside SQL (risks SQL injection). Use @paramName placeholders.","symbol":"Query parameters","correct":"Define parameters in the node's 'Parameters' table or via msg.params."}],"quickstart":{"code":"// Example Node-RED flow JSON for a simple query inject -> MSSQL -> debug\n[{\"id\":\"1\",\"type\":\"inject\",\"name\":\"trigger\",\"payload\":\"\",\"repeat\":\"\",\"once\":false,\"x\":100,\"y\":100,\"wires\":[[\"2\"]]},{\"id\":\"2\",\"type\":\"MSSQL\",\"name\":\"query\",\"mssqlCN\":\"3\",\"outField\":\"payload\",\"returnType\":\"1\",\"throwErrors\":\"0\",\"query\":\"SELECT GETDATE() AS now\",\"modeOpt\":\"\",\"modeOptType\":\"query\",\"queryOpt\":\"\",\"queryOptType\":\"editor\",\"paramsOpt\":\"\",\"paramsOptType\":\"editor\",\"params\":[],\"x\":300,\"y\":100,\"wires\":[[\"4\"]]},{\"id\":\"3\",\"type\":\"MSSQL config\",\"name\":\"myserver\",\"server\":\"{{{$SQL_SERVER}}}\",\"port\":\"1433\",\"encrypt\":\"true\",\"trustServerCertificate\":\"false\",\"authentication\":\"azure-active-directory-password\",\"username\":\"{{{$SQL_USER}}}\",\"password\":\"{{{$SQL_PASS}}}\",\"database\":\"{{{$SQL_DB}}}\",\"domain\":\"\",\"domainUserName\":\"\",\"domainPassword\":\"\",\"connectionTimeout\":\"15\",\"requestTimeout\":\"15\",\"sslCert\":\"\",\"sslHost\":\"\",\"sslCa\":\"\",\"options\":\"\"},{\"id\":\"4\",\"type\":\"debug\",\"name\":\"output\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"targetType\":\"full\",\"x\":500,\"y\":100,\"wires\":[]}]","lang":"typescript","description":"Creates a Node-RED inject node that triggers a SELECT query on a MSSQL config node, outputting to debug."},"warnings":[{"fix":"Upgrade Node.js to version 18 or later.","message":"Requires Node.js >=18 (since version 0.13.0).","severity":"breaking","affected_versions":">=0.13.0"},{"fix":"Replace node-red-contrib-mssql with node-red-contrib-mssql-plus; adjust configuration accordingly.","message":"The old 'MSSQL' node (from node-red-contrib-mssql) is deprecated. Use this plus variant instead.","severity":"deprecated","affected_versions":""},{"fix":"Use {{{...}}} for variable interpolation; {{...}} will not render.","message":"Mustache rendering in SQL queries uses triple braces {{{...}}} not double braces {{...}}.","severity":"gotcha","affected_versions":""},{"fix":"Remove static parameter definitions if sending via msg.params, or remove msg.params if using UI parameters.","message":"Parameters defined in the node UI override msg.params. Ensure no conflicting definitions.","severity":"gotcha","affected_versions":""},{"fix":"Set 'returnType' field: 1 for multiple recordsets, 2 for first row only, etc.","message":"Return type options changed: '1' returns array of recordsets, '2' returns single object, etc. Check documentation.","severity":"breaking","affected_versions":""}],"env_vars":null,"search_vec":"'0.13.1':33 '18':89 'activ':43 'azur':24 'built':49 'bulk':17 'cadenc':40 'catch':79 'contrib':4 'current':29 'databas':26,99 'differenti':45 'driver':52,56 'environ':61 'error':76 'execut':12 'fix':39 'handl':77 'includ':46 'input':68 'insert':18 'interpol':63 'javascript':90 'key':44 'linux':50 'maintain':41 'microsoft':20,98 'msg.error':82 'mssql':5,96 'multipl':72 'mustach':64 'need':59 'node':2,8,10,80,85,92 'node-r':7,84,91 'node-red-contrib-mssql-plus':1 'node.js':88 'npm':36 'odbc':55,94 'output':70 'paramet':71 'plus':6 'pre':48 'pre-built':47 'procedur':15 'queri':13,67 'red':3,9,86,93 'releas':34 'requir':83 'result':73 'server':22,102 'set':74 'setup':57 'sql':21,25,97,101 'sql-server':100 'sql2000':27 'sql2022':28 'stabl':30 'store':14 'support':60 'tds':51 'templat':65 'unixodbc':95 'variabl':62 'version':31 'via':78","created_at":"2026-06-04T18:53:16.481420+00:00","updated_at":"2026-06-04T18:53:16.481420+00:00","problems":[{"fix":"Verify server address, port, credentials, and network access. Check if TLS encryption is required.","cause":"Connection configuration incorrect or server unreachable (network/firewall).","error":"Error: Failed to connect to server: ..."},{"fix":"Define all used env vars in Node-RED environment or provide default values. Use correct syntax: {{{ENV_VAR}}}.","cause":"Environment variable not set or triple moustache syntax wrong.","error":"ReferenceError: {{{sql_ip}}} is not defined"},{"fix":"Ensure msg.payload is an array of objects (rows) before bulk insert node.","cause":"Bulk insert expects an array of objects but received something else.","error":"TypeError: msg.payload is not iterable"},{"fix":"Increase 'connectionTimeout' and 'requestTimeout' in config node, or optimize query performance.","cause":"Connection or request timeout reached.","error":"The server did not respond in a timely fashion"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/bestlong/node-red-contrib-mssql-plus","github":"https://github.com/bestlong/node-red-contrib-mssql-plus","docs":null,"changelog":null,"pypi":null,"npm":"node-red-contrib-mssql-plus","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}