Easysoft ODBC-JDBC Gateway User's Guide - Installation

Installing the Easysoft ODBC-JDBC Gateway

This section explains how to install, license and remove the Easysoft ODBC-JDBC Gateway on supported Windows and Unix platforms.

The Windows installation can be carried out by anyone with local administrator privileges for the target machine.

The Unix installation assumes you are, or have available for consultation, a system administrator.

Chapter Guide

Obtaining the Easysoft ODBC-JDBC Gateway

There are three ways to obtain the Easysoft ODBC-JDBC Gateway:

Select Download from the Easysoft ODBC-JDBC Gateway section of the website and then choose the platform release that you require.

If you have not already done so, you will need to register at the web site to download Easysoft software.

Change to the pub/odbc-jdbc-gateway directory and then choose the platform release that you require.

What to install

The name of the Easysoft ODBC-JDBC Gateway distribution file varies from platform to platform, but is of the form:

¯ OR ¯

where "x" is the major version number, "y" is the minor version number and "z" is the build index, which is incremented when minor changes are made.

"platform" will vary depending on the operating system distribution you require.


NB

Select the highest release available for your platform within your licensed major and minor version number (installing software of a different major or minor version number requires a new Easysoft license).


Unix filenames may also be suffixed with .gz for a "gzipped" archive, .bz2 for a "bzip2ed" archive, or .Z for a "compressed" archive.

You can now download a file and begin the installation process.


Caution!

If you do uninstall the Easysoft ODBC-JDBC Gateway before upgrading, you should first back up any configuration data that you still need, as uninstalling some Easysoft products will result in this information being deleted (license details remain in place).


Refer to the section relevant to your platform to continue:

Installing on Windows

Follow the on screen instructions.

Updating Files That are in Use

To avoid rebooting your computer, the Easysoft ODBC-JDBC Gateway installer prompts you when files that it needs to update are in use by another application or service. This frees the locked files and allows the installation to complete without a system restart.

On Windows Vista and later, the Easysoft ODBC-JDBC Gateway installer uses the Restart Manager to locate the applications that are using files that need updating. These applications are displayed in the Files in Use dialog box. To avoid a system restart, choose Automatically close applications and attempt to restart them after setup is complete. The Easysoft ODBC-JDBC Gateway installer then uses the Restart Manager to try to stop and restart each application or service in the list. If possible, the Restart Manager restores applications to the same state and with the same data that they were in before it shut them down.

On earlier versions of Windows, when the Files in Use dialog is displayed, manually shut down each application in the list and then click Retry to avoid a system restart.

Licensing on Windows

 The install program starts the Easysoft License Manager (documented in the Licensing Guide).

 The following types of license are available:

Figure 3: The License Manager window

1.  Enter your contact details.

 You MUST enter the Name, E-Mail Address and Company fields.

 The Telephone and Facsimile fields are important if you require Easysoft to contact you by those methods.

2.  Click Request License.

 You are asked for a license type.

3.  For a trial license, click Time Limited Trial and then click Next.

 The License Manager asks what software you are licensing:

 Select Easysoft ODBC-JDBC Gateway from the drop-down list and then click Next.

¯ OR ¯

 If you have obtained an authorization code for a purchased license, select Non-expiring License and then click Next.

 The License Manager requests an authorization code.

4.  Enter the authorization code and then click Next.

 The License Manager displays a summary of your details and allows you to choose the method of applying for your license.

5.  Choose On-line Request if your machine is connected to the internet and can make outgoing connections to port 8884.

 The License Manager then transmits a network packet to the license server at Easysoft. The whole process is automatic and you can proceed to step 6.


NB

Only your license request identifier and contact details as they are displayed in the main License Manager screen are sent to Easysoft.


 The remaining three options (Email Request, Print Request and View Request) are all ways to obtain a license if your machine is offline (i.e. does not have a connection to the internet).

 Each of these methods involves providing Easysoft with information including your machine number (a number unique to your machine) and then waiting to receive your license key.

 Instead of emailing, faxing or telephoning your details to Easysoft, you can enter them directly at Easysoft's web site and your license key will be emailed to you automatically.

 To use this method, click View Request, and then visit:

