INF: Microsoft Open Data Services ODBC DriverID: Q143338
|
This article outlines the basic architecture of the Microsoft Open Data Services ODBC Driver. If you need more detailed information regarding this driver and Open Data Services, you should review the SQL Server 6.0 or later "Programming Open Data Services" or "Programmers Reference for Open Data Services" manuals in prior releases of Microsoft SQL Server.
Open Data Services (ODS) is a component of Microsoft SQL Server that can be
used to write extended stored procedures, add audit and security extensions
to SQL Server, and also write gateways to other databases such as Oracle or
DB2. ODS gateways run as Windows NT services and accept SQL requests from
applications using the same Transact-SQL syntax and the same network
protocols as Microsoft SQL Server.
The gateway will transform the Transact-SQL to the dialect understood by
the target DBMS and then send each request to the target DBMS using its
native protocols. When the target DBMS sends the results back, ODS and the
gateway translate the results into the format used by SQL Server and
forwards the results to the application using SQL Server's network
protocols. An ODS gateway therefore is a service that looks like Microsoft
SQL Server to an application and can be used by SQL Server applications to
access other types of databases without having to be rewritten using the
API of that target database.
An ODS gateway application can be written to run against a database that
does not have all of the features of Microsoft SQL Server. For example, the
target database may not have some of the datatypes or transaction isolation
levels supported by SQL Server. Although these missing features do not
cause problems for the SQL Server components used by DB-Libary
applications, they do cause problems for the Microsoft SQL Server ODBC
driver. The SQL Server ODBC driver is highly optimized to run with
Microsoft SQL Server and requires that the service it has connected to
contains all the features of Microsoft SQL Server. If the Microsoft SQL
Server ODBC Driver is used to connect to an ODS gateway that does not have
the exact same feature set as a Microsoft SQL Server, the driver will not
work properly.
The ODS ODBC driver was developed for use with ODS gateway applications.
It has the same architecture and most of the code of the Microsoft SQL
Server ODBC Driver, but also allows the developer of the ODS gateway
application to compile a resource DLL that tells the ODS ODBC Driver what
database features are supported by the ODS gateway. The ODS ODBC driver can
then work correctly with the ODS gateway application and ODBC applications.
There are both Win16 (ODSGATE.DLL) and Win32 (ODSGT32.DLL) versions of the
ODS ODBC Driver. The gateway vendor also has to compile Win16 and Win32
versions of their resource DLL. When you define an ODBC data source for
the ODS ODBC Driver, you must specify the name of the resource DLL to load
and the connectivity parameters the driver will use to connect to the ODS
gateway service.
The ODS ODBC driver is generally distributed by the vendor supplying the
ODS gateway application. This is because the driver will not work properly
unless it has a resource DLL that correctly describes the feature set of
the ODS gateway application. The resource DLL must be supplied by the
gateway developer who knows the capabilities of the gateway. In this case,
the ODS gateway application vendor provides the primary support for the ODS
driver, and if they determine the problem lies in the driver, the vendor
will contact Microsoft to work on the issue.
Microsoft does not distribute the ODS ODBC driver with SQL Server because
the driver is only useful in connecting to ODS gateways and must be coupled
with a resource DLL specific to each ODS gateway. The only time Microsoft
provides a copy of the actual ODS ODBC driver is in the Microsoft SQL
Server Programmer's Toolkit (PTK). In SQL Server 6.0, this is distributed
with the SQL Workstation product, or in the BackOffice SDK that comes with
the MSDN Level 3 compact disc.
The driver in the SQL Server PTK is provided as part of the ODS libraries
so that ODS gateway vendors can build a resource DLL for their gateway and
then distribute the resource and driver DLLs with their gateway. Microsoft
does provide a sample resource DLL in the ODS libraries, but this resource
DLL can only be used to connect to an ODS service that offers exactly the
same feature set as the corresponding Microsoft SQL Server. For example,
the sample resource DLL provided in the SQL Server 6.0 ODS libraries can
only be used to connect to a Microsoft SQL Server 6.0, or an ODS service
which has exactly the same feature set as Microsoft SQL Server 6.0. It
cannot be used to connect to any other release of SQL Server because those
versions will not have some of the features described in the 6.0 sample
resource DLL.
Although developers can use the ODS ODBC driver with the sample resource
DLL to connect to a Microsoft SQL Server for testing, clients running in
production environments should use the Microsoft SQL Server ODBC driver
instead. They should only use the ODS ODBC Driver when connecting to an ODS
application.
Additional query words: sql6 odbc
Keywords : kbinterop kbusage SSrvODS SSrvProg
Version : 2.5.0121 6.0
Platform : WINDOWS
Issue type : kbhowto
Last Reviewed: March 24, 1999