Skip to content

SQL Server Connection String

Builds a valid Microsoft SQL Server (MSSQL) database URI from individual parameters. Supports SQL authentication (username/password), optional instance names, and Windows Integrated Security. Returns the connection string in the primary output and leaves other outputs empty; on error, returns an error message and JSON error details.
Preview

Usage

Use this node when you need to construct a MSSQL connection URI to pass into other SQL Server nodes (Query, Execute, etc.) or any component that expects a credentials_path URI. Typical workflow: configure host, port, database, and either username/password or enable integrated security; then feed the resulting connection string into subsequent database nodes.

Inputs

FieldRequiredTypeDescriptionExample
hostTrueSTRINGDatabase server hostname or IP address.db.example.com
portTrueINTTCP port for the SQL Server instance. Defaults to 1433.1433
databaseTrueSTRINGTarget database name.SalesDB
usernameTrueSTRINGUsername for SQL authentication. Ignored if Integrated Security is enabled.sa
passwordTruePASSWORDPassword for SQL authentication. Ignored if Integrated Security is enabled.
instanceTrueSTRINGOptional SQL Server instance name. If provided, it is appended as a query parameter.MSSQLSERVER
integrated_securityTrueBOOLEANEnable Windows Integrated Security (no username/password in the URI).False

Outputs

FieldTypeDescriptionExample
resultSTRINGThe constructed MSSQL connection string or an error message if construction failed.mssql://sa:@db.example.com:1433/SalesDB?instance=MSSQLSERVER
json_resultSTRINGJSON error details if construction fails; otherwise empty.{"error": "Failed to construct connection string: "}
html_tableSTRINGNot used by this node. Always empty.
xlsx_dataSTRINGNot used by this node. Always empty.
pdf_dataSTRINGNot used by this node. Always empty.

Important Notes

  • If Integrated Security is enabled, the URI format is mssql://:/?integrated_security=true and username/password are ignored.
  • If an instance name is provided, it is appended as ?instance= to the URI.
  • Special characters in usernames or passwords are not URL-encoded by this node. If your credentials contain special characters, pre-encode them to avoid malformed URIs.
  • This node does not validate or test the database connection; it only constructs the URI.
  • Default port is 1433 if you are unsure of the SQL Server port.

Troubleshooting

  • Got an authentication error downstream: Ensure you used the correct authentication mode. If using Integrated Security, turn it on and leave username/password unused; otherwise provide valid SQL credentials.
  • Connection fails due to special characters: URL-encode username/password before input (e.g., replace special characters with their percent-encoded form).
  • Server requires an instance name: Provide the correct instance in the 'instance' field so it is included as a query parameter.
  • Downstream node rejects credentials_path: Verify the output begins with mssql:// and includes host, port, and database as expected.