Skip to content

Cannot connect to MSSQL instance #184

Description

@seasea128

When connecting to MSSQL instance with Emacs, the LSP exited, with the following log:

2026/01/05 10:42:59 sqls: reading on stdin, writing on stdout
2026/01/05 10:42:59 db worker: start
2026/01/05 10:42:59 send err no database connection
2026/01/05 10:42:59 Send Message: no database connection
2026/01/05 10:42:59 sql: expected 0 arguments, got 1

To Reproduce
Steps to reproduce the behavior:

  1. Host an MSSQL instance (can be done with docker compose)
  2. Connect to the instance with following configuration:
{
  "sqls": {
    "connections": [
      {
        "driver": "mssql",
        "dataSourceName": "server=localhost;user id=sa;password=Testing123!@;"
      }
    ]
  }
}

Expected behavior
The LSP should function normally with MSSQL, like how it works with SQLite3.

Versions (please complete the following information):

  • OS Version: Linux (Arch, Kernel 6.18.2)
  • sqls Version: 0.2.28

Additional context
Docker Compose for hosting MSSQL instance:

services:
  sql-server:
    image: mcr.microsoft.com/mssql/server:2019-latest
    container_name: sql-server-container
    environment:
      SA_PASSWORD: Testing123!@
      ACCEPT_EULA: Y
    ports:
      - "1433:1433"
    volumes:
      - "./:/mssql-server-setup-scripts.d/"
      - mssql-volume-2019:/var/opt/mssql

volumes:
  mssql-volume-2019:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions