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