(trial licenses)

(purchased licenses)

 In the Licensing page, enter your machine number (and authorization code for purchased license), click Submit and your license key will be emailed to you.

 When you receive the license key, you can activate it either by double-clicking the email attachment or by clicking Enter License on the License Manager main screen and pasting the license key into the dialog box.

 A message is displayed, telling you how many licenses have been added.


NB

If you use the Email Request option, the license key is emailed to the email address as displayed on the License Manager main screen, not the from: address of your email.


6.  Click Finish in the License Manager.

 The installation is complete.

 A new Programs>Easysoft>ODBC-JDBC Gateway program group is added with links to this manual in PDF format, the Easysoft web site, a Getting Started Guide, Licensing documentation, and the Easysoft ODBC-JDBC Gateway News Group.

Validating the installation

The version number and installation details of the Easysoft ODBC-JDBC Gateway can be verified by running the ODBC Data Source Administrator.

1.  In Control Panel, double-click Administrative Tools and then Data Sources (ODBC).

2.  Select the Drivers tab and the Easysoft ODBC-JDBC Gateway installation details are displayed:

Figure 4: The ODBC Data Source Administrator Drivers tab

Defining which JVM to use

The Easysoft ODBC-JDBC Gateway uses a JVM to load the target JDBC driver. When you install the Easysoft ODBC-JDBC Gateway, Setup searches for a compatible JVM. To check which JVM the Easysoft ODBC-JDBC Gateway is using, run Programs>Easysoft>ODBC-JDBC Gateway>Configure Java Interface.

You should also run Configure Java Interface if:

 You ran Easysoft ODBC-JDBC Gateway Setup without a JVM being installed.


NB

To obtain a JVM, download the JRE from either the Oracle web site at http://www.oracle.com/technetwork/indexes/downloads/index.html. or the IBM web site at http://www-106.ibm.com/developerworks/java/jdk/. The JVMs included with these JREs have been tested with the Easysoft ODBC-JDBC Gateway.



64-bit Windows

If you want to use a 64-bit ODBC application, you need to use the 64-bit Easysoft ODBC-JDBC Gateway with a 64-bit JVM. The 64-bit Sun JVM is available to download from http://www.oracle.com/technetwork/indexes/downloads/index.html. The 64-bit Sun JVM is installed under the Program Files directory.

If you want to use a 32-bit ODBC application, you need to use the 32-bit Easysoft ODBC-JDBC Gateway with a 32-bit JVM. The 32-bit Sun JVM is available to download from http://www.oracle.com/technetwork/indexes/downloads/index.html. The 32-bit Sun JVM is installed under the Program Files(x86) directory.

Note that whether you use a 32-bit or 64-bit JVM is irrelevant to the target JDBC driver.


1.  Start Programs>Easysoft>ODBC-JDBC Gateway>Configure Java Interface.


64-bit Windows

To configure the Easysoft ODBC-JDBC Gateway for use with a 64-bit JVM, run Programs>Easysoft>ODBC-JDBC Gateway>Configure Java Interface (64-bit). To configure the Easysoft ODBC-JDBC Gateway for use with a 32-bit JVM, run Programs>Easysoft>ODBC-JDBC Gateway>Configure Java Interface.


Figure 5: The Setup Java Interface dialog box

 The JVM that the Easysoft ODBC-JDBC Gateway is using is displayed in the JVM Library Path box.

If the JVM Library Path box is empty or you want to use a different JVM, follow these steps:

2.  If you know the location of the JVM that you want the Easysoft ODBC-JDBC Gateway to use, in the JVM Library Path box, type the path of the JVM. For example:

 C:\Java\jvm.dll

Alternatively, to browse for the JVM, click the ... button. In the Select JVM dialog box, click the Browse button. In the Known JVM Libs list, double-click the JVM.

Figure 6: The Select JVM dialog box

¯ OR ¯

 If you are unsure where the JVM is installed, click the ... button. In the Select JVM dialog box, click the Search button and then browse to the directory you want to search. The search results are displayed in the Known JVM Libs list. In this list, double-click the JVM that you want to use. If the list is empty, search a different directory for JVMs.

