Installation Guide: OpenLink SQL Server ODBC Connector (Driver) for Linux (Enterprise Edition)

This installation guide walks you through the installation of the Enterprise Edition ODBC Driver for Microsoft SQL Server to a Personal or Application Server host functioning as a client to a SQL Server Database.

SQL Server Enterprise Architecture

Step 1: Download the Installer Archive

  1. Visit the OpenLink ODBC Enterprise Edition Driver Download Page to download the appropriate ODBC driver for SQL Server.
  2. Alternatively, curl can be used to download the installer archives and install.sh script directly:
curl -O https://download3.openlinksw.com/uda/components/misc/install.sh
curl -O https://download3.openlinksw.com/uda/components/9.0/x86_64-generic-linux-glibc25-64/oplodbc.taz
curl -O https://download3.openlinksw.com/uda/components/9.0/x86_64-generic-linux-glibc25-64/sql_mv.taz
curl -O https://download3.openlinksw.com/uda/components/9.0/x86_64-generic-linux-glibc25-64/oplrqb.taz   
curl -O https://download3.openlinksw.com/uda/components/9.0/x86_64-generic-linux-glibc25-64/odbc_admin.taz

Step 2: Installation

  1. Log onto the target machine for the installation and create a suitable OpenLink installation directory {OPENLINK_INSTALL}.
  2. Copy all the downloaded components to the {OPENLINK_INSTALL} directory, which are the install.sh, oplrqb.taz, oplodbc.taz, odbc_admin.taz, sql_mv.tazfiles.
  3. Install OpenLink components using the install.sh shell script with the command –
 install.sh
  1. Take care to enter correct information when prompted pertaining to ports, passwords, etc., and ensure that you note these down for future use.
  2. The installation should finish without error.
Step 3: Configuration
  1. To set up the OpenLink environment, from the {OPENLINK_INSTALL} run the command –
. ./openlink.sh
  1. Place the License file(s) (oplrqb.lic, sqlserver.lic) either purchased or obtained during the evaluation download process in the {OPENLINK_INSTALL}/bindirectory.
  2. Start the OpenLink License Manager (oplmgr) by going to the {OPENLINK_INSTALL}/bin directory and running the command –
./oplmgr +start
  1. Start the OpenLink Request Broker (oplrqb) by going to the {OPENLINK_INSTALL}/bin directory and running the command –
./oplrqb -v     ;;; To start in background mode
or
./oplrqb -fd    ;;; To start in foreground debug mode

Step 4: Create Data Source Name (DSN)

  1. Open the file {OPENLINK_INSTALL}/bin/odbc.ini with a suitable text editor such as vi.
  2. Locate and edit the sample OpenLink Multi-Tier ODBC data source (DSN) called [OpenLink] created during the installation process and edit as follows –
[OpenLink]
Driver          = {OPENLINK_INSTALL}/lib/oplodbc.so
ServerType      = SQL Server
Host            = localhost:5000   ;;; replace "localhost" with the hostname the OpenLink Broker (oplrqb) runs on if not on the same machine
Database        = my_database
Options         = -H {hostname} -P {port number} -S {servername}    ;;; connection attributes for the target SQL Server instance
Username        = sa
Password        = **********
FetchBufferSize = 99
ReadOnly        = no
DeferLongFetch  = no
JetFix          = no
WideAsUTF16 = Y
Description     = Sample SQL Server Multi-Tier Connection

Step 5: Test Connection

Using the iODBC Runtime Environment
  1. Use the OpenLink iODBC iodbctest sample tool packaged with the HTTP-based OpenLink ODBC Administrator as follows to make a test connection –
$ cd {OPENLINK_INSTALL}
$. ./openLink.sh 
$ iodbctest "DSN=OpenLink;UID=sa;PWD=xxxxxxxx"
iODBC Demonstration program
This program shows an interactive SQL processor
Driver Manager: 03.52.0507.0105
Driver: 08.02.1217 OpenLink Generic ODBC Driver (oplodbc.so) 

SQL>
  1. SQL statements can now be issued directly against the target database from the SQL> prompt –
SQL> select count(*) from orders

(count(*))       
-----------------
23               

result set 1 returned 1 rows.

SQL>
  1. The SQL Server ODBC Driver is now ready for use with target ODBC application(s).
Using the unixODBC Runtime Environment
  1. When using the unixODBC Driver Manager, the WideAsUTF16 = Y parameter needs to be added to the target ODBC DSN, if not in place already, to enable successful connections with applications built using the unixODBC SDK, e.g., its isql test application –
$ isql OpenLink sa xxxxxxxx
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| echo [string]                         |
| quit                                  |
|                                       |
+---------------------------------------+
SQL> select count(*) from orders              
+------------------+
| (count(*))       |
+------------------+
| 23               |
+------------------+
SQLRowCount returns -1
1 rows fetched
SQL>

Additional Information