Contents Index ODBC-based server classes Server class asaodbc

ASA SQL User's Guide
  Server Classes for Remote Data Access
    ODBC-based server classes

Defining ODBC external servers


The most common way of defining an ODBC-based server bases it on an ODBC data source. To do this, you must create a data source in the ODBC Administrator.

Once you have the data source defined, the USING clause in the CREATE SERVER statement should match the ODBC data source name.

For example, to configure a DB2 server named mydb2 whose Data Source Name is also mydb2, use:

CREATE SERVER mydb2
CLASS 'db2odbc'
USING 'mydb2'

For more information on creating data sources, see Creating an ODBC data source.

Using connection strings instead of data sources 

An alternative, which avoids using data sources, is to supply a connection string in the USING clause of the CREATE SERVER statement. To do this, you must know the connection parameters for the ODBC driver you are using. For example, a connection to an ASA may be as follows:

CREATE SERVER testasa
CLASS 'asaodbc'
USING 'driver=adaptive server anywhere 9.0;eng=testasa;dbn=sample;links=tcpip{}'

This defines a connection to an Adaptive Server Anywhere database server named testasa, database sample, and using the TCP-IP protocol.

See also 

For information specific to particular ODBC server classes, see:


Contents Index ODBC-based server classes Server class asaodbc