Unable to connect to SQL Server through ODBC

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
AmeyJoshi14
Participant
Posts: 334
Joined: Fri Dec 01, 2006 5:17 am
Location: Texas

Unable to connect to SQL Server through ODBC

Post 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!!
lstsaur
Participant
Posts: 1139
Joined: Thu Oct 21, 2004 9:59 pm

Post 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.
AmeyJoshi14
Participant
Posts: 334
Joined: Fri Dec 01, 2006 5:17 am
Location: Texas

Post 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
lstsaur
Participant
Posts: 1139
Joined: Thu Oct 21, 2004 9:59 pm

Post 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.
AmeyJoshi14
Participant
Posts: 334
Joined: Fri Dec 01, 2006 5:17 am
Location: Texas

Post 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!!!
AmeyJoshi14
Participant
Posts: 334
Joined: Fri Dec 01, 2006 5:17 am
Location: Texas

Post by AmeyJoshi14 »

We have addd the entries in .odbc.ini file and issue is resolved.

Thanks for the help!!
http://findingjobsindatastage.blogspot.com/
Theory is when you know all and nothing works. Practice is when all works and nobody knows why. In this case we have put together theory and practice: nothing works. and nobody knows why! (Albert Einstein)
Post Reply