ASA SQL User's Guide
Accessing Remote Data
Working with remote servers
Use the CREATE SERVER statement to set up remote server definitions. You can execute the statements directly, or use Sybase Central.
For ODBC connections, each remote server corresponds to an ODBC data source. For some systems, including Adaptive Server Anywhere, each data source describes a database, so a separate remote server definition is needed for each database.
You must have RESOURCE authority to create a server.
On UNIX platforms, you need to reference the ODBC driver manager as well.
For a full description of the CREATE SERVER statement, see CREATE SERVER statement.
The following statement creates an entry in the sysservers table for the Adaptive Server Enterprise server called ASEserver:
CREATE SERVER ASEserver CLASS 'ASEJDBC' USING 'rimu:6666'
where:
ASEserver is the name of the remote server
ASEJDBC is a keyword indicating that the server is Adaptive Server Enterprise and the connection to it is JDBC-based
rimu:6666 is the machine name and the TCP/IP port number where the remote server is located
The following statement creates an entry in the sysservers table for the ODBC-based Adaptive Server Anywhere server named testasa:
CREATE SERVER testasa CLASS 'ASAODBC' USING 'test4'
where:
testasa is the name by which the remote server is known within this database.
ASAODBC is a keyword indicating that the server is Adaptive Server Anywhere and the connection to it uses ODBC.
test4 is the ODBC data source name.
On Unix platforms, the following statement creates an entry in the sysservers table for the ODBC-based Adaptive Server Anywhere server named remasa:
CREATE SERVER remasa CLASS 'asaodbc' USING 'driver=/opt/sybase/SYBSsa9/lib/dbodbc9_r.so;dsn=my_asa_dsn'
where:
remasa is the name by which the remote server is known within this database.
ASAODBC is a keyword indicating that the server is Adaptive Server Anywhere and the connection to it uses ODBC.
USING is the reference to the ODBC driver manager.
On Unix platforms the following statement creates an entry in the sysservers table for the ODBC-based Adaptive Server Enterprise server named remase:
CREATE SERVER remase CLASS 'aseodbc' USING 'driver=/opt/sybase/SYBSsa9/drivers/lib/libodbc.so;dsn=my_ase_dsn'
where:
remase is the name by which the remote server is known within this database
ASEODBC is a keyword indicating that the server is Adaptive Server Enterprise and the connection to it uses ODBC
USING is thereference to the ODBC driver manager.
Creating remote servers using Sybase Central