ODBC Installation and Validation on UNIX® Systems
The following sections provide detailed information about ODBC installation and validation on UNIX® and related operating systems:
-
Performing a Stand-alone Driver Installation — installing the InterSystems ODBC client driver and supported driver manager on UNIX®.
-
SQL Gateway Drivers for UNIX® and Related Platforms — describes libraries required to run the SQL Gateway with third party drivers.
-
InterSystems ODBC Client Files — specific file names of some of important installed components.
-
Troubleshooting for Shared Object Dependencies — how to validate dependencies on shared objects.
-
iODBC Driver Manager Custom Installation — installing and configuring the iODBC driver manager, and configuring PHP for iODBC.
Performing a Stand-alone Driver Installation
By default, a full ODBC installation is performed with a local InterSystems IRIS installation. If you perform a custom installation (as described in the Installation Guide), you can select the “SQL client only” option to install only the client access components (ODBC client driver).
In addition, however, a stand-alone installer is provided for InterSystems ODBC. To use this installer:
-
Create the directory where you wish to install the client, such as /usr/irisodbc/.
-
Copy the appropriate zipped tar file into the directory that you just created.
The ./dist/ODBC/ directory contains zipped tar files with names like the following:
ODBC-release-code-platform.tar.gzwhere release-code is a release-specific code (that varies among InterSystems versions and releases) and platform specifies the operating system that the ODBC client runs on.
-
Go to the directory you created and manually unpack the .tar file, as follows:
# gunzip ODBC-release-code-platform.tar.gz # tar xvf ODBC-release-code-platform.tarThis creates bin and dev directories and installs a set of files.
-
Run the ODBCinstall program, which will be in the directory that you created. This program creates several sample scripts and configures irisodbc.ini under the mgr directory. For example:
# pwd /usr/irisodbc # ./ODBCinstall
In some releases, the ./dist/ODBC/ directory contains the following command to display the platform name that identifies the file you need:
# ./cplatname identify
This command is not present in releases where it is not required.
InterSystems ODBC Client Files
Depending on your configuration needs, it may be useful to know the specific file names of some of the installed components. In the following lists, install-dir is the InterSystems installation directory (the path that $SYSTEM.Util.InstallDirectory() returns on your system).
The install-dir/bin/ directory contains the following driver managers:
-
libiodbc.so — The iODBC driver manager, which supports both 8-bit and 32–bit Unicode ODBC APIs.
-
libodbc.so — The unixODBC driver manager, for use with the 8-bit and 16–bit Unicode ODBC APIs.
Between releases of the ODBC specification, various data types such as SQLLen and SQLULen changed from being 32-bit values to 64-bit values. While these values have always been 64-bit on iODBC, they have changed from 32-bit to 64-bit on unixODBC. As of unixODBC version 2.2.14, the default build uses 64-bit integer values. InterSystems drivers are available for both 32-bit and 64-bit versions of unixODBC.
InterSystems no longer distributes ODBC 2.5 client drivers, but the ODBC 3.5 versions will convert 3.5 requests to 2.5 automatically. The install-dir/bin/ directory contains the following versions (*.so or *.sl):
-
libirisodbc35 — supports 8-bit ODBC 3.5
-
libirisodbciw35 — supports UTF-32 Unicode ODBC 3.5
-
libirisodbciw.dylib — supports UTF-32 Unicode ODBC for MAC OS
-
libirisodbcuw35 — supports 8-bit and UTF-16 Unicode ODBC 3.5 for unixODBC
-
libirisodbcur6435 — supports 8-bit and UTF-16 Unicode ODBC 3.5 for 64-bit unixODBC
SQL Gateway Drivers for UNIX® and Related Platforms
UNIX ODBC drivers are compiled against a specific driver manager (iODBC or unixODBC). For example, the InterSystems ODBC driver comes in versions for each driver manager (see InterSystems ODBC Client Files). These drivers require support libraries that are linked against the same driver manager. InterSystems supplies several odbcgateway libraries that are suitable for different third party drivers. The <install-dir>/bin/ directory contains the following versions of the shared objects used by the InterSystems SQL Gateway. This enables you to connect from InterSystems IRIS to other ODBC client drivers. These files are not installed by default if you perform a stand-alone ODBC installation.
linked against iODBC driver manager
-
odbcgateway.so — supports 8-bit ODBC
-
odbcgatewayiw.so — supports Unicode ODBC.
linked against unixODBC driver manager
-
odbcgatewayu.so — supports 8-bit ODBC.
-
odbcgatewayur64.so — supports 8-bit ODBC for 64-bit unixODBC
If you are installing a third party database driver compiled with unixODBC support (for example, the MS SQL Server ODBC driver), you must back up odbcgateway.so and rename odbcgatewayur64.so to odbcgateway.so. This change must be made for every upgrade, since the upgrade will overwrite odbcgateway.so.
For more information, see “Using an InterSystems Database as an ODBC Data Source on UNIX®”.
When using third-party shared libraries on a UNIX® system, LD_LIBRARY_PATH must be defined by setting the InterSystems IRIS LibPath parameter (see “LibPath” in the Configuration Parameter File Reference). This is a security measure to prevent unprivileged users from changing the path.