Ad Widget

Collapse

Connect the Azure SQL Server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • garentsen
    Junior Member
    • Jul 2016
    • 3

    #1

    Connect the Azure SQL Server

    Dear All,

    Can somebody help he how to connect from the Zabbix Server to a SQL Server Azure database using ODBC (or a different solution)

    Till now I'm not able to connect via Zabbix from the command on the zabbix server i'm able to connect (Ubuntu server)

    /etc/freetds/freetds.conf


    # A typical Microsoft server
    [MSSQL]
    host = mydb.database.windows.net
    port = 1433
    # tds version = 8.0



    /etc/odbc.ini

    [MSSQL_DSN]
    Driver=FreeTDS
    Servername=MSSQL
    Port=1433
    Database=Cir



    /etc/odbcinst.ini

    [FreeTDS]
    Description = FreeTDS
    Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so



    in zabbix I created an item

    db.odbc.select[guidodb,MSSQL_DSN]

    But it looks like zabbix can not find MSSQL_DSN (with isql I can connect) zabbix give an error message: Cannot connect to ODBC DSN:[SQL_ERROR]:[IM002][0][[unixODBC][Driver Manager]Data source name not found, and no default driver specified]|

    Please help me

    Thanks a lot

    Guido
  • glebs.ivanovskis
    Senior Member
    • Jul 2015
    • 237

    #2
    Probably unixODBC is looking into /usr/local/etc. Does isql MSSQL_DSN work?

    Comment

    • garentsen
      Junior Member
      • Jul 2016
      • 3

      #3
      Hello glebs,

      I think i use tthe one in the /etc folder

      odbcinst -j

      unixODBC 2.3.0
      DRIVERS............: /etc/odbcinst.ini
      SYSTEM DATA SOURCES: /etc/odbc.ini
      FILE DATA SOURCES..: /etc/ODBCDataSources
      USER DATA SOURCES..: /etc/odbc.ini
      SQLULEN Size.......: 8
      SQLLEN Size........: 8
      SQLSETPOSIROW Size.: 8

      And yes i can use isql but only with the username and password parameter for some reason:

      isql -v MSSQL login@fac58@domain password
      +---------------------------------------+
      | Connected! |
      | |
      | sql-statement |
      | help [tablename] |
      | quit |
      | |
      +---------------------------------------+
      SQL>

      But if i only use isql -v MSSQL i see the same error:
      isql -v MSSQL
      [S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
      [01000][unixODBC][FreeTDS][SQL Server]Adaptive Server connection failed
      [ISQL]ERROR: Could not SQLConnect


      Do you have any suggestions?

      Br
      Guido

      Comment

      Working...