Page 1 of 1

Unable to connect to SQL Server through ODBC

Posted: Thu Oct 11, 2012 8:55 am
by AmeyJoshi14
Hi Experts,

We just installed the Datastage 8.7 in our Linux box. Right now we are trying to connect to SQL Server 2008 R2 through ODBC stage.
I have added SQL Server database and server name in odbc.ini and uvodbc.config.
When I am testing the connection from linux through DS_CONNECT, it unable to connect.

Code: Select all

./bin/dssh

LOGTO <Project>
DS_CONNECT SQLServerTest
SQLConnect error:   Status = -1   SQLState = IM002   Natcode = 0
[ODBC] [DataDirect][ODBC lib] Data source name not found and no default driver specified
I have also tested data direct ODBC driver through "ddtestlib" , and it working fine..

Code: Select all

$ ./ddtestlib /opt/IBM/InformationServer/Server/branded_odbc/lib/VMsqls25.so
Load of /opt/IBM/InformationServer/Server/branded_odbc/lib/VMsqls25.so successful, qehandle is 0x2DB9090
File version: 06.12.0118 (B0117, U0061)
Do we have to ask our SQL dba to do any changes on SQL database? or is it issue with odbc.ini file?

Appreciate all your help!!

Thanks in Advance!!

Posted: Thu Oct 11, 2012 11:28 am
by lstsaur
Please post your odbc.ini and uvodbc.config files. What you should do is to use the ODBC data source name of the SQL Server to test the connection.

Posted: Thu Oct 11, 2012 12:16 pm
by AmeyJoshi14
Below is the detail in our odbc.ini file:-

Code: Select all

[ODBC Data Sources]
SQLSERVER_TEST=Microsoft SQL Server Driver

[SQLSERVER_TEST]
Driver=/opt/IBM/InformationServer/Server/branded_odbc/lib/VMmsss25.so
Description=Microsoft SQL Server Driver
Database=tempdb
Address=MSSQL_SERVER
and my uvodbc.config

Code: Select all

<SQLSERVER_TEST>
DBMSTYPE = ODBC

Posted: Thu Oct 11, 2012 5:26 pm
by lstsaur
Ok, your DSN for the SQL Server is SQLSERVER_TEST. Then use the test facilities in branded_odbc to check the connection to that SQL Server.

Posted: Tue Oct 16, 2012 8:34 pm
by AmeyJoshi14
Thanks for the help.

There are multiple entries in odbc.ini files. There is also entry in odbc.ini for SQLServerTest.

Thanks again!!!

Posted: Wed Oct 17, 2012 8:21 am
by AmeyJoshi14
We have addd the entries in .odbc.ini file and issue is resolved.

Thanks for the help!!