Types of Configuration Files

Types of Configuration Files

Welcome to our Knowledge Base

Documentation | Blog | Demos | Support

< All Topics
Print

Types of Configuration Files

Configuration files are used to provide configuration options for various Zim:X programs utilities.

They can be created or modified using any text editor or, in some cases, by means of the ZimAdmin utility.

There are seven types of configuration files. The following table shows these configuration files in Zim:X, their corresponding file names, locations, and whether they are editable in ZimExplore.

Configuration File TypeFile NameLocationEditable in ZimExplore
ZimServerzimconfig.srvZim:X installation directory
Zim Databaseszimdb.zimZim:X installation directory✔ (implicitly)
Servers Aliaszimalias.zimZim:X installation directory
ZimBackupzimbk.zimZim:X installation directory
Databasezimconfig.zimZim:X database directory
Foreign directoriesdirs.zimZim:X database directory
Areasareas.zimZim:X database directory

Configuration Files Format

If you decide to create or edit a configuration file, you must enter one option on each physical line of the file; if you use ZimExplore, this utility already provides all options and reads and writes the files for you.

If you want to include a comment in a configuration file, start the comment line with a percent sign (%).

Database Configuration File (zimconfig.zim)

The database configuration file specifies options that are to be identical for all users of a particular application database. It contains options to describe the way an application is presented, how certain memory parameters have to be dealt with, etc.

Each database can have only one database configuration file. This configuration file must be located in the operating system directory where the database resides.

Every time a user starts a Zim:X session using a particular database, its corresponding database configuration file is read and the existing valid configuration options become available to the running Zim:X program. Configuration options that are either omitted or invalid get their values from the defaults.

This file is optional and does not need to be present in each database because, in most cases, the default options are quite general and apply to most Zim applications.

If you change this configuration file while a Zim:X session is running, the changes will not affect the session.

All valid database configuration options are described in the section called “Database Configuration”.

Zim Server Configuration File (zimconfig.srv)

The ZimServer configuration file specifies the configuration options for its operation. It must be located in the operating system directory where the Zim:X software was installed (on Unix, this place is called $ZIM) and is only read at the time ZimServer is started.

Even though this file is optional and does not need to be present, it is a good idea to set its parameters to the specific needs and resources available.

All valid ZimServer configuration options are described in the ZimIDE section called ZimServer Configuration.

Zim:X Databases Configuration File (zimdb.zim)

The Zim:X databases configuration file tells ZimServer what databases need to be serviced. It is read when ZimServer starts only and it is located in the operating system directory where the Zim:X software was installed (on Unix, this place is called $ZIM).

This file is obligatory and must contain at least one reference to a database. Each line of this file contains a reference to a Zim:X database in the format:

<database number> ; <database name> ; <location of the database>; backup;

Where:

<database number> is a unique identification number for this database, ranging from 1 to 240;

<database name> is a unique name of the database. This is the name that should be used by Zim:X executables when connecting to a particular database. The rules to create names are the same as Zim:X uses, that is, a maximum of 18 characters long with no special characters. The name is not case-sensitive;

<location of the database> is the full path where the database resides in the hardware running ZimServer for efficiency purposes. When ZimServer starts, it checks for the existence of the database and performs some actions before allowing the first user to connect to it;

<backup> whether this database should be backed up by ZimBackup or not.

All three parameters above cannot be repeated in the configuration file.

An example of zimdb.zim file is:

% 1; MyTest; c:\mytest\xxx    % This database is ignored by Zim Server
22;Example;/usr/zim/example
12;sales;t:\databases\sales;backup;

Zim:X Backup Configuration File (zimconfig.bkp)

The ZimBackup configuration file tells what databases that are going to be backed up. Its structure is exactly the same as described in the database configuration file and it is located in the operating system directory where the Zim:X software was installed (on Unix, this place is called $ZIM).

Foreign Directories Configuration File (dirs.zim)

The foreign directories configuration file informs where Zim:X can find a foreign directory in case of an ACCESS command is issued.

This file (dirs.zim) is located in the database directory and is read by ZimServer upon its start only.

Each entry in the foreign directories file has the format:

<dirid> <file number> <path>