3.  To test whether the JVM is compatible with the Easysoft ODBC-JDBC Gateway, click the Test and Save if OK button.

 If the test results show that the JVM is incompatible and you have more than one JVM installed, click Cancel to exit Configure Java Interface. Start Configure Java Interface, click the ... button and then double-click a different JVM. Click the Test and Save if OK button to check the new JVM.

 If your JVM is incompatible and you do not have another JVM installed, you need to obtain a different one.

Setting JVM Options

 Usually, you do not need to change any JVM configuration options to use a JVM with the Easysoft ODBC-JDBC Gateway. If you do need to specify any JVM settings, the Easysoft ODBC-JDBC Gateway provides the following ways to do this:

 On Windows:

1.  Start Programs>Easysoft>ODBC-JDBC Gateway>Configure Java Interface.


64-bit Windows

To set options for a 64-bit JVM, run Programs>Easysoft>ODBC-JDBC Gateway>Configure Java Interface (64-bit). To set options for a 32-bit JVM, run Programs>Easysoft>ODBC-JDBC Gateway>Configure Java Interface.


2.  In the JVM Options box, type the JVM options.

On Unix:

JVMOPTIONS = jvmoption

 Separate multiple JVM options with a space. For example:

 -Xmx2048M -Xms1024M

For more information about the available options, see the documentation for your JVM.

JVM options specified in the Configure Java Interface dialog box or odbcinst.ini apply to all Easysoft ODBC-JDBC Gateway data sources. On Unix, you can override the global JVM options for a particular data source, by setting the JVM_OPTIONS environment variable. For example:

JVM_OPTIONS="-Xmx2048M -Xms1024M"

export JVM_OPTIONS

 

Uninstalling on Windows

This section explains how to remove the Easysoft ODBC-JDBC Gateway from your system.

Removing Easysoft ODBC-JDBC Gateway Data Sources

 Easysoft ODBC-JDBC Gateway data sources are not removed when you uninstall. You therefore do not need to recreate your Easysoft ODBC-JDBC Gateway data sources if you reinstall or upgrade. If you do not want to keep your Easysoft ODBC-JDBC Gateway data sources, use ODBC Administrator to remove them, before uninstalling the Easysoft ODBC-JDBC Gateway.

1.  In Control Panel, double-click Administrative Tools and then Data Sources (ODBC).

2.  Select the data source in the ODBC Administrator and click the Remove button.


64-bit Windows

There is both a 32-bit and a 64-bit version of ODBC Administrator. The 64-bit ODBC Administrator is located in Control Panel under Administrative tools. To access the 32-bit ODBC Administrator, in the Windows Run dialog box, type:

%windir%\syswow64\odbcad32.exe

If you do not see the data source in the 64-bit ODBC Administrator, look for it in the 32-bit ODBC Administrator.


Removing the Easysoft ODBC-JDBC Gateway

1.  Do one of the following:

2.  Do one of the following:

 Any licenses you obtained for the Easysoft ODBC-JDBC Gateway and other Easysoft products are held in the Windows registry.

 Note that your licenses are not removed when you uninstall, so the product does not need to be relicensed if you reinstall or upgrade.

 

Installing on Unix

These instructions show how to install the Easysoft ODBC-JDBC Gateway on Unix platforms.

Before you install

Requirements

The installation script has a minimal set of requirements:

grep, awk, test, cut, ps, sed, cat, wc, uname, tr, find, echo, sum, head, tee, id

If you are missing any of these commands, they can generally be obtained from the Free Software Foundation. As some machines have a broken tee command, the distribution comes with a tee replacement.

1. Register the Easysoft ODBC-JDBC Gateway Client with unixODBC.

2. Create the demo data source in the SYSTEM odbc.ini file.

3. Update the dynamic linker entries (only some platforms).

If you are not root, these tasks will have to be done manually later. Easysoft recommend you install all Easysoft ODBC-JDBC Gateway components as the root user.

What you can install

This Easysoft ODBC-JDBC Gateway distribution contains:

