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.
Step 1: Download the Installer Archive
- Visit the OpenLink ODBC Lite Edition Driver Download Page to download the appropriate ODBC driver for SQL Server.
- Alternatively,
curl
can be used to download the installer archives andinstall.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
- Log onto the target machine for the installation and create a suitable OpenLink installation directory
{OPENLINK_INSTALL}
. - Copy all the downloaded components to the
{OPENLINK_INSTALL}
directory, which are theinstall.sh
,odbc_admin.taz
,sql_lt.taz
files. - Install OpenLink components using the
install.sh
shell script with the command –
install.sh
- Take care to enter correct information when prompted pertaining to ports, passwords, etc., and ensure that you note these down for future use.
- The installation should finish without error.
Step 3: Configuration
- To set up the OpenLink environment, from the
{OPENLINK_INSTALL}
run the command –
. ./openlink.sh
- Place the License file (
sql_lt.lic
) either purchased or obtained during the evaluation download process in the{OPENLINK_INSTALL}/bin
directory. - Start the OpenLink License Manager (
oplmgr
) by going to the{OPENLINK_INSTALL}/bin
directory and running the command –
./oplmgr +start
Step 4: Create Data Source Name (DSN)
- Open the file
{OPENLINK_INSTALL}/bin/odbc.ini
with a suitable text editor such asvi
. - 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
- 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>
- 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>
- The SQL Server ODBC Driver is now ready for use with target ODBC application(s).
Using the unixODBC Runtime Environment
- 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., itsisql
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>