Configuring Open Client and ODBC

EAServer 6.2 supports Open Client versions 12.5.1 and 15.0, which are located in %DJC_HOME%\openclient-12.5.1 and %DJC_HOME%\openclient-15.0, respectively. Sybase recommends that you do not install Open Client in another location. By default, EAServer uses version 12.5.1.To use Open Client version 15.0, shut down EAServer, then run:

%DJC_HOME%\bin\configure ocs-15

To switch to version 12.5.1, shut down EAServer, then run:

%DJC_HOME%\bin\configure ocs-125

StepsConfiguring the Open Client environment

  1. “Set required environment variables”.

  2. “Adding server definitions to the SQL.INI file”.

  3. “Verify connectivity using isql”.

Set required environment variables

Earlier versions of Open Client use the SYBASE environment variable. More recent versions use the environment variables SYBASE and SYBASE_OCS. The default installation of Open Client 12.5.1 sets:

These two variables are defined in the setup scripts for EAServer 6.2. You must ensure that your global Open Client sets them correctly.

You can also use the local-setenv.bat script to locally define which installation of Open Client to use.

Add the Open Client DLL and BIN subdirectories to the PATH environment variable.

Adding server definitions to the SQL.INI file

The SQL.INI file in the OpenClient INI subdirectory defines server names and addresses. Add an entry for each EAServer or database server to which you intend to connect.

StepsAdding server entries to the file with a text editor

  1. Create the file %SYBASE%\INI\SQL.INI if it does not already exist.

  2. Open the SQL.INI file in a text editor and add an entry in this format:

    [server_name]
    
    master=TCP,host,tds_port
    
    query=TCP,host,tds_port
    

    where:

    • server_name – is a logical name for the server, composed of letters, digits, and the underscore character.

    • host – is the server machine’s host name or IP address.

    • tds_port – is the database server’s TDS listener port number.

NoteAnother method You can also use the Open Client dsedit tool to edit the SQL.INI file. For information about using dsedit, see the Open Client/Server Configuration Guide for Desktop Platforms in the latest Open Client/Server (Installation and Configuration) collection, available on the Sybase Product Manuals Web site.

Verify connectivity using isql

Run the Open Client isql tool to verify the configuration:

%SYBASE%\BIN\ISQL -S server_name -U user -P password

where:

The connection is successful if isql displays a command prompt instead of an error message.