ASA SQL Reference
SQL Statements
Use this statement to add a server to the SYSSERVERS system table.
CREATE SERVER server-name
CLASS 'server-class'
USING 'connection-info'
[ READ ONLY ]
server-class :
ASAJDBC | ASEJDBC
| ASAODBC | ASEODBC
| DB2ODBC | MSSODBC
| ORAODBC | ODBC
connection-info :
{ machine-name:port-number [/dbname ] | data-source-name }
CLASS clause Specifies the server class you want to use for a remote connection. Server classes contain detailed server capability information. If you are using NetWare, only the asajdbc class is supported.
USING clause If a JDBC-based server class is used, the USING clause is of the form hostname:portnumber [/dbname], where:
hostname is the machine the remote server runs on
portnumber is the TCP/IP port number the remote server listens on. The default port number for Adaptive Server Anywhere is 2638.
dbname For Adaptive Server Anywhere remote servers, if you do not specify a dbname, then the default database is used. For Adaptive Server Enterprise, the default is the master database, and an alternative to using dbname is to another database by some other means (for example, in the FORWARD TO statement).
If an ODBC-based server class is used, the USING clause is the data-source-name. The data-source-name is the ODBC Data Source Name.
On UNIX platforms, you need to reference the ODBC driver manager as well. For example, using the supplied Merant drivers, the syntax is as follows:
USING 'driver=/opt/sybase/SYBSsa9/drivers/lib/libodbc.so;dsn=my_dsn'
READ ONLY The READ ONLY clause specifies that the remote server is a read-only data source. Any update request is rejected by Adaptive Server Anywhere.
The CREATE SERVER statement defines a remote server from the Adaptive Server Anywhere catalogs.
For more information on server classes and how to configure a server, see Server Classes for Remote Data Access.
Must have RESOURCE authority.
Not supported on Windows CE.
Automatic commit.
Server Classes for Remote Data Access
SQL/92 Vendor extension.
SQL/99 Vendor extension.
Sybase Supported by Open Client/Open Server.
The following example creates an Adaptive Server Anywhere remote server named testasa, located on the machine apple and listening on port number 2638, use:
CREATE SERVER testasa CLASS 'asajdbc' USING 'apple:2638'
The following example creates a remote server for the JDBC-based Adaptive Server named ase_prod. Its machine name is banana and port number is 3025.
CREATE SERVER ase_prod CLASS 'asejdbc' USING 'banana:3025'
The following example creates a remote server for the Oracle server named oracle723. Its ODBC Data Source Name is oracle723.
CREATE SERVER oracle723 CLASS 'oraodbc' USING 'oracle723'