Sybase Business Intelligence Solutions - Database Management, Data Warehousing Software, Mobile Enterprise Applications and Messaging
  Worldwide [Change] Contact Us  |  My Sybase  |  Shopping Cart - Buy Business Intelligence Products - Database Management, Data Warehousing and Mobile Software  

Search for    in all of Sybase.com
view all search results


Support & Services / Technical Documents / Document Types / White Paper-Technical / Sybase ODBC Connectivity White Paper with Adaptive...

Sybase ODBC Connectivity White Paper with Adaptive Server Anywhere Driver (ASA version 6.x), Adaptive Server IQ Driver (ASIQ version 12.x), Adaptive Server Enterprise Drivers (ASE versions 11.x and 12.0) and DirectConnect, Date: 12/99

This report details the connectivity setup for Adaptive Server Anywhere Driver (ASA version 6.x), Adaptive Server IQ Driver (ASIQ version 12.x), Adaptive Server Enterprise Drivers (ASE versions 11.x and 12.0) and DirectConnect Drivers
 
 
Published by Sybase Interoperability Services


Contents


Overview

The purpose of this white paper is to document, in one place, the differences in the configuration of connection information for ODBC drivers used with various Sybase products. Note that 'used with Sybase products' means that an ODBC driver is used with Sybase products, but may or may not be provided by Sybase. The paper is divided into sections alphabetically by the Sybase products with which the drivers are used.

To configure any of the drivers in this paper, use the ODBC Administrator.

Please note that all connectivity information in this paper is for the TCP/IP protocol and for Windows NT PC installations, except where noted. Again, this paper focuses only on connectivity information. For information on other options in the driver configuration, refer to the documentation or on-line help system for the driver.


Sybase Adaptive Server Anywhere Driver

Configuring the ODBC DSN

This section provides connectivity information for the ODBC driver for Adaptive Server Anywhere (hereafter called 'ASA') version 6.0.1 (driver version 6.0). This driver allows client applications to connect to an ASA server. Unlike the ODBC driver for Adaptive Server Enterprise, the ASA driver does not require that Open Client be installed on the machine with the ODBC driver. For more information about the Adaptive Server Enterprise driver, see the section Sybase Adaptive Server Enterprise Drivers.

The following shows the ODBC tab in the driver configuration. It is where you name the ODBC data source (DSN) you are configuring. This tab also contains the Test Connection button. This button allows you to test the connection to ASA, after you finish the configuring the DSN and before you exit out of the driver configuration utility. The following screen shows the sample ASA ODBC DSN created with the installation of the ASA network server.

The Login tab, shown below, is the next tab in the driver configuration. It is where you specify the login information that the ODBC driver will use when it makes a connection.

The third tab from the left is the Database tab. If you are configuring an ODBC DSN for an ASA installation on the same machine, you specify the name and location of the server file and database file as shown in the following screen. This screen also allows you to configure whether to start or shut down the database when connecting or disconnecting. This is definitely something to keep in mind when configuring and then using an ASA DSN.

If you are configuring an ODBC DSN for an ASA installation on a remote machine, then you need to fill in connectivity information on the Network tab. The network connection information must be in the format: host=machine_name:port_number, where machine_name is the name of the machine on which the ASA you want to connect runs and port_number is the port number for that ASA. For example:

    host=chance:2638

Note that this is unlike the format of the connection string for Adaptive Server Enterprise and the DirectConnects, which use the Open Client format of machine_name,port. For example: chance,5000

Testing the Connection

As noted previously in this section, the ASA driver configuration utility provides a Test Connection button on the ODBC tab. This allows you to verify connectivity while you are still in the driver configuration utility.


Sybase Adaptive Server IQ Driver

This section provides information about the ODBC driver for Adaptive Server IQ (hereafter called 'ASIQ') version 12. This driver allows client applications to connect to ASIQ version 12 servers. The configuration banner for the ASIQ driver actually reads "ODBC Configuration for Adaptive Server Anywhere," when it is, in fact, for ASIQ as shown in the following screen. The ASA and ASIQ 12 ODBC drivers are essentially the same. (ASIQ 12 is built on the ASA architecture.)

Because the drivers are essentially the same, the information that applies to the ASA driver also applies to the ASIQ 12 driver.

Please go to the previous section, Adaptive Server Anywhere Driver, more information about this driver.


Sybase Adaptive Server Enterprise Drivers

This section contains connection information about both the 11.x and 12.0 versions of the ODBC drivers for Adaptive Server Enterprise (hereafter called 'ASE'). Both of these drivers allow client applications to connect to ASE servers.

Note that both versions of the driver work with Open Client to make the ODBC connection to ASE. As you probably know, the ASE installation and configuration process automatically defines ASE to Open Client based on the server name specified during installation. The default is the name of the machine on which ASE is being installed. This definition involves creating an entry in the sql.ini file for ASE. The sql.ini entry is in the following format: machine_name,port_number. For example:

    chance,5000

Note that this is a different connection string format than the ASA and ASIQ drivers use. They use the format host=machine_name:port_number.