where

<dirid> is the DirId of the foreign directory as defined in the entity set Dirs;

<file number> is the number of the file that corresponds to the directory in the host database (i.e. nnnn to ZIMnnnn);

<path> is the location where this directory can be found together with the correspondent ZIMnnnn.ws directory.

For example, the entry

23 126 \usr\tools

means that the directory whose DirId is 23 can be found in the file \usr\tools\zim0126

Areas Configuration File (areas.zim)

The areas configuration file enables the distribution of Zim:X database files within the limits of the network. Its main purpose is to relocate files to places different from where the database is sitting. A good example is to move a very large Zim file to another disk drive, thus spreading disk activity to more than one physical disk.

Zim:X files that can be referenced by the areas configuration file are those corresponding to entity sets, relationships, directories and compiled application programs.

The areas file areas.zim is located in the database directory and it is read by ZimServer upon its start only.

Entries in the areas file indicate the locations to which particular files were distributed, one entry per line, and each entry must take the form:

<nnnn> <path>

where

<nnnn> is the number taken from the file name (i.e. ZIMnnnn) of the file that corresponds to the desired directory, entity set, or relationship.

<path> is the name of the operating system directory where the file ZIMnnnn is to be found. If ZIMnnnn is a file that stores a Zim directory, then <path> is also the location where the operating system sub-directory for compiled application programs (ie ZIMnnnn.WS) is found.

<path> can be preceded by three of the same special relocation prefixes used with document file names (see special document file names). The table below describes the meaning of the prefixes when used with path.

It only needed to specify entries for Zim files that need to be relocated. Zim files not referenced will be assumed to be in the usual place, that is, the database directory.

An example of areas.zim file:

0103 c:\databases\example   % the file is found in c:\databases\example\zim0103
0250 "                      % the file is found in <database directory>\zim0250

Servers Alias Configuration File (zimalias.zim)

Zim:X enables you to connect to more than one SQL server at the same time. This allows you to perform join operations between different databases on different machines managed by different database servers. No support for distributed concurrency control is available; updates that span multiple servers, though permitted, should be performed with care.

As shipped, Zim:X is configured to support one connection to each server type (either ZIMSERV or JDBCSAM) by default. You can re-configure Zim:X to enable multiple concurrent connections to different instances of the same server type like the following examples.

In an environment with two different machines where each one is servicing one or more Zim databases via ZimServer, if a Zim application needs to retrieve data from both servers at the same time, it would have to connect to both servers with different connection parameters. For Zim, both servers would have the same “ZIMSERV” identification which would be misleading. In this case, one of the servers could still be identified as “ZIMSERV” whereas the other one would receive an alias name like “ZIMSERV2” or any other proper name. Now, both connections can be performed at the same time and data retrieval will be correctly performed.

The same line of thought happens when there are a mixture of more than one SQL database servers and/or Zim:X Servers.

This file is a regular text file that can be maintained by any regular text editor where each line of the file contains the following information:

OptionInterpretation
server numberAny number between 2 and 255 with the exception of 15 and 16 for backward compatibility.
server typeThe type of the server: it can be either  “ZIMSERV” or “JDBCSAM”.
alias namename other than “ZIM”, “ZIMSERV” and “JDBCSAM” to identify the alias of a server.

At Zim:X installation, this file does not exist but it is assumed to have the following three fixed entries (that is why 1, 15 and 16 cannot be used for a new alias):

 1 ZIM     ZIM
15 ZIMSERV ZIMSERV
16 JDBCSAM JDBCSAM

If a new alias should be created, a single line can be placed in “zimalias.zim” like this:

25 ZIMSERV ZIMSERV2
33 JDBCSAM MYJDBC

In the examples above, the string “ZIMSERV2” is the alias for “ZIMSERV” and the string “MYJDBC” is an alias for “JDBCSAM”.

If entries 1, 15, and 16 are also placed there, they will be ignored.

Notice that each piece of information is separated by spaces and, therefore, no information can contain spaces in it. The server type and alias name strings cannot exceed 8 characters in length.

Was this article helpful?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.

Leave a Reply

Your email address will not be published. Required fields are marked *

en_CAEnglish