Page 1 of 1

ODBC Connector Value file issues

Posted: Sat Aug 11, 2018 12:29 pm
by rhans
Hi guys,

I am new to DS and a very fundamental question. The value file has the option to enter database name, user name and password. But, where do we specific the server name ? Where can i check how it reads this information...which file ?

Posted: Sat Aug 11, 2018 2:13 pm
by chulett
Welcome aboard.

First, you'd have to post the actual error message(s) from your log before someone could do much more than guess. Secondly, as to the other questions, just wanted to point out that a "values file" doesn't hold anything but strings and those strings can be anything you need them to be, parameter wise. Meaning, there's no restriction on it needing to be a database name, or user-id or anything else.


What stage are you using to connect to a database that has you asking these questions? Different ones have different configuration requirements so if you can give specifics of the stage and database, again people can give you more targeted answers.

Posted: Sat Aug 11, 2018 4:41 pm
by rhans
I am using ODBC.

Posted: Sun Aug 12, 2018 7:29 am
by chulett
So... the ODBC Connector stage? Don't recall if that was available back in version 9, hence the question.

Posted: Sun Aug 12, 2018 2:41 pm
by rhans
delete

Posted: Mon Aug 13, 2018 4:19 am
by qt_ky
This may not help with your error, but hopefully to answer your first question...

If you are using ODBC, then the database server name (host name) or its IP address would be stored in the .odbc.ini file which is usually located under the $DSHOME directory on your DataStage server.

Telnet or ssh to get a command line on the server. If you can login as dsadm or the administrative user, that may not be necessary but may help ensure that the environment variables are already set. The default server engine path is /opt/IBM/InformationServer/Server/DSEngine and it is common to use a different path too. Run the echo $DSHOME command to what that path is on your server.

Really, the ODBC config file could be anywhere, and now that I think about it, echo $ODBCINI is the most appropriate command to locate the file you need to view.

Go there, then cat .odbc.ini to view the file. Look for a section beginning with your data source name in square brackets. Below that look for "IpAddress=" to see how it was setup. Special characters, typos, or trailing spaces will tend to cause problems.

Posted: Mon Aug 13, 2018 7:29 am
by chulett
Thanks for the assist! While I recalled that it was part of the ODBC entry, I hadn't taken the time to look up and record all of the gory details. Hence the non-mention. Now I can scratch that off my ToDo List. :wink:

Posted: Mon Aug 13, 2018 8:41 am
by rhans
Thanks. Do you think value file is impacted by ODBC.ini. Is there any connection between value file and odbc.ini ?

Posted: Tue Aug 14, 2018 5:05 am
by qt_ky
Suppose you have a parameter, and it can be any type of parameter that provides a value for your ODBC data source name, and you have referenced it in the ODBC Connector stage.

When you run the job, DataStage will take the value and via the drivers will go read the .odbc.ini file located at the $ODBCINI location, and it will be looking to find that data source name in the header section at the top of the file as well as the detail section later in the file where all the connection attributes are defined.

The data source name value may be case sensitive (I don't recall now). Any mismatch along the way will cause an error.

If you want to narrow down where the problem is then try hard-coding the data source name into the stage, compile, and run.