Mimer SQL Documentation TOC PREV NEXT INDEX

Mimer SQL Developer Site


The SQLHOSTS File


A line of text beginning with the character sequence -- is interpreted as a comment in the SQLHOSTS file.

The SQLHOSTS file contains three sections, called: DEFAULT, LOCAL and REMOTE.

The names of the local databases on the current node are listed in the LOCAL section, see LOCAL Section and the names of the remote databases accessible from the node are listed in the REMOTE section, see REMOTE Section.

One of the local or remote databases can be set to be the default database for the node by specifying its name in the DEFAULT section, see Default Section.

Database names may, in general, be up to 128 characters long and are case-insensitive.

VMS: The maximum length for the name of a database on an OpenVMS node is 30 characters.

The Default SQLHOSTS File

When the Mimer SQL system is installed on a node, the following default SQLHOSTS file is automatically generated:

 -- -----------------------------------------------------------------------------
 --
 --  S Q L H O S T S
 --  ===============
 --
 --  This file contains a list of all databases, local and remote, accessible
 --  from the node where the file resides.
 --
 --  The DEFAULT label
 --  -----------------
 --  Name of default database. Can be either a REMOTE or LOCAL database name.
 --  Can be overridden by setting MIMER_DATABASE to the name of a database.
 --
 --  The LOCAL label
 --  ---------------
 --  A list of all local databases on the current node, containing the
 --  database name and a directory specification (Path).
 --  UNIX Path -     database home, and directory path for databank lookup.
 --  VMS Path -     database home.
 --
 --  The REMOTE label
 --  ----------------
 --  A list of all remote databases containing the database name, the database
 --  node, the protocol to be used, the protocol interface and the protocol
 --  service to be used.
 --
 --  Protocol, Interface and Service may be defaulted by entering ''.
 --
 --  Node -      network node name for computer on which the database resides.
 --  Protocol -  currently tcp is supported. (tcp or '' should be specified)
 --  Interface - currently not used ('' should be specified).
 --  Service -   corresponds to the port number used in TCP/IP. The port number
 --              Default is 1360, i.e. the port number reserved for MIMER.
 --              On UNIX: The port number may either be a number or a name of a
 --              service stored in the /etc/services file.
 --
 -- =============================================================================
 DEFAULT:
 --
 -- Database
 -- -----------------------------------------------------------------------------
    example_localdb
 -- =============================================================================
 LOCAL:
 --
 -- Database           Path
 -- ------------------ ----------------------------------------------------------

(UNIX) SINGLE .

(VMS) SINGLE SYS$DISK:[]

(UNIX) example_localdb /directory

(VMS) example_localdb DISK:[DIRECTORY]

 -- =============================================================================
 REMOTE:
 --
 -- Database           Node               Protocol Interface Service
 -- ------------------ ------------------ -------- --------- --------------------
    example_remotedb   server_nodename    ''       ''        1360
 

Default Section

The DEFAULT section contains a single line that specifies the default database which will be used by an application that does not explicitly specify a database to connect to, see The Default Database.

The default database should be one of those listed in the LOCAL or REMOTE sections.

LOCAL Section

The LOCAL section contains a list of all the local databases residing on the current machine, see The Local Database.

Each line under the LOCAL keyword should contain two fields, separated by one or more blanks or tab characters. The first field specifies the database name.

UNIX: On a UNIX node, the second field may be a colon (:) separated search path specification.
The first directory in the search path is taken as the database home directory and the other directories in the search path will be used to locate databank files which have a file specification stored in the data dictionary without an explicit directory.

VMS: On an OpenVMS node, the second field specifies a directory which will be the home directory for the database.

The Mimer SQL system databank SYSDB will be located in the database home directory and other databanks will typically be located relative to it, see Locating Databank Files.

REMOTE Section

The REMOTE section contains a list of all accessible databases that reside on other nodes in the network environment, see Accessing a Database Remotely.

Access to these databases is provided by using either DECNET or TCP/IP to establish a client/server connection to the remote machine.

Each entry in the REMOTE section contains up to five fields, separated by spaces and/or tab characters.

The DATABASE field specifies the name of the remote database.

The NODE field should specify the network node name of the remote machine. If the
TCP/IP interface is used, the IP address may be specified here.

UNIX: The PROTOCOL field should specify tcp or two single quotation marks ''.

VMS: The PROTOCOL field may specify DECNET or TCP depending on the type of network protocol that should be used to create the client/server connection. The default, specified by two single quotation marks '', is TCP.

The INTERFACE field is currently not used. Specify '' (two single quotation marks) here.

If using TCP/IP, the SERVICE field specifies the TCP/IP port number the database server uses. The default is 1360, which has been reserved by Mimer Information Technology AB for Mimer SQL client/server communication.

UNIX: When TCP/IP is used under UNIX, the value in the SERVICE field may be the actual port number, the name of a service stored in the /etc/services file or two single quotation marks '' for the default value 1360.

VMS: For a Mimer SQL version 9 (or 8) database server using DECNET, the SERVICE field should contain the database name, which is also the default.
The server listens to the network object using the same name as the database.
A Mimer SQL version 7 database server using DECNET listens to the network object named MIMER.

Remote Section Parameters

The remote section parameters are summarized below, depending on the protocol selected. The character sequence '' is two single quotation marks and specifies the default value for a parameter:

TCP

Parameter
Explanation
 DATABASE

remote database name

 NODE

TCP/IP node name or IP number

 PROTOCOL

''

 INTERFACE

''

 SERVICE

CP/IP_port_number or TCP/IP service name or ''

Note: When '' is used to specify the default SERVICE, the TCP/IP port number 1360 will be used.

DECNET - OpenVMS Only

Parameter
Explanation
 DATABASE

remote database name

 NODE

decnet node name

 PROTOCOL

DECNET

 INTERFACE

''

 SERVICE 

decnet network object or ''

Note: When '' is used to specify the default SERVICE, the value of remote database name will be used for Mimer SQL version 8 and 9 and the value MIMER will be used for Mimer SQL version 7.

Local Client/Server Access

It is possible to use the client/server interface locally, i.e. having a remote database definition pointing to a local database server. This is the recommended access method when using Mimer SQL version 7 tools, such as QL and PG, towards a Mimer SQL version 9 database un Unix (on OpenVMS, use the MIMBUILD9 procedure).

To achieve this, the SQLHOST file must be updated in a specific way using a 6th parameter in the remote definition, as shown in the following example (current node is startrek, i.e. where the Mimer SQL version 9 database m9server runs):

 --
 -- ===========================================================================
 DEFAULT:
 --
 -- Database
 -- ---------------------------------------------------------------------------
    m9access
 -- ===========================================================================
 LOCAL:
 --
 -- Database           Path
 -- ------------------ --------------------------------------------------------
    m9server           /database/m9server:/mnt1/m9server:/mnt2/m9server
 -- ===========================================================================
 REMOTE:
 --
 -- Database           Node               Protocol Interface Service
 -- ------------------ ------------------ -------- --------- ------------------
    example_database   server_nodename    ''       ''        1360
    m9access           startrek           ''       ''        1360      m9server
 

To access the m9server database, the Mimer SQL version 7 application must connect to the database m9access.

In this case the startrek node must have both a Mimer SQL version 7 license (for the application) and a Mimer SQL version 9 license (for the database server). The Mimer SQL version 9 license must include client/server connections.


Mimer
Mimer Information Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40
info@mimer.se
Mimer SQL Documentation TOC PREV NEXT INDEX