Sie sind auf Seite 1von 8

Attunity ODBC Thin Client

Installation Guide Release 5.1


AIS-5100-INSTODBC

March 2008

ODBC Thin Client Installation and Users Guide, Release 5.1 AIS-5100-INSTODBC Copyright 2008 Attunity. All rights reserved. Primary Author: David Goldman

The Programs (which include both the software and documentation) contain proprietary information; they are provided under a license agreement containing restrictions on use and disclosure and are also protected by copyright, patent, and other intellectual and industrial property laws. Reverse engineering, disassembly, or decompilation of the Programs, except to the extent required to obtain interoperability with other independently created software or as specified by law, is prohibited. The information contained in this document is subject to change without notice. If you find any problems in the documentation, please report them to us in writing. This document is not warranted to be error-free. Except as may be expressly permitted in your license agreement for these Programs, no part of these Programs may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose. If the Programs are delivered to the United States Government or anyone licensing or using the Programs on behalf of the United States Government, the following notice is applicable: U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the Programs, including documentation and technical data, shall be subject to the licensing restrictions set forth in the applicable Attunity license agreement, and, to the extent applicable, the additional rights set forth in FAR 52.227-19, Commercial Computer Software--Restricted Rights (June 1987). The Programs are not intended for use in any nuclear, aviation, mass transit, medical, or other inherently dangerous applications. It shall be the licensee's responsibility to take all appropriate fail-safe, backup, redundancy and other measures to ensure the safe use of such applications if the Programs are used for such purposes, and we disclaim liability for any damages caused by such use of the Programs.

The Programs may provide links to Web sites and access to content, products, and services from third parties. Attunity is not responsible for the availability of, or any content provided on, third-party Web sites. You bear all risks associated with the use of such content. If you choose to purchase any products or services from a third party, the relationship is directly between you and the third party. Attunity is not responsible for: (a) the quality of third-party products or services; or (b) fulfilling any of the terms of the agreement with the third party, including delivery of products or services and warranty obligations related to purchased products or services. Attunity is not responsible for any loss or damage of any sort that you may incur from dealing with any third party.

Contents
Thin ODBC Client
Installation................................................................................................................................................. 1-1 Working with the Thin ODBC Client .................................................................................................. 1-2

iii

iv

Thin ODBC Client


The ODBC Thin Client kit contains the following:

Windows kit:

thinodnav32.dll nav32.dll nvbase.dll nav_util ODBC Setup Wizard

Unix kit (tar file):


thinapi.so(sl) thinapi.a libnvbaseshr.so libnavshr.so libodnavshr.so navcli.h odbcinc.h nav_util aisconf.h ThinODBCReadme.txt

Installation
The following describes how to install the ODBC thin client: To install the Windows kit 1. Double-click the ODBC installation wizard. The file name for the 32-bit kit is AIS_ 51011_ODBC_Thin_Client_windows.exe. The file name for the 64-bit kit is AIS64_51011_ODBC_Thin_Client_windows.exe.
2.

Follow the directions in the wizard to install the thin client.

Thin ODBC Client 1

To install the UNIX kit 1. Create an empty directory and give it a name that relates to this product (for example, /usr/attunity/thinodbc).
2. 3.

Extract the installation kit to the directory you created. The name of the kit depends on the type of UNIX system you are working with. Add the directory you created in the first step to the LD_LIBRARY_PATH/SHLIB_ PATH/LIBPATH environment variable. For example, you can enter the following: setenv LD_LIBRARY_PATH /usr/attunity/thinodbc:$LD_LIBRARY_ PATH

4. 5.

Link your ODBC application with thinapi.a or thinapi.so. If you are using a third-party ODBC driver manager (or another ODBC client application), point the driver manager or application to the full path of the thinapi.so.

Working with a Thin ODBC Client


You can work with the thin ODBC client in one of the following ways:

Working with the Provider using a Driver Manager Working with the Thin ODBC Client Directly

Working with the Provider using a Driver Manager


Most packaged applications that work with ODBC clients, bundle an ODBC driver manager and use it to connect to a specific driver. The driver manager bridges the different ODBC versions and provides for an easy ODBC data source configuration similar to the Microsoft file-based DSN. The following describes how to configure the ODBC driver manager on most UNIX platforms:
1.

Locate the driver manager definition file. This file is provided with the name ODBCINI. It is located at ~/.odbc.ini (a file called .odbc.ini in the user's home directory). In the ODBCINI file, add the AIS data source to the list of data sources at the beginning of the file. Add a section that describes the AIS data source to the definition file.

2. 3.

The following shows an example of what should be added to the ODBCINI file.
[ODBC Data Sources] ... AIS= Attunity Connect ... [AIS] Driver=/disk2/users/ais/navroot/lib/thinapi.so Description=Attunity Connect ODBC access to NAVDEMO BindURL=10.10.22.134:8990/Navigator DefTDPName=NAVDEMO #Username=name #Password=pass ...

Thin ODBC Client 2

Note:

The ODBCINI envirionment variable should point to the full path of the odbc.ini file.

Working with the Thin ODBC Client Directly


To work with the Thin ODBC client, you can use a File DSN. The following describes a File DSN. A File DSN provides information for establishing an ODBC connection to a data provider. Its file extension is .dsn. This file is formatted in Windows INI format. It should start with a section header, such as [ODBC], which gives the DSN name. The File DSN can contain:

All the Attunity Connect connection sting parameters, such as Binding, BindURL, Database, defaulttdp and, DSNPasswords Environment parameters that override the values in the binding environment on the client (Thin ODBC client). To do this, enter the full environment parameter path. For Example, debug/generalTrace=true

Location: (Optional) The location indicates where the Thin ODBC client is installed. LocalQp: A Boolean parameter, if set to true indicates that the Thin ODBC client works in local QP mode and not Remote QP, which is the default.
Note:

Location and LocalQp parameters can be entered in the connection string as well as the File DSN.

The following is an example of a File DSN, followed by a code sample using the DSN. File DSN Example This File DSN is locaed in C:\OdbcThin\DSNs\myfiledsn.dsn.
[ODBC] DRIVER=Attunity Connect Driver BindURL=mymachine.acme.com:2551 LocalQp=true debug/generalTrace=true

FILE DSN Code Sample The following is code sample for this File DSN:
------------------------------/* Allocate Environment Handle */ rc = SQLAllocEnv(&hEnv); /* allocate connection handle */ rc = SQLAllocConnect(hEnv, &hConn); /* Connect */ strcpy(ConnString,

Thin ODBC Client 3

"FileDSN=C:\\OdbcThin\\DSNs\myfiledsn.dsn;"); rc = SQLDriverConnect(hConn, NULL, ConnString, cdConnString, szCompleteConnStr, 355, NULL, SQL_DRIVER_NOPROMPT);

Thin ODBC Client 4

Das könnte Ihnen auch gefallen