Ad Widget

Collapse

Issue Connecting to MSSQL

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • techmattr
    Member
    • Sep 2022
    • 39

    #1

    Issue Connecting to MSSQL

    Trying to setup our first MSSQL monitor.
    I am running 6.2 docker.
    I have installed the Microsoft ODBC 18 in the zabbix-docker-zabbix-server-1 container
    I have edited the odbc.ini with the DSN name, driver, server and port
    Code:
    [DSNNAME]
    Driver = ODBC Driver 18 for SQL Server
    Server = SERVERNAME
    Port = 1433
    When I test the connection I get a self-signed certificate error.

    Code:
    zabbix@09650e6380e0:/etc$ isql -v DSNNAME zabbixsqluser password
    [08001][unixODBC][Microsoft][ODBC Driver 18 for SQL Server]SSL Provider: [error:0A000086:SSL routines::certificate verify failed:self-signed certificate]
    [08001][unixODBC][Microsoft][ODBC Driver 18 for SQL Server]Client unable to establish connection
    [ISQL]ERROR: Could not SQLConnect​
    Any suggestions on how to get around this error?
  • Answer selected by techmattr at 27-09-2022, 20:10.
    techmattr
    Member
    • Sep 2022
    • 39

    I resolved this by adding TrustServerCertificate = YES to the odbc.ini file.

    Code:
    [DSNNAME]
    Driver = ODBC Driver 18 for SQL Server
    Server = SERVERNAME
    Port = 1433​
    TrustServerCertificate = YES

    Comment

    • techmattr
      Member
      • Sep 2022
      • 39

      #2
      I resolved this by adding TrustServerCertificate = YES to the odbc.ini file.

      Code:
      [DSNNAME]
      Driver = ODBC Driver 18 for SQL Server
      Server = SERVERNAME
      Port = 1433​
      TrustServerCertificate = YES

      Comment

      Working...