CREATE SERVER (Define a foreign server)

Function

Defines a foreign database as a foreign server.

Privileges

Users with the DBA privilege
These users can define foreign servers.

Format

CREATE SERVER foreign-server-name
   TYPE 'server-type' VERSION 'server-version'
   OPTIONS (option-name 'option-value')

Operands

Specifies the name of the foreign database that HiRDB accesses.

The specified name must be a name that can uniquely identify a server within HiRDB or a foreign server. The foreign server name specified in this operand is for HiRDB to identify a foreign database; it can be different from the actual name of the foreign database.

For server-type and server-version, specify the server type and server version of the DBMS to be accessed.

The following server types and server versions are available:

DBMSServer typeServer version
XDM/RD E2#1XDMRD6.0
HiRDB Version 5.0HIRDB5.0
HiRDB Version 6 or laterHIRDB6.0
ORACLE 8iORACLE8.1.5#2
ORACLE 9iORACLE9.2
ORACLE 10gORACLE10.1
DB2#3DB2_UDB_OS3906.0
#1: Uses the XDM/RD E2 connection facility that connects to XDM/RD E2 from the HiRDB client via the DB connection server.
#2: The Oracle version that can be connected depends on the foreign server platform:
HP-UX: Can be connected to Oracle 8i, version 8.1.5 or later.
Other than HP-UX: Can be connected to Oracle 8i, version 8.1.7.
#3: Limited to the HP-UX and AIX versions.

Specifies the following options on foreign databases; options cannot be specified in duplicate.

USING_BES 'back-end-server-name'
Specifies the name of the back-end server that accesses the foreign database. This option is required.

Common rules

  1. To access a foreign database, you need to define a user mapping by using CREATE USER MAPPING.
  2. CREATE SERVER can be specified in an environment where HiRDB External Data Access is installed and on a HiRDB/Parallel Server.

Note

  1. CREATE SERVER cannot be specified from an X/Open compliant UAP running under OLTP.