Skip to main content
Microsoft SQL Server logo

Overview

Add Microsoft SQL Server to any ModuleX agent or workflow. Execute queries and manage data in Microsoft SQL Server databases via direct TCP connections using pymssql.
Categories: Databases · Data Infrastructure · Auth: SQL Server Connection · Actions: 4

Authentication

SQL Server Connection

Connect using SQL Server host, port, database, username, and password

Required Credentials

FieldDescriptionRequiredFormat
HostSQL Server hostname or IP addressYesmyserver.database.windows.net
PortSQL Server port numberYes1433
UsernameSQL Server login usernameYes-
PasswordSQL Server login passwordYes-
DatabaseName of the database to connect toYes-
EncryptWhether to encrypt the connection (true/false). Use true for Azure SQL.Notrue
Trust Server CertificateWhether to trust self-signed certificates (true/false). Use true for local dev.Nofalse

Available Actions

Parameters

query
string
required
The SQL query to execute

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "recordset": {
      "items": {
        "additionalProperties": true,
        "type": "object"
      },
      "title": "Recordset",
      "type": "array"
    },
    "rows_affected": {
      "items": {
        "type": "integer"
      },
      "title": "Rows Affected",
      "type": "array"
    }
  },
  "required": [
    "success"
  ],
  "title": "ExecuteRawQueryOutput",
  "type": "object"
}

Parameters

query
string
required
The SQL query to execute, using @name placeholders for parameters
inputs
object
Key-value mapping of parameter names to values for the query placeholders

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "recordset": {
      "items": {
        "additionalProperties": true,
        "type": "object"
      },
      "title": "Recordset",
      "type": "array"
    },
    "rows_affected": {
      "items": {
        "type": "integer"
      },
      "title": "Rows Affected",
      "type": "array"
    }
  },
  "required": [
    "success"
  ],
  "title": "ExecuteQueryOutput",
  "type": "object"
}

Parameters

table
string
required
Name of the table to insert into
data
object
required
JSON object mapping column names to values for the new row

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "rows_affected": {
      "items": {
        "type": "integer"
      },
      "title": "Rows Affected",
      "type": "array"
    }
  },
  "required": [
    "success"
  ],
  "title": "InsertRowOutput",
  "type": "object"
}

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "tables": {
      "items": {
        "type": "string"
      },
      "title": "Tables",
      "type": "array"
    }
  },
  "required": [
    "success"
  ],
  "title": "ListTableOptionsOutput",
  "type": "object"
}

Limits & Quotas

  • No API rate limits apply; performance depends on the SQL Server instance capacity and network latency.
  • Connection timeout defaults to pymssql’s default (dependent on server responsiveness).
  • Query execution is wrapped in asyncio.to_thread so it does not block the event loop.
  • Error model: connection failures, query syntax errors, and timeouts are caught and returned as success=False + error rather than raising.

MySQL

PostgreSQL

Snowflake