SQL Server Execute¶
Executes non-SELECT SQL commands (INSERT, UPDATE, DELETE, and DDL) against a Microsoft SQL Server database using configured MSSQL credentials. Returns human-readable text and structured outputs suitable for downstream workflow steps.

Usage¶
Use this node to modify data or manage schema in SQL Server during a workflow. Typical examples include inserting new rows, updating existing data, deleting records, or running DDL (e.g., CREATE TABLE). Provide a valid credentials_path, set a timeout, and supply the SQL statement in sql_text.
Inputs¶
| Field | Required | Type | Description | Example |
|---|---|---|---|---|
| credentials_path | True | STRING | Path or reference to stored MSSQL credentials that follow the 'mssql' credential template. | |
| timeout | True | INT | Maximum time in seconds to wait for the execution to complete before timing out. | 60 |
| sql_text | True | STRING | SQL statement to execute (intended for INSERT/UPDATE/DELETE/DDL). Multi-line input is supported. | INSERT INTO users (name, email) VALUES ('John Doe', 'john@example.com') |
Outputs¶
| Field | Type | Description | Example |
|---|---|---|---|
| text | STRING | Human-readable summary of the execution result (e.g., success message or error details). | Executed successfully. Rows affected: 1 |
| json | STRING | Structured JSON result for programmatic handling (status, rows affected, errors). | {"status": "success", "rows_affected": 1} |
| html | STRING | Optional HTML representation of the result. Typically empty for execute operations. | Execution Result: Rows affected: 1 |
| xlsx | BYTES | Optional Excel data. Usually empty for execute operations. | |
| BYTES | Optional PDF data. Usually empty for execute operations. |
Important Notes¶
- Credentials template: Uses the "mssql" credential template; ensure your stored credentials conform to it.
- Operation scope: Intended for non-SELECT operations. Use a dedicated query node for SELECT statements.
- One statement recommended: Provide a single executable statement. Chain nodes for multi-step operations.
- Timeout management: Increase timeout for long-running operations to prevent premature failure.
- Security: Do not interpolate untrusted input into SQL to avoid injection vulnerabilities.
- Permissions: Ensure the database user has necessary privileges for the operation.
Troubleshooting¶
- SQL syntax errors: Validate the statement syntax and table/column names.
- Permission denied: Verify the MSSQL credentials have required DML/DDL permissions.
- Operation timed out: Increase the timeout or optimize the statement/database performance.
- Invalid credentials_path: Confirm the path/reference is correct and accessible.
- Connectivity issues: Check host, port, network/firewall rules, and server availability.
- No rows affected: Review WHERE clauses and data conditions to ensure target rows match.