SQL Server Connection String¶
Builds a Microsoft SQL Server connection URI from individual parameters. Supports both SQL authentication and Windows Integrated Security, and optionally includes a named instance. Returns the constructed connection string as the primary output.

Usage¶
Use this node when you need to assemble a properly formatted SQL Server connection string from user-provided fields to pass into downstream database nodes or external tools. Typical workflow: provide host, port, database, and either username/password or enable integrated security; the node outputs a single ready-to-use connection URI.
Inputs¶
| Field | Required | Type | Description | Example |
|---|---|---|---|---|
| host | True | STRING | Database hostname or IP address. | db.mycompany.internal |
| port | True | INT | TCP port for SQL Server. Default is 1433. | 1433 |
| database | True | STRING | Target database name. | SalesDB |
| username | True | STRING | SQL Server login username. Ignored if Integrated Security is enabled. | sa |
| password | True | PASSWORD | SQL Server login password. Ignored if Integrated Security is enabled. | |
| instance | False | STRING | Named SQL Server instance. If provided, it is added to the connection string. | MSSQLSERVER |
| integrated_security | True | BOOLEAN | Use Windows Integrated Security (true) instead of username/password (false). | False |
Outputs¶
| Field | Type | Description | Example |
|---|---|---|---|
| connection_string | STRING | The constructed MSSQL connection URI. Uses Integrated Security or username/password based on inputs. | mssql://username: |
| json | STRING | JSON-formatted error details when construction fails; empty on success. | {"error": "Failed to construct connection string: |
| out_3 | STRING | Unused placeholder output (empty string). | |
| out_4 | STRING | Unused placeholder output (empty string). | |
| out_5 | STRING | Unused placeholder output (empty string). |
Important Notes¶
- If integrated_security is true, username and password are ignored and the connection string includes integrated_security=true.
- When an instance is provided, it is appended as a query parameter (instance=
). - Special characters in usernames or passwords may need URL encoding to ensure a valid URI.
- Only the first output (connection_string) is meaningful on success; other outputs are placeholders.
- On error, the first output contains a human-readable message and the second output contains a JSON-formatted error string.
Troubleshooting¶
- Connection string is missing parts: Verify host, port, and database are provided and non-empty.
- Authentication issues downstream: If using Integrated Security, ensure the environment supports it; otherwise set integrated_security to false and provide username/password.
- Invalid characters in password: URL-encode special characters in the password before input.
- Incorrect server/instance resolution: If connecting to a named instance, provide the instance value; otherwise leave it blank and ensure the port is correct.
- Error returned in second output: Inspect the JSON error string for details and correct the offending parameter.