You will need an ODBC Driver Manager to use the Easysoft ODBC-JDBC Gateway Client from your applications. Easysoft ODBC-JDBC Gateway distributions contain the unixODBC Driver Manager (see http://www.unixodbc.org). Most (if not all) Unix applications and interfaces (for example Perl DBD::ODBC, PHP, Python and so on) support the unixODBC Driver Manager. You do not have to install the unixODBC Driver Manager in this distribution as you can use an already installed unixODBC (whether that was installed with another Easysoft product, from your Operating System Vendor or even if you built it yourself). However, Easysoft ensure the unixODBC distributed with Easysoft ODBC Drivers has been tested with our drivers, so we recommend you use it.

If you choose to use an already installed unixODBC Driver Manager, the installation script will attempt to locate it. The installation looks in the standard places but if you have installed it in a non-standard location you will need to provide that location to the installation script when it prompts you. The installation primarily needs unixODBC's odbcinst command to install drivers and any data sources.

Where to install

This installation needs a location for the installed files. The default is /usr/local.

At the start of the installation you will be prompted for an installation path. All files are installed in a subdirectory of your specified path called "easysoft". For example, if you pick the default of /usr/local, the Easysoft ODBC-JDBC Gateway will be installed in /usr/local/easysoft and below.

If you choose an install path different from the default then the installation will try to symbolically link /usr/local/easysoft to the easysoft in your chosen path. This allows us to distribute binaries with built in dynamic linker run paths. If you are not root or the path /usr/local/easysoft already exists and is not a symbolic link this will fail (see later for how this may be corrected manually). You should note that you cannot license Easysoft products until /usr/local/easysoft exists either as a symbolic link to your chosen install path or as the install path itself.

Changes made to your system

This installation installs files in subdirectories of the path requested at the start of the installation and depending on what is installed, a few changes may be made to your system as outlined below:

1.  If you choose to install the Easysoft ODBC-JDBC Gateway into unixODBC then unixODBC's odbcinst command will be run to add an entry to your odbcinst.ini file. You can locate this file with "odbcinst -j" (odbcinst will be in /usr/local/easysoft/unixODBC/bin) if you are using the unixODBC that comes with the Easysoft ODBC-JDBC Gateway.

 The entry for Easysoft ODBC-JDBC Gateway will look similar to this:

 [Easysoft ODBC-JDBC Gateway]

 Description = ODBC-JDBC Gateway

 Driver = /usr/local/easysoft/ojg/libo2jg.so

 Setup = /usr/local/easysoft/ojg/libo2jgS.so

 JvmPath = /usr/jdk1.3.1/jre/lib/i386/client/libjvm.so

 FileUsage = 1

 DontDLClose = 1

 UsageCount = 1

 Obviously, the paths depend on where you installed Easysoft ODBC-JDBC Gateway and where your JVM is located. See Uninstalling on Unix for ways to remove this.

2.  The installation installs an example data source into unixODBC. This entry will be added to your SYSTEM odbc.ini file. You can locate your SYSTEM odbc.ini file using odbcinst -j. The entry will look similar to this:

[SAMPLE_OJG]

Driver = Easysoft ODBC-JDBC Gateway

Description = sample OJG DSN

DriverClass = com.borland.datastore.jdbc.DataStoreDriver

User = uid

Password = pwd

ClassPath = /tmp/jdsserver6.jar

URL = jdbc:borland:dsremote://server/C:\JDatastore6\bin\TEST.jds

Strip_Quote = 1

With_Schema = 0

Single_Statement = 0

See Uninstalling on Unix for ways to remove this.

3.  Dynamic Linker.

On operating systems where the dynamic linker has a file specifying locations for shared objects (Linux, FreeBSD), the installation will attempt to add paths under the path you provided at the start of the install to the end of this list.

On Linux, this is generally the file /etc/ld.so.conf.

On FreeBSD, this is generally the file /etc/defaults/rc.conf.

Reinstalling or installing when you already have other Easysoft products installed

Each Easysoft distribution contains common files shared between Easysoft products. These shared objects are placed in /usr/local/easysoft/lib. When you run an installation, the dates and versions of these files will be compared with the same files in the distribution and only updated if the files being installed are newer or have a later version number.

You should ensure that nothing on your system is using Easysoft software before starting an installation because on some platforms, files in use cannot be replaced. If a file cannot be updated, you will see a warning during the installation. You may review all warnings after the installation in the file called "warnings" in the directory you unpacked the distribution into.

If the installer detects you are upgrading a product, the installer will suggest you delete the product directory to avoid having problems with files in use. An alternative is to rename the specified directory.

If you are upgrading the Easysoft ODBC-JDBC Gateway, you will need a new license from Easysoft to use the new driver.

Gathering information required during the installation

During the installation you will be prompted for various information. Before installing you should determine:

Installation

Unpacking the distribution

The Easysoft ODBC-JDBC Gateway distribution for Unix platforms is distributed as a tar file. There are multiple copies of the same distribution with different levels of compression. You unpack the distribution as follows.

If the distribution file has been gzipped (i.e. the filename ends in .gz), then use:

gunzip odbc-jdbc=gateway-x.y.z-platform.tar.gz

If the distribution file has been bzipped (i.e. the filename ends in .bz2), then use:

bunzip2 odbc-jdbc-gateway-x.y.z-platform.tar.bz2

If the distribution file has been compressed (i.e. the filename ends in .Z), then use:

uncompress odbc-jdbc-gateway-x.y.z-platform.tar.Z

You may have a distribution file which is not compressed at all (i.e. the filename ends in .tar).

To extract the installation files from the tar file use:

tar -xvf odbc-jdbc-gateway-x.y.z-platform.tar

This will create a directory with the same name as the tar file (without the .tar postfix) containing further archives, checksum files, an install script and various other installation files.

Change directory into the directory created by unpacking the tar file.

License to use

The license text can be found in the file license.txt and be sure to understand the terms before continuing, as you will be required to accept the license terms at the start of the installation.

Answering questions during the installation

Throughout the installation, you will be asked to supply the answer to some questions. In each case, the default will be displayed in square brackets and you need only press <Enter> to take the default. If there are alternative responses, these will be shown in round brackets; to pick one of these type them and press <Enter>.

For example:

Do you want to continue? (y/n) [n]:

The possible answers to this question are "y" or "n". The default when you enter nothing and hit <Enter> is "n".

Running the installer

Before you run the installer, make sure you have read the "Before you install" section. If you are considering running the installation as a non root user, we suggest you review this carefully as you will have to get a root user to manually complete some parts of the installation afterwards. Easysoft recommend installing as the root user. (If you are concerned about the changes that will be made to your system see Changes made to your system.)

To start the installation run:

./install

You will need to:

The next step is Locating or installing unixODBC.

Locating or installing unixODBC

Easysoft strongly recommend you use the unixODBC Driver Manager because:

The installation will start by searching for an installed unixODBC.

There are two possible outcomes here:

1.  If unixODBC is located a message will be output saying:

Found unixODBC under /path_to_unixODBC and it is version n.n.n

2.  unixODBC is not found.

 If unixODBC is not found in the standard places you will be asked whether you have it installed.

 If you have it installed, you need to provide the argument given to unixODBC's configure as --prefix. i.e. if you built unixODBC with "configure --prefix=/usr/local/unixODBC" you enter "/usr/local/unixODBC". Generally the path required is the directory above where odbcinst is installed i.e. if odbcinst is in /opt/unixODBC/bin/odbcinst the required path is /opt/unixODBC.

 If you have not got unixODBC installed, you should install the unixODBC included with Easysoft ODBC-JDBC Gateway.

If you already have unixODBC installed you do not have to install the unixODBC included with Easysoft ODBC-JDBC Gateway but you might consider doing so if your version is older than the one included with Easysoft ODBC-JDBC Gateway.

The unixODBC in the Easysoft ODBC-JDBC Gateway distribution is not built with the default options in unixODBC's configure line:

This means the default SYSTEM odbc.ini file where SYSTEM dsns are located will be /etc/odbc.ini.

This means other ODBC drivers that come with unixODBC are not installed.

This means unixODBC will not look for a libiconv. Warnings about not finding an iconv library were confusing our customers.

Disables unixODBC statistics which uses system semaphores to keep track of used handles. Many machines do not have sufficient semaphore resources to keep track of statistics and they are only available in the GUI ODBC Administrator anyway.

This disables readline support in isql.

We disabled this because it ties isql to the version of libreadline on the machine we build on. We build on as old a version of the Operating System we can for upwards compatibility. Many newer Linux machines no longer come with the older readline libraries and so enabling readline support renders isql unusable.

This installs unixODBC into /usr/local/easysoft/unixODBC.

Installing the Easysoft ODBC-JDBC Gateway Driver

The Easysoft ODBC-JDBC Gateway installation comprises of:

If unixODBC is now installed (either installed by this installation or an existing copy was found) the Easysoft ODBC-JDBC Gateway ODBC Driver will be registered as an ODBC driver with the unixODBC Driver Manager.

If you already have the Easysoft ODBC-JDBC Gateway registered with unixODBC, you will see a warning that Easysoft ODBC-JDBC Gateway is already registered and a list of the drivers unixODBC knows about. If you are installing the Easysoft ODBC-JDBC Gateway into a different directory than it was installed before, you will need to edit your odbcinst.ini file after the installation and correct the Driver and Setup paths as unixODBC's odbcinst will not update them if a driver is already registered.

If unixODBC is installed and you registered the Easysoft ODBC-JDBC Gateway with unixODBC, an example data source will be added to your odbc.ini file.

To use the example data source, you will need to update it for the JDBC driver you are using (see Post Installation).

If a data source called "ODBC_JDBC_SAMPLE" already exists the existing data source will be displayed and you have the option to replace it.

Licensing the Easysoft ODBC-JDBC Gateway

The program /usr/local/easysoft/license/licshell is used to obtain or list licenses. Licenses are stored in the file /usr/local/easysoft/license/licenses. After obtaining a license, you should take a copy of this file in case something happens to it.

When you install the Easysoft ODBC-JDBC Gateway, the installation will ask you if you want to request an Easysoft ODBC-JDBC Gateway license:

Would you like to request a Easysoft ODBC-JDBC Gateway license now (y/n) [y]:

You do not need to obtain a license during the installation, you can run licshell after the installation to obtain or view licenses.

If you answer yes to this the installation will run the licshell script. The process of obtaining a license is best described in the Licensing Guide and on the Easysoft web site.

To obtain a license automatically you will need to be connected to the Internet and allow outgoing connections to license.easysoft.com on port 8884. If you are not connected to the Internet or do not allow outgoing connections on port 8884 then the License Client can create a license request file which you can:

1.  Enter in the License Request pages, accessible from the licensing links menu in this web page: http://www.easysoft.com/support.

2.  Mail, fax or telephone to Easysoft.

Obviously, option 1 is quickest if you have a web browser and access to the Internet.

Once the License Client has started you are presented with a menu of options which allow you to:

[0] exit

[1] view existing license

[n] obtain a license for the desired product.

Obviously, if you have not got any other Easysoft products licensed then option [1] will not show any existing licenses.

To obtain a license, select one of the options from [2] onwards for the product you are installing. The License Client will then run a program that was installed for that product which generates a key which is used to identify the product and operating system (we need this key to license you).

Once you have picked the product to license (ODBC-JDBC Gateway), you need to supply:

1.  Your full name

2.  Your company name

3.  An email contact address. This (currently) must be the email address you registered on the Easysoft web site.

4.  Your telephone number (you need to specify this if you telephone the license request to us).

5.  Your fax number (you need to specify this if you fax the license request to us).

6.  A reference number. When applying for a trial license just hit <Enter> on this field as this field is used to enter a reference number we will supply you for full (paid) licenses.

You will then be asked for a method of obtaining the license where the choices are:

[1] Automatically by contacting the Easysoft License Daemon (this requires connection to the Internet and the ability to support an outgoing TCPIP connection to license.easysoft.com on port 8884).

[2] Write information to file so you can:

a) obtain your license at

