|
|
The SQLHOSTS File
A line of text beginning with the character sequence
--is interpreted as a comment in theSQLHOSTSfile.The
SQLHOSTSfile contains three sections, called:DEFAULT,LOCALandREMOTE.The names of the local databases on the current node are listed in the
LOCALsection, see LOCAL Section and the names of the remote databases accessible from the node are listed in theREMOTEsection, 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
DEFAULTsection, see Default Section.Database names may, in general, be up to 128 characters long and are case-insensitive.
The Default SQLHOSTS File
When the Mimer SQL system is installed on a node, the following default
SQLHOSTSfile 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)
example_localdb /directory(VMS)
example_localdb DISK:[DIRECTORY]-- ============================================================================= REMOTE: -- -- Database Node Protocol Interface Service -- ------------------ ------------------ -------- --------- -------------------- example_remotedb server_nodename '' '' 1360Default Section
The
DEFAULTsection 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
LOCALorREMOTEsections.LOCAL Section
The
LOCALsection contains a list of all the local databases residing on the current machine, see The Local Database.Each line under the
LOCALkeyword should contain two fields, separated by one or more blanks or tab characters. The first field specifies the database name.
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
SYSDBwill be located in the database home directory and other databanks will typically be located relative to it, see Locating Databank Files.REMOTE Section
The
REMOTEsection 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
REMOTEsection contains up to five fields, separated by spaces and/or tab characters.The
DATABASEfield specifies the name of the remote database.The
NODEfield should specify the network node name of the remote machine. If the
TCP/IP interface is used, the IP address may be specified here.The
INTERFACEfield is currently not used. Specify''(two single quotation marks) here.If using TCP/IP, the
SERVICEfield 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.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
DECNET - OpenVMS Only
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
MIMBUILD9procedure).To achieve this, the
SQLHOSTfile must be updated in a specific way using a 6th parameter in the remote definition, as shown in the following example (current node isstartrek, i.e. where the Mimer SQL version 9 databasem9serverruns):-- -- =========================================================================== 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 m9serverTo access the
m9serverdatabase, the Mimer SQL version 7 application must connect to the databasem9access.In this case the
startreknode 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 Information Technology AB Voice: +46 18 780 92 00 Fax: +46 18 780 92 40 info@mimer.se |
|
|