Ad Widget

Collapse

ODBC connection problem in Ubuntu 16.04 (Login failed for user ''. )

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hernan
    Member
    • Sep 2016
    • 67

    #1

    ODBC connection problem in Ubuntu 16.04 (Login failed for user ''. )

    Environment:

    Ubuntu 16.04.5 LTS
    Zabbix 3.4.13. © 2001–2018, Zabbix SIA

    Problem description:

    The isql command failed with the followin error:

    **********************************
    $ isql test -v
    [28000][unixODBC][Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Login failed for user ''.
    [ISQL]ERROR: Could not SQLConnect
    $

    If I ran the isql comand with paramiters, I can connect to the database:
    $ isql test adminuser <password> -v
    +---------------------------------------+
    | Connected! |
    | |
    | sql-statement |
    | help [tablename] |
    | quit |
    | |
    +---------------------------------------+
    SQL>
    **************************************

    Here you have the filles descriptions:

    $ more /etc/odbc.ini
    [test]
    Description = SQL test database
    Driver = ODBC Driver 17 for SQL Server
    Server = x.x.x.x
    User = adminuser
    Password = <password>
    Port = 1433
    Database = DB


    adminuser$ more /etc/odbcinst.ini
    [ODBC Driver 17 for SQL Server]
    Description=Microsoft ODBC Driver 17 for SQL Server
    Driver=/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.2.so.0.1
    UsageCount=1


    adminuser$ odbcinst -j
    unixODBC 2.3.1
    DRIVERS............: /etc/odbcinst.ini
    SYSTEM DATA SOURCES: /etc/odbc.ini
    FILE DATA SOURCES..: /etc/ODBCDataSources
    USER DATA SOURCES..: /home/adminuser/.odbc.ini
    SQLULEN Size.......: 8
    SQLLEN Size........: 8
    SQLSETPOSIROW Size.: 8
    adminuser$


    ************************************************** ********

    Can you help me with this issue?

    Thanks in advance.

    Regards.








Working...