http://www.easysoft.com/support

 Choose the type of license you require from the licensing links menu in this web page.

b) fax, telephone it.

The license request is output to license_request.txt.

[3] Cancel request

If you choose to obtain the license automatically, the License Client will start a TCPIP connection to license.easysoft.com on port 8884 and send the details you entered at the prompts above and your machine number. No other data is sent. The data sent is transmitted as plain text so if you do not want this information possibly intercepted by someone else on the net you should choose [2] and telephone or fax the request to us. The License daemon will return the license key, print it to the screen and make it available to the installation script in the file licenses.out.

If you choose option [2], the license request is written to the file license_request.txt and you should exit the License Client via option [0] and complete the installation. Once you have mailed, faxed or telephoned the license request to us, we will return a license key which should add to the end of the file install_path/easysoft/license/licenses.

If during this process any warnings or errors are output, please mail the output to support@easysoft.com and we will rectify the problem.

Post Installation

Supplied documents and examples

The last part of the installation runs a post install script which lists resources available to you.

The Easysoft ODBC-JDBC Gateway manual (this manual) in PDF format.

CHANGES.txt - a list of all the changes in each Easysoft ODBC-JDBC Gateway version.

The Easysoft ODBC-JDBC Gateway license

dlg_help.html contains example DSN information for various JDBC drivers.