If you are configuring an ODBC DSN on a machine that is remote from ASE, you must install the appropriate version of Open Client on the machine and define ASE to Open Client by creating a sql.ini file entry for it on that machine.

ASE 12 ODBC Driver

Configuring the ODBC DSN

The ASE ODBC Driver, which is new with ASE version 12, allows you to specify all the information you need on the General tab. It also now provides a connection test feature, so you can test the connection from within the driver configuration utility.

This driver is compatible with Open Client version 12.0 and ASE version 12, as well as ASE 11.9.2. You cannot use the driver with Open Client 11.1.1. If you attempt to configure a DSN using a server defined with Open Client 11.1.1, you will see that you can configure the DSN and run the Test Connect utility successfully. However, you will not be able to save the DSN and/or exit the driver configuration utility.

This ASE ODBC driver works with Open Client version 12.0 to make an ODBC connection. Therefore, you must specify the ASE server name as it is defined to Open Client in the sql.ini file in the Server name field of the ODBC DSN. The following image shows the General tab from the ASE driver configuration.

It contains the following information:

Data Source Name =the arbitrary name you assign for your ASE ODBC DSN. This is a required field.

Description =(blank in this picture) any descriptive information you want to provide about the DSN. This is an optional field.

Server Name =the server name for ASE as it is defined to Open Client in the sql.ini file. This is a required field.

Database Name =the name of the specific ASE database to which you want the ODBC DSN to connect. This is an optional field. You can specify a database on this tab, or on the logon screen, or not at all, in which case you are connected by default to the Master database.

Testing the Connection

Use the Test Connect button to verify connectivity before you exit the driver configuration utility.

System 11 ODBC Driver

Configuring the ODBC DSN

The 11.x version of the ODBC driver for ASE has a name that is not exactly intuitive. It is called 'Sybase System 11.' This driver is compatible with Open Client 10.x and 11.1.1, SQL Server 10.x, ASE 11.5, ASE 11.9.2 and ASE 12.0.

This driver works with the Sybase Open Client protocol to make its ODBC connection. Therefore, you must specify the name of the ASE server in the Server Name field of the ODBC DSN definition as it is defined to Open Client in the sql.ini file. The following picture shows its General tab.

The information it contains is as follows:

Data Source Name =the arbitrary name you assign for your ASE ODBC DSN. This is a required field.

Description =any descriptive information you want to provide about the DSN. This is an optional field.

Server Name =the server name for ASE as it is defined to Open Client in the sql.ini file. This is a required field.

Database Name =the name of the specific ASE database to which you want the ODBC DSN to connect (In the picture, this is blank). This is an optional field. If you leave the Database Name field blank, the driver will connect by default to the Master database.

Testing the Connection

The Sybase System 11 driver configuration does not provide a connection test feature. To test connectivity for ODBC DSNs defined with this driver, you must try them with an ODBC application. If you have ODBC Test, which is provided with the Microsoft SDK, you can use it to verify connectivity to ASE.


Sybase DirectConnect Drivers

In terms of the DirectConnect products, some ODBC drivers are used by client applications to connect to DirectConnect servers and some are used by DirectConnect servers to connect to target databases. This section is divided into two subsections:

Client to DirectConnect ODBC Connectivity

Configuring the ODBC DSN

You can connect an ODBC client application to any DirectConnect, except the DirectConnect for Oracle, using the Sybase 3.01 DirectConnect ODBC Driver. This driver is made by Intersolv (now known as Merant) and is provided by Sybase with the DirectConnects.

Like the ASE ODBC drivers, this driver also works with the Sybase Open Client protocol to make an ODBC connection. Open Client version 10.x or 11.1.1 must be installed on the same machine with the DirectConnect ODBC driver in order for it to work. The driver uses the network connection information defined to Open Client to connect to the DirectConnect, which means you simply need to provide the name of the DirectConnect service as it is defined to Open Client in the ODBC DSN definition.

The following explains how to configure an ODBC DSN with this driver.

Data Source Name =the arbitrary name you assign for your DirectConnect ODBC DSN. This is a required field.

Description =any descriptive information you want to provide about the DSN. This is an optional field.

Server Name =the server name for the DirectConnect as it is defined to Open Client in the sql.ini file. This is a required field.

Database Name =the name of the specific database to which you want the ODBC DSN to connect (In the picture, this is blank). This is an optional field. For most DirectConnects, it will not work. For example, for the DB2 access service of the DirectConnect for MVS, the database is actually associated with a user's permissions. For the DirectConnect for Informix, the database is actually specified in the ODBC connection made between the DirectConnect and Informix. For more information on ODBC connections between DirectConnects and data sources (also, known as 'back-end connections'), please see the section that follows DirectConnect to Target Data Source ODBC Connectivity.

Testing the Connection

The DirectConnect ODBC driver configuration does not provide a connection test feature. To test connectivity for ODBC DSNs defined with this driver, you must try them with an ODBC application. If you have ODBC Test, which is provided with the Microsoft SDK, you can use it to verify connectivity to the DirectConnect.

