Adapter and SQL/MED Parameters

<< Click to Display Table of Contents >>

Navigation:  Administering SQLstream Blaze > Configuring s-Server >

Adapter and SQL/MED Parameters

Previous pageReturn to chapter overviewNext page

SQLstream adapters and other SQL/MED access to external data use parameters specified as OPTIONs in the DDL for their FOREIGN DATA WRAPPERs, SERVERs and any FOREIGN STREAMs based on them.

To find the configuration options for a particular adapter, see the documentation for that adapter. SQL/MED and related adapter matters are covered in the SQLstream Software Development Kit (SDK).

Note that, like Java parameters, adapter and other SQL/MED parameters can perform variable expansion and substitution. The variable reference takes the form of a dollar sign followed by the name of the variable in curly braces. Such a property is evaluated at the time the DDL is executed (define time).

For example, the foreign server defined in the Edamame demo uses the variable aspen.home.dir to set the root directory for its log files under the SQLstream installation directory:

CREATE OR REPLACE SERVER "WebAppServer"

   FOREIGN DATA WRAPPER "LogStream"

   OPTIONS (ROOT '${aspen.home.dir}/temp')

   DESCRIPTION 'Server for webapp login stream';

 

Variables whose values are undefined are empty. For example, if aspen.home.dir were undefined, the ROOT parameter in the above example would evaluate as '/temp'.

Configuring JDBC Driver Connections from Other Hosts

The instructions in this section enable you to configure the SQLstream s-Server to accept JDBC driver connections from other hosts, even if the server is behind a NAT router.

SDP Requirements

The SQLstream JDBC driver connects to SQLstream s-Server using SDP. SDP requires that the hostnames match at both ends of a remote connection. That means that the server must have

An IP address reachable from client systems
A host name that resolves to that address for the client (either through DNS or an explicit host name mapping such as an entry in the client's /etc/hosts file)
Configuration files that use the resolvable host name or the explicit IP address

Here are the configuration requirements:

/etc/hosts

Many Linux systems will, by default, assign a system's host name to the loopback interface (IP address 127.0.0.1). For a server installation that other systems will connect to, you need to ensure that the host name is explicitly assigned to the external IP address:

127.0.0.1 localhost

a.b.c.d hostName.domain hostName

 

$SQLSTREAM_HOME/aspen.properties

The aspen.properties file needs to specify the host name of the server in a way that can be resolved by client systems or else use the IP address:

aspen.sdp.host=<hostName or a.b.c.d>

 

JDBC URI

The client system connects to the server via a URI that uses the host name (or IP address) just as specified in aspen.properties:

jdbc:sqlstream:sdp://<hostName>:<port>, autoCommit=false

jdbc:sqlstream:sdp://<a.b.c.d>:<port>, autoCommit=false

 

The port specified in aspen.controlnode.url must match aspen.sdp.port. The hostName or IP address specified in aspen.controlnode.sdp.host and aspen.controlnode.url must be resolveable/visible from both the client and the server.