Use the CREATE SERVER statement to set up remote server definitions. To use Sybase Central to create remote server definitions, see Create remote servers using Sybase Central.
For ODBC connections, each remote server corresponds to an ODBC data source. For some systems, including SQL 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 remote 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 ISYSSERVER system table for the Adaptive Server Enterprise server called RemoteASE:
CREATE SERVER RemoteASE CLASS 'ASEJDBC' USING 'rimu:6666'; |
RemoteASE is the name of the remote server.
ASEJDBC is a keyword indicating that the remote server is Adaptive Server Enterprise and the connection to it is JDBC-based.
rimu:6666 is the computer name and the TCP/IP port number where the remote server is located.
The following statement creates an entry in the ISYSSERVER system table for the ODBC-based SQL Anywhere server named RemoteSA:
CREATE SERVER RemoteSA CLASS 'SAODBC' USING 'test4'; |
RemoteSA is the name by which the remote server is known within this database.
SAODBC is a keyword indicating that the server is SQL Anywhere and the connection to it uses ODBC.
test4 is the ODBC Data Source Name (DSN).
On Unix platforms, the following statement creates an entry in the ISYSSERVER system table for the ODBC-based SQL Anywhere server named RemoteSA:
CREATE SERVER RemoteSA CLASS 'SAODBC' USING 'driver=SQL Anywhere 11;dsn=my_sa_dsn'; |
RemoteSA is the name by which the remote server is known within this database.
SAODBC is a keyword indicating that the server is SQL 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 ISYSSERVER system table for the ODBC-based Adaptive Server Enterprise server named RemoteASE:
CREATE SERVER RemoteASE CLASS 'ASEODBC' USING '/opt/sybase/ase_odbc_1500/DataAccess/ODBC/lib/libsybdrvodb.so;dsn=my_ase_dsn'; |
RemoteASE 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 the reference to the ODBC driver manager.
Discuss this page in DocCommentXchange. Send feedback about this page using email. |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |