CREATE SERVER statement

Description

Adds a server to the ISYSSERVER table.

Syntax

CREATE SERVER server-name 
CLASS 'server-class' 
USING 'connection-info' 
[ READ ONLY ]

Parameters

server-class:

ASAJDBC  |  ASEJDBC | ASAODBC  |  ASEODBC | DB2ODBC  |  MSSODBC | ORAODBC  |  ODBC }

connection-info:

machine-name:port-number/dbname ] | data-source-name }

Examples

Example 1

Creates a remote server for the JDBC-based Adaptive Server Enterprise server named ase_prod. Its machine name is “banana” and port number is 3025.

CREATE SERVER ase_prod
CLASS 'asejdbc' 
USING 'banana:3025'

Example 2

Creates a SQL 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'

Example 3

Creates a remote server for the Oracle server named oracle723. Its ODBC Data Source Name is “oracle723.”

CREATE SERVER oracle723
CLASS 'oraodbc'
USING 'oracle723'

Usage

CREATE SERVER defines a remote server from the Sybase IQ catalogs.

For more information on server classes and how to configure a server, see Chapter 5, “Server Classes for Remote Data Access” in the System Administration Guide: Volume 2.

USING clause If a JDBC-based server class is used, the USING clause is hostname:port-number [/dbname] where:

For more information, see “JDBC-based server classes” in Chapter 5, “Server Classes for Remote Data Access” in the System Administration Guide: Volume 2.

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.

READ ONLY The READ ONLY clause specifies that the remote server is a read-only data source. Any update request is rejected by Sybase IQ.


Side effects

Automatic commit.

Standards

Permissions

Must have DBA authority to execute this command.

See also

“ALTER SERVER statement”

“DROP SERVER statement”