To use an ODBC data source on UNIX or Linux® to
connect to a supported data source, you must configure the environment
to locate the .odbc.ini file which contains the
references to data source, the connectivity libraries, and their accompanying
Driver Manager libraries.
To review supported ODBC data
sources, see the IBM
Software Product Compatibility Reports page
(www.ibm.com/support/docview.wss?uid=swg27047186).
After
configuring for the ODBC connections, you must create connections
to the data sources in IBM® Cognos® Administration. For information,
see the IBM Cognos Administration and Security Guide.
If
your database vendor does not supply a driver manager, you can use
unixODBC or iODBC, depending on your operating system.
On Linux operating systems, the unixODBC
package provided with the operating system provides the ODBC Driver
Manager. You must install unixODBC version 2.2.11 or later before
you can set up data source connections. To verify the version you
have installed, use the following command: odbcinst --version.
Check which version of unixODBC is required for the database you are
using, and ensure you use that version.
On UNIX operating systems, the open source iODBC
driver manager is provided as part of the IBM Cognos installation.
Procedure
- Create an environment variable to specify the location
of the .odbc.ini file.
For example,
export
ODBCINI=/usr/local/etc/.odbc.ini
-
Set the appropriate library path environment variable to specify the location of the 32-bit
connectivity libraries and Driver Manager for your database.
The following table lists the environment variables for each operating system that must specify
the location of the driver manager libraries.
Table 1. Environment variables for your operating system
Operating system
|
Environment variable
|
AIX®
|
LIBPATH
|
Solaris and Linux
|
LD_LIBRARY_PATH
|
- If your database vendor does not provide a driver manager,
set the library path to include the path the local driver manager.
On UNIX, iODBC is provided as part of the IBM
Cognos installation. The library files are located in the
install_location/bin directory. Your library path should
already contain the install_location/bin directory.
For
example,
LIBPATH=/usr/IBM/cognos/bin:$LIBPATH
On Linux, the unixODBC
package provides the required driver manager libraries.
For
example,
LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH
What to do next
If you are using multiple ODBC sources on UNIX or Linux operating
systems, you may encounter dependencies of library files with common
names but different implementations for both the connectivity and
the driver manager. In a scenario where one ODBC source validates
while another fails based on a dependency, please contact Customer
Support. Using a common .odbc.ini may result
in having incompatible entries for different driver managers. To resolve
the problem, review the structure requirements between the driver
managers you are using and try to use syntax that is common between
the conflicting driver managers.