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:
- dsenv
- .odbc.ini ( Note that this file is .odbc.ini not only odbc.ini
- uvodbc.config
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)
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.
- 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 |
The following example shows some typical entries for commonly used databases.
#Sybase 11 setupLANG=Export LANGSYBASE=/export/home/sybase/sybase;export SYBASELD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SYBASE/lib:/usr/lib:/lib;export LD_LIBRARY_PATH# Oracle 9iORACLE_HOME=/space/oracle9iLD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib:$ORACLE_HOME/rdbms/lib;export LD_LIBRARY_PATHORACLE_SID=WSMK5export ORACLE_HOME ORACLE_SID#Informix XPS 9.3INFORMIXDIR=/space/informix; export INFORMIXDIRINFORMIXSERVER=solnew2.1;export INFORMIXSERVERONCONFIG=onconfig.solnew2; export ONCONFIGLD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INFORMIXDIR/lib:$INFORMIXDIR/lib/esql:$INFORMIXDIR/lib/cli;export LD_LIBRARY_PATHLANG=Cexport LANG#DB2 Version 9DB2DIR=/opt/IBM/InformationServer/DB2;export DB2DIRDB2INSTANCE=DB2inst1; export DB2INSTANCEINSTHOME=/export/home/DB2inst1;export INSTHOMEPATH=$PATH:$INSTHOME/sqllib/bin:$INSTHOME/sqllib/adm:$INSTHOME/sqllib/miscexport PATHLD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INSTHOME/sqllib/lib;export LD_LIBRARY_PATHTHREADS_FLAG=native;export THREADS_FLAG
Stop and restart the WebSphere DataStage server whenever you edit dsenv.
uvodbc.config file
Use the uvodbc.config file to specify the DSNs for the databases that you are connecting to through ODBC.
Entries in uvodbc.config have the following form:
<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.
The following example shows a typical uvodbc.config file:
[ODBC DATA SOURCES] <localuv>DBMSTYPE = UNIVERSEnetwork = TCP/IPservice = uvserverhost = 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.
- aix_4.2.odbc.ini for AIX® systems.
- sun_4.2.odbc.ini for Solaris systems.
- linux_4.2.odbc.ini for Linux® systems.
These files give the minimum parameter settings required to create a working odbc.ini file. They each give configurations for the following databases:
- DB2® on Linux, UNIX®, Windows®, and AS400
- Oracle on Linux and UNIX
- Informix® on Linux, UNIX, and Windows
- Microsoft® SQL Server 2000 connection
- Sybase on Windows
No comments:
Post a Comment