Show TOC

CREATE SERVER StatementLocate this document in the navigation structure

Adds a server to the ISYSSERVER table.

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

server-class - (back to Syntax)
ASAJDBCASEJDBC 
      | SAODBC  
      | ASEODBC
      | DB2ODBC  
      | MSSODBC 
      | ORAODBC  
      | ODBC }

connection-info - (back to Syntax)
<machine-name:port-number></dbname> ] | <data-source-name> }
Parameters

(back to top)

  • USING if a JDBC-based server class is used, the USING clause is <hostname:port-number [/dbname]> where:
    • hostname the machine on which the remote server runs.
    • portnumber the TCP/IP port number on which the remote server listens. The default port number for SAP IQ and SAP® SQL Anywhere® is 2638.
    • dbname for SAP SQL Anywhere remote servers, if you do not specify a <dbname>, the default database is used. For SAP ASE, the default is the master database, and an alternative to using <dbname> is to another database by some other means (for example, in the FORWARD TO statement).

    If an ODBC-based server class is used, the USING clause is the <data-source-name>, which is the ODBC Data Source Name.

  • READ ONLY specifies that the remote server is a read-only data source. Any update request is rejected by SAP IQ.
Examples

(back to top)

  • Example 1 create a remote server for the JDBC-based SAP ASE 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 create a SAP SQL Anywhere remote server named testasa on the machine “apple” with listening on port number 2638:
    CREATE SERVER testasa
    CLASS 'asajdbc'
    USING 'apple:2638'
  • Example 3 create a remote server for the Oracle server named oracle723. Its ODBC Data Source Name is “oracle723”:
    CREATE SERVER oracle723
    CLASS 'oraodbc'
    USING 'oracle723'
Usage

(back to top)

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

Side Effects
  • Automatic commit
Standards

(back to top)

  • SQL—ISO/ANSI SQL compliant.
  • SAP Database products—Supported by Open Client/Open Server.
Permissions

(back to top)

Requires the SERVER OPERATOR system privilege.