There are no differences between a database that is accessed by Zim Server and a database that is accessed directly by Zim. In fact, a database can be accessed simultaneously by one or more Database Agent processes and directly by local multi-user Zim applications.
Consequently, the steps for setting up a database for use with Zim Server are the same as for setting up any Zim database. The main steps are
| Initialize the Object Dictionary | In this step, you choose a directory in which you wish to store the database. Then you execute the ZIMINIT utility. |
| Run the Zim Development System | Having created a database in the first step, you now start up the Zim Development System. |
| Enter the Zim Development Center | You can enter the Development Center by executing the DC command from the command prompt:
> dc |
| Define and Create EntitySets and Relationships | Using the Development Center, define the various EntitySets and relationships that make up your database. DC automatically creates these objects as you define them. |
| Load Data | If you have any initial data to be loaded into the database, you can at this point. |
Once the database has been created, defined and loaded, you can exit the Zim Development System.
Because there are no differences between databases to be accessed by Zim Server and those to be accessed by local Zim applications, existing databases are ready for use with the Server. If a database already exists but is not on the server machine, the database definitions must be moved from one machine to another.
In this case, the task is to set up a Zim database on the server platform with the appropriate database object definitions. Use the following steps:
Like other versions of Zim, the Zim Database Agent process reads a config.zim file when it starts. To set up a standard config.zim file that is used by all Database Agent processes, create a file called config.srv in the database directory. This file can be created using any text editor and can contain any configuration entries permitted in config.zim. The Zim Server process uses config.srv to create a specific config.zim for each Database Agent process as it is started.
When a Zim application wants to connect to ZIM INTEGRATED SERVER, it uses the CONNECT command and specifies a server machine address and a logical database name. This logical name is passed to the server machine where it is looked up by the Zim Server process in a file called zimdb.zim. This is an ASCII file you should set up (using any text editor) and must be located in the directory pointed at by the ZIM environment variable. Each line in the file is of the form
logical name ; database directory path name
The logical name can be any string as long as it does not contain blanks. The database directory path name is the location of the Zim database that corresponds to the logical name. The two fields are separated by a semicolon. Of course, the database directory can contain an areas.zim file that indicates that certain database files are stored elsewhere.