Configuring ODBC Data Sources (Linux(R), UNIX(R)) (Step by Step)
After you install IBM Information Server, you need to configure the WebSphere DataStage ODBC connections.
Log in through putty on server using Administrator User name and Password. 1 thing to remember that log in user should have SUDO rights.
My suggestion here is that you use WINSCP to find or edit these three files instead of Putty.
About this task
You need to edit three files to set up the required ODBC connections. These are:
All three are located in the $DSHOME directory. Copies of uvodbc.config are also placed in the project directories.
Non-wire drivers require different setup information than wire drivers. Non-wire drivers require information about the location of the database client software. Wire drivers require information about the database itself.
For information about configuring the ODBC environment for your specific database, see the Data Direct Drivers Reference manual odbcref.pdf file located in the$DSHOME/Server/branded_odbc/books/odbc directory. You should also check the ODBCREAD.ME file in the branded_odbc directory. There is also an html file located in branded_odbc/odbchelp.
You might need to add new environment variables as you configure WebSphere DataStage to connect to different databases using plug-ins or ODBC drivers. Any environment variables you need for interactive use of ODBC drivers to make a connection to an ODBC data source must be added to the dsenv file. This lets the WebSphere DataStage server inherit the proper environment for ODBC connections.
For a connection using a wire protocol driver, there are no changes required to dsenv.
For a connection using a non-wire protocol driver, you generally need to specify the following information in the dsenv file:
The following example shows some typical entries for commonly used databases.
Log in through putty on server using Administrator User name and Password. 1 thing to remember that log in user should have SUDO rights.
My suggestion here is that you use WINSCP to find or edit these three files instead of Putty.
About this task
You need to edit three files to set up the required ODBC connections. These are:
All three are located in the $DSHOME directory. Copies of uvodbc.config are also placed in the project directories.
Simplest path to find these three files is
/opt/IBM/InformationServer/Server/DSEngine
My suggestion here is that you use WINSCP to find or edit these three files instead of Putty.
What are wired and non-wired Protocol drivers?
Non-Wire protocol drivers VS Wire protocol drivers
Basically there are two type of ODBC drivers being used in DataStage:
non-wire protocol drivers - require database client software to be installed on the DataStage server (the drivers use the API supplied by the database client)
wire protocol drivers - do not require database client software (they communicate with the database directly)
For information about configuring the ODBC environment for your specific database, see the Data Direct Drivers Reference manual odbcref.pdf file located in the$DSHOME/Server/branded_odbc/books/odbc directory. You should also check the ODBCREAD.ME file in the branded_odbc directory. There is also an html file located in branded_odbc/odbchelp.
- dsenv file
The WebSphere DataStage server has a centralized file for storing environment variables called dsenv in $DSHOME. $DSHOME identifies theWebSphere DataStage installation directory. The default directory is /opt/IBM/InformationServer/Server/DSEngine. - .odbc.ini file
The .odbc.ini files gives information about connecting to the database (wire protocol drivers) or the database client (non-wire protocol drivers). If your system uses a mix of drivers, your .odbc.ini file will contain a mix of entry types. - uvodbc.config file
Use the uvodbc.config file to specify the DSNs for the databases that you are connecting to through ODBC. - Creating and binding a DB2 package to a DSN
Before you connect to a DB2 DSN you need to bind DB2 packages to the DSN. You must bind a package to every DSN you are going to use to connect to a DB2 database. - Configuring third party ODBC drivers
You can use ODBC drivers from third parties for connecting WebSphere DataStage to different data sources. You might require to connect to a database not supported by the Data Direct driver pack, for example, Redbrick. You can use only one ODBC driver manager at a time. As a result, you cannot use third party drivers at the same time that you use the WebSphere DataStage drivers, and you must perform some reconfiguration to switch between the two types.
dsenv file
The WebSphere DataStage server has a centralized file for storing environment variables called dsenv in $DSHOME. $DSHOME identifies the WebSphere DataStage installation directory. The default directory is /opt/IBM/InformationServer/Server/DSEngine.You might need to add new environment variables as you configure WebSphere DataStage to connect to different databases using plug-ins or ODBC drivers. Any environment variables you need for interactive use of ODBC drivers to make a connection to an ODBC data source must be added to the dsenv file. This lets the WebSphere DataStage server inherit the proper environment for ODBC connections.
For a connection using a wire protocol driver, there are no changes required to dsenv.
For a connection using a non-wire protocol driver, you generally need to specify the following information in the dsenv file:
- environment variables required by the database client software
- database home location
- database library directory
- the PATH environment variable
The following table shows the library path environment variables for each operating system.
Table 1. Library path environment variables for WebSphere® DataStage® | |
Operating system | Environment variables |
AIX® | LIBPATH |
Linux® | LD_LIBRARY_PATH |
Solaris | LD_LIBRARY_PATH |
#Sybase 11 setup
LANG=
Export LANG
SYBASE=/export/home/sybase/sybase;export SYBASE
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SYBASE/lib:/usr/lib:/lib;export LD_LIBRARY_PATH
# Oracle 9i
ORACLE_HOME=/space/oracle9i
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib:$ORACLE_HOME/rdbms/lib;export
LD_LIBRARY_PATH
ORACLE_SID=WSMK5
export ORACLE_HOME ORACLE_SID
#Informix XPS 9.3
INFORMIXDIR=/space/informix; export INFORMIXDIR
INFORMIXSERVER=solnew2.1;export INFORMIXSERVER
ONCONFIG=onconfig.solnew2; export ONCONFIG
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INFORMIXDIR/lib:$INFORMIXDIR/lib/
esql:$INFORMIXDIR/lib/cli;export LD_LIBRARY_PATH
LANG=C
export LANG
#DB2 Version 9
DB2DIR=/opt/IBM/InformationServer/DB2;export DB2DIR
DB2INSTANCE=DB2inst1; export DB2INSTANCE
INSTHOME=/export/home/DB2inst1;export INSTHOME
PATH=$PATH:$INSTHOME/sqllib/bin:$INSTHOME/sqllib/adm:$INSTHOME/sqllib/misc
export PATH
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INSTHOME/sqllib/lib;export LD_LIBRARY_PATH
THREADS_FLAG=native;export THREADS_FLAG
uvodbc.config file
Use the uvodbc.config file to specify the DSNs for the databases that you are connecting to through ODBC.
<name>
DBMSTYPE = ODBC
name is the ODBC data source name (DSN), this should be the same name as specified in the .odbc.ini file. The spaces on either side of the equal sign are required.
[ODBC DATA SOURCES]
<localuv>
DBMSTYPE = UNIVERSE
network = TCP/IP
service = uvserver
host = 127.0.0.1
<Sybase1>
DBMSTYPE = ODBC
<Sybase2>
DBMSTYPE = ODBC
<Oracle8>
DBMSTYPE = ODBC
<Informix>
DBMSTYPE = ODBC
<DB2>
DBMSTYPE = ODBC
A copy of the uvodbc.config file is also placed in each WebSphere DataStage project directory. For example, the default path for projects on Linux® is/opt/IBM/WDIS/Server/Projects/. This is useful where you configure a data source that is known to some projects but not others. By default, WebSphere DataStage searches the current project directory for a uvodbc.config file and, if it finds one, uses this in preference to the file in $DSHOME. If you alteruvodbc.config after creating projects you should copy the edited file to the project directories.
.odbc.ini file
The .odbc.ini files gives information about connecting to the database (wire protocol drivers) or the database client (non-wire protocol drivers). If your system uses a mix of drivers, your .odbc.ini file will contain a mix of entry types.
Configuration examples for the various platforms are provided in $DSHome/branded_odbc/IBM_Tools in the odbc.ini file.