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 Cognos Analytics on
Premises 12.0.x Supported Software Environments
(https://www.ibm.com/support/pages/node/6966712).
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.
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, you must have an ODBC driver
manager on your system. You can then specify the @DRIVERMANAGER
parameter to access
the driver manager.
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
|
Linux
|
LD_LIBRARY_PATH
|
- Specify the driver manager for your operating system.
-
On UNIX, you must have an ODBC driver manager on your
system. You then specify @DRIVERMANAGER=<driver manager name> in the
connection string to override the default ODBC driver manager. Here are some examples:
- To load the iODBC driver manager, type
@DRIVERMANAGER=iodbc
- To load the unixODBC driver manager, type
@DRIVERMANAGER=unixodbc
- To load the Postgres DataDirect ODBC driver manager, type
@DRIVERMANAGER=datadirect
-
On Linux, if your database vendor does not provide a
driver manager, set the library path to include the path to your local unixODBC package, which
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.