Reference Manual
CHAPTER 9. SQL Statements
To add a server to the sysservers 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 }
Must have RESOURCE authority.
Supported on Windows 95 and Windows NT only.
Automatic commit.
Server Classes for Remote Data Access
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.
USING clause If a JDBC-based server class is used, the USING clause is the machine-name:port-number. If an ODBC-based server class is used, the USING clause is the data-source-name. The data-source-name is the user Data Source Name in the Configuration Manager.
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.
connection-info The machine name or IP number is required. By default. Adaptive Server Anywhere uses port 2638. The database name /dbname is useful when creating a remote server that is of class asajdbc. If you do not use this, then the default database is used.
The /dbname parameter is optional for asejdbc. If you don't specify it uses master, or you can specify another database by some other means (for example, in the FORWARD TO statement).
SQL/92 Entry-level feature.
Sybase Supported by Open Client/Open Server.
Create an entry in the sysservers table 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'
Create an entry in the sysservers table for the Oracle server named oracle723. Its user Data Source Name in the Configuration Manager is also oracle723.
CREATE SERVER oracle723 CLASS 'oraodbc' USING 'oracle723'