By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,567 Members | 1,522 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,567 IT Pros & Developers. It's quick & easy.

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

P: 1
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:
Expand|Select|Wrap|Line Numbers
  1. sqlcmd -S address -U username -P password
odbc.ini file:
Expand|Select|Wrap|Line Numbers
  1. [SQL_LINK]
  2. Driver = ODBC Driver 11 for SQL Server
  3. Server = tcp:address,port
  4. UID = username
  5. PWD = password

Log file:
[
Expand|Select|Wrap|Line Numbers
  1. ODBC][913][1417453346.612341][SQLConnect.c][3654]
  2.                 Entry:
  3.                         Connection = 0x18f40a0
  4.                         Server Name = [SQL_LINK][length = 8 (SQL_NTS)]
  5.                         User Name = [NULL]
  6.                         Authentication = [NULL]
  7.                 UNICODE Using encoding ASCII 'UTF8' and UNICODE 'UTF16LE'
  8.  
  9.                 DIAG [28000] [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Login failed for user ''.
I test with isql command.
Dec 3 '14 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.