DirectConnect to Target Data Source ODBC Connectivity

While the other Sybase-provided ODBC drivers described in this paper are all designed to allow client applications connect to Sybase server products, the drivers discussed in this section allow certain DirectConnects (which are Sybase server products) to connect to other data sources using drivers that may or may not be provided by Sybase.

Specifically, the DirectConnect Anywhere server is designed to work with various ODBC drivers to connect to target data sources. The DirectConnect for Informix and the DirectConnect for Microsoft SQL Server are the DirectConnect Anywhere server used with ODBC drivers to connect to their respective target data sources. Information about both products and the drivers they use follow in this section.

Important! Neither the DirectConnect for Informix nor the DirectConnect for Microsoft SQL Server can access data in their respective data sources until you configure the ODBC DSN for Informix or Microsoft SQL Server. DirectConnect configuration includes specifying the ODBC DSN for the target Informix or Microsoft SQL Server in the DirectConnect service configuration parameter Connection Spec 1. You can provide a value for this parameter before you actually configure the DSN and the DirectConnect server will run. However, you will not be able to access data in the database until the DSN for the database exists and is specified in Connection Spec 1 of the DirectConnect service configuration file.

DirectConnect for Informix

Configuring the ODBC DSN

The DirectConnect for Informix version 11.5 connects to a local or remote Informix data source using the DirectConnect Informix 7.0 driver, which Sybase provides. The driver is actually made by a company called Visigenic. They make both a Windows and UNIX version of this driver for connectivity from either platform to Informix servers running on either platform. Because this driver connects to Informix directly instead of a DirectConnect or other Sybase Open Server application, it does not use Open Client. Instead, it uses a connectivity utility provided by Informix, called 'InformixConnect.' Specifically, the DirectConnect documentation states that the 7.21 version of InformixConnect works with the 11.5 version of the DirectConnect for Informix.

The configuration utility for this Visigenic ODBC driver has only one panel (shown below) on which you enter information.

The following describes the information to provide on this panel:

Data Source Name =the arbitrary name you assign for the Informix ODBC DSN. This is a required field. This name is the value you will enter in the DirectConnect for Informix configuration in the Connection Spec 1 parameter.

Description =any descriptive information you want to provide about the DSN. This is an optional field.

Host Name =the name of the machine on which the target Informix data source runs. This is a required field.

Server Name =the name of the Informix server as it is defined in the c:\winnt\system32\drivers\etc\services file on its host machine. This is a required field.

User Name =the name of the user that should be used to make the connection. This is an optional field.

Database Name =the name of the specific Informix database to which you want the ODBC DSN to connect.

Test the Connection

The Visigenic ODBC Informix driver configuration does not provide a connection test feature. You must actually run the DirectConnect Anywhere Server, connect to the DirectConnect for Informix service that will use this driver (using either an Open Client or another ODBC application), and retrieve data from Informix to verify that the connection works.

Important! Unlike the other ODBC drivers discussed in this paper, you cannot test the connection directly to Informix with this driver using ODBC Test. The driver is licensed solely for connections made by a DirectConnect. If you attempt to use ODBC Test, the connection will fail with a driver licensing error. Note, however, that you can use ODBC Test as a client that connects to the DirectConnect for Informix service (configured using the Sybase 3.01 DirectConnect ODBC Driver) and test the Visigenics Informix ODBC driver connectivity indirectly.

DirectConnect for Microsoft SQL Server

The DirectConnect for Microsoft SQL Server consists of the Sybase DirectConnect Anywhere server and the Microsoft SQL Server ODBC driver, which is provided with Microsoft Windows and Windows NT operating systems.

Specifically, the driver is called the SQL Server driver. Its configuration consists of a Microsoft Windows wizard, which automatically detects any Microsoft SQL Server installations available on the network.

Configure the connection information as follows:

Name =the arbitrary name you assign for the Microsoft SQL Server ODBC DSN. This is a required field. This name is the value you will enter in the DirectConnect for Microsoft SQL Server configuration in the Connection Spec 1 parameter.

Description =any descriptive information you want to provide about the DSN. This is an optional field.

Server =this is a drop-down list of the name or names of machine(s) on which accessible Microsoft SQL Servers are running. This is a required field.

Choose Next to continue to the next panel in the wizard. Click the Client Configuration... button to verify that the network library used to communicate with SQL Server is the one you want. For example, for DirectConnect products, you probably want TCP/IP.

Proceed through the wizard. When you reach the following panel, configuration is complete.

Testing the Connection

The Microsoft SQL Server ODBC driver configuration provides a test connection utility, as shown in the previous screen. Click the Test Data Source... button to verify the ODBC DSN configuration.


 



Document Attributes
Last Revised: Dec 01, 1999
Product: ODBC, SQL Anywhere, DirectConnect, Adaptive Server Enterprise
Hardware Platform: Win NT, Windows x86, Sun Solaris SPARC
Technical Topics: Connectivity, SQL Anywhere, Compatibility
  
Business or Technical: Technical
Content Id: 1008930
Infotype: White Paper-Technical
Powered By Sybase