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

This installation guide walks you through the installation of the Lite 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 Lite Architecture

Step 1: Download the Installer Archive

  1. Visit the OpenLink ODBC Lite 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/sql_lt.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, odbc_admin.taz, sql_lt.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 (sql_lt.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}/bindirectory and running the command –
./oplmgr +start

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 [sql_lite] created during the installation process and edit as follows –
[sql_lite]
Driver          = {OPENLINK_INSTALL}/lib/sql_lt_mt.so
ServerType      = SQL Server
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 Single-Tier Connection

Step 5: Test Connection to DSN

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: 09.02.1217 OpenLink Generic ODBC Driver (sql_lt_mt.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 sql_lite 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