There are many resources at the Easysoft web site.

Post installation steps for non-root installations

If you installed Easysoft ODBC-JDBC Gateway as a non-root user (not recommended) then there may be some manual steps you will need to perform:

1.  If you attempt to install the Easysoft ODBC-JDBC Gateway ODBC Driver under the unixODBC Driver Manager and you do not have write permission to unixODBC's odbcinst.ini file, the Easysoft ODBC-JDBC Gateway driver cannot be added.

 You can manually install the Easysoft ODBC-JDBC Gateway driver under unixODBC by adding an entry to the odbcinst.ini file. Run odbcinst -j to ascertain the DRIVERS file then append the lines from the drv_template file (in the directory where the Easysoft ODBC-JDBC Gateway distribution was untarred to) to the odbcinst.ini file.

2.  As step 1, no example dsns can be added into unixODBC if you do not have write permission to the SYSTEM odbc.ini file. Run odbcinst -j to ascertain the name of the "SYSTEM DATA SOURCES" file then add your DSNs.

3.  On machines where the dynamic linker has a configuration file defining the locations where it looks for shared objects (Linux/FreeBSD), you will need to add:

install_path/easysoft/lib

install_path/easysoft/unixODBC/lib

The latter one is only required if you installed the unixODBC included with Easysoft ODBC-JDBC Gateway. Sometimes after changing the dynamic linker configuration file you need to run a program to update the dynamic linker cache (e.g. /sbin/ldconfig on Linux).

4.  If you did not install Easysoft ODBC-JDBC Gateway in the default location then you need to link /usr/local/easysoft to the easysoft directory in your chosen install path.

 e.g. If you installed in /home/martin the installation will create /home/martin/easysoft and you need to symbolically link /usr/local/easysoft to /home/martin/easysoft:

 ln -s /home/martin/easysoft /usr/local/easysoft

5.  If your system does not have a dynamic linker configuration file you need to add the paths listed in step 3 above to whatever environment path the dynamic linker uses to locate shared objects. You may want to amend this in a system file run whenever someone logs in like /etc/profile.

The environment variable differs per dynamic linker. Consult your ld or ld.so man page. It is usually:

LD_LIBRARY_PATH, LIBPATH, LD_RUN_PATH or SHLIB_PATH.

Defining which JVM to use

After a typical installation, the Easysoft ODBC-JDBC Gateway will be accessible in /usr/local/easysoft/ojg. The installation will also have installed:

If you did not obtain a license during the installation you need to do his now (you need to run /usr/local/easysoft/license/licshell and see the license instructions in Licensing the Easysoft ODBC-JDBC Gateway.

Currently the installation installs the Easysoft ODBC-JDBC Gateway driver in odbcinst.ini with a default JvmPath. e.g.

[Easysoft ODBC-JDBC Gateway]

Description = ODBC JDBC Gateway

Driver = /usr/local/easysoft/ojg/libo2jg.so

Setup = /usr/local/easysoft/ojg/libo2jgS.so

JvmPath = /usr/jdk1.3.1/jre/lib/i386/client/libjvm.so

FileUsage = 4

DontDLClose = 1

You need to change JvmPath to point at a valid JVM on your system. You may also need to ensure LD_LIBRARY_PATH/LIBPATH etc are pointing to any directories containing the JVM shared objects and JVM required shared objects or the dynamic linker knows where to find dependent shared objects. e.g. With JDK 1.4.1 for Linux, libjvm.so loads libverify which is found in the jre/lib/i386 directory.

As an example:

LD_LIBRARY_PATH=/usr/local/j2sdk1.4.1_06/jre/lib/i386/client:/usr/local/j2sdk1.4.1_06/jre/lib/i386

Editing the example DSN for your JDBC Driver

The sample ODBC data source called ODBC_JDBC_SAMPLE is installed into your system odbc.ini file. You need to edit this DSN or create a different named one with the correct DriverClass, User, Password, ClassPath and URL for your JDBC driver. The sample one looks similar to this:

[ODBC_JDBC_SAMPLE]

Driver = Easysoft ODBC-JDBC Gateway

DriverClass = com.borland.datastore.jdbc.DataStoreDriver

User = dbo

Password = password

ClassPath = /tmp/jdsserver6.jar

URL = jdbc:borland:dsremote://server/C:\JDatastorein\TEST.jds

Strip_Quote = 1

With_Schema = 0

"Driver = Easysoft ODBC-JDBC Gateway" tells unixODBC which driver to use i.e. which entry in odbcinst.ini file defines the ODBC driver.

"DriverClass" defines the Java class you need to use for the JDBC driver defined in "ClassPath".

"URL" is the required URL to connect to your JDBC database.

You can find some examples for different JDBC drivers in the file dlg_help.html.

Testing the Easysoft ODBC-JDBC Gateway ODBC Driver

To test the Easysoft ODBC-JDBC Gateway you need to complete all the processes described in Post Installation. In particular, you need to edit the sample DSN or create a new one.

Once your DSN is defined you can use unixODBC's isql to try a connection.

e.g.

Suppose the DSN defined in odbc.ini is ODBC_JDBC_SAMPLE and your JDBC database needs a username and password of testuser/password then:

cd /usr/local/easysoft/unixODBC/bin (or wherever your unixODBC's isql is)

./isql -v ODBC_JDBC_SAMPLE testuser password

If this connects you will get a prompt you can start typing SQL into or just "help" to get a list of tables. Pressing <enter> on a new line will exit isql.

Uninstalling on Unix

There is no automated method of removal of the Easysoft ODBC-JDBC Gateway in this release. However, removal is quite simple. Follow the instructions below:

1.  Change directory to installpath/easysoft and delete the directory tree "ojg" (where installpath is what was specified at install time).

2.  If you had to add the above path to the dynamic linker search paths (e.g. /etc/ld.so.conf in Linux) remove this entry. You may have to run a linker command such as /sbin/ldconfig to get the dynamic linker to reread the configuration file. This step can generally only be performed by the root user.

3.  If you were using unixODBC, the Easysoft ODBC-JDBC Gateway ODBC Driver entry needs to be removed from the odbcinst.ini file. To check whether Easysoft ODBC-JDBC Gateway is configured under unixODBC use odbcinst -q -d. If this outputs "Easysoft ODBC-JDBC Gateway" you should uninstall the driver using

 odbcinst -u -d -n "Easysoft ODBC-JDBC Gateway"

 If a message is displayed saying reduced usage count, repeat these commands until odbcinst states the driver is removed.

4.  If you created any Easysoft ODBC-JDBC Gateway data sources under unixODBC, you may want to delete these. You need to use odbcinst -j to locate user and system odbc.ini files and then check those files for DSNs having the driver attribute set to "Easysoft ODBC-JDBC Gateway".

5.  Remove ojg_install.info from the /usr/local/easysoft directory.