ODBC driver can't read user data in sql server authentication mode

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Tamas
    New Member
    • Dec 2014
    • 1

    ODBC driver can't read user data in sql server authentication mode

    Hi,
    A have a problem to make ODBC connection from ORACLE database to MS SQL Server.

    I’ve already achieved to connect with sqlcmd. So the servers see each others and can communicate.
    The ODBC driver fails at the authentication, because it can’t read the user and password data from the odbc.ini file.
    I read that this happens because the odbc driver does not accept the authentication data if it’s stored in plain text, but there were no explanation how can I store data in an other way.

    Environment:
    ODBC driver: Microsoft ODBC Driver 11 for SQL Server
    OS: ORACLE linux 6.5
    Target database: MS SQL Server 2008 R2

    This works:
    Code:
    sqlcmd -S address -U username -P password
    odbc.ini file:
    Code:
    [SQL_LINK]
    Driver = ODBC Driver 11 for SQL Server
    Server = tcp:address,port
    UID = username
    PWD = password

    Log file:
    [
    Code:
    ODBC][913][1417453346.612341][SQLConnect.c][3654]
                    Entry:
                            Connection = 0x18f40a0
                            Server Name = [SQL_LINK][length = 8 (SQL_NTS)]
                            User Name = [NULL]
                            Authentication = [NULL]
                    UNICODE Using encoding ASCII 'UTF8' and UNICODE 'UTF16LE'
    
                    DIAG [28000] [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Login failed for user ''.
    I test with isql command.
Working...