Creating remote servers

Use the CREATE SERVER statement to set up remote server definitions.

For some systems, including Sybase IQ and 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.

JDBC-based server example

The following statement creates an entry in the sysservers table for the Adaptive Server Enterprise server named ASEserver:

CREATE SERVER ASEserver 
CLASS 'asejdbc' 
USING 'rimu:6666/my_asedb' 

where:

ODBC-based server example

For ODBC connections, each remote server corresponds to an ODBC data source.

ODBC-based connections may only be used for IQ on 32-bit systems. On 64-bit systems, other methods of access are available, described in sections, “Loading remote data without native classes” and “Querying data without native classes.”

To create an ODBC-based server class, you must first create a DSN, as described in “Creating and editing ODBC data sources”.

The following statement creates an entry in the sysservers table for the ODBC-based Sybase IQ server named testasiq:

CREATE SERVER testasiq 
CLASS 'asaodbc' 
USING 'test4'

where:

For more information on server classes, including CREATE SERVER requirements for various server classes, see Chapter 17, “Server Classes for Remote Data Access.”