Skip to content

ODBC Driver Fails to Open Connection to SQL Server 2012 #25

Description

@mifhud

Description:

I'm encountering an error when trying to establish a connection to a Microsoft SQL Server 2012 (SP1) instance using ODBC Driver 18 for SQL Server via the mssql_mcp_server tool. The error message indicates that the ODBC driver could not open the connection.

Environment Details:

  • SQL Server Version:
    Microsoft SQL Server 2012 (SP1) - 11.0.3128.0 (X64)
    Dec 28 2012 20:23:12
    Copyright (c) Microsoft Corporation
    Standard Edition (64-bit) on Windows NT 6.2 (Build 9200: )
  • ODBC Driver Installed in Client: ODBC Driver 18 for SQL Server

Configuration (mcp.json):

"mssql": {
    "command": "uvx",
    "args": [
        "mssql_mcp_server"
    ],
    "env": {
        "MSSQL_SERVER": "xxx",
        "MSSQL_PORT": "1433",
        "MSSQL_DATABASE": "xxx",
        "MSSQL_USER": "xxx",
        "MSSQL_PASSWORD": "xxx",
        "MSSQL_DRIVER": "ODBC Driver 18 for SQL Server",
        "MSSQL_TRUST_SERVER_CERTIFICATE": "yes",
        "MSSQL_ENCRYPT": "no",
        "MSSQL_CONNECTION_TIMEOUT": "60"
    }
}

Expected Behavior:

Successful connection to the SQL Server instance using ODBC Driver 18.

Actual Behavior:

Connection fails with an ODBC error: "ODBC Driver could not open connection".
Image

Request:

Could you please advise on the correct steps to resolve this issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions