2.1 Starting and Stopping

2.1.1 Linux, Mac OS X, and other Unix

A MonetDB/XQuery is built on the MonetDB engine (Mserver). The XQuery functionality is provided by the pathfinder extension module, which contains the Pathfinder XQuery-to-Relational compiler.

The server is thus started with the following command:

prompt> Mserver --dbinit="module(pathfinder);" 

Other relevant options are:

  • --dbname=<DBNAME> specify which database to open. If omitted, MonetDB uses the default database name demo. All database files are located in the <gdk_dbfarm>/<DBNAME> and <xquery_logs>/<DBNAME> directories. The values of gdk_dbfarm and xquery_logs are set in the MonetDB.conf file (see MonetDB.conf).
  • --set <OPTION>=<VALUE> Any variable defined in MonetDB.conf can be overridden at server startup. If you have multiple database instances, apart from --dbname you will typically have to specify a --set mapi_port=XXX to avoid errors caused by two Mservers on the same machine trying to use the same TCP/IP port.

When the server starts up, you should see something like:

# MonetDB Server v4.20.0
# based on GDK   v1.20.0
# Copyright (c) 1993-2007, CWI. All rights reserved.
# Compiled for i686-pc-linux/64bit with 32bit OIDs; dynamically linked.
# Visit http://monetdb.cwi.nl/ for further information.
# PF/Tijah module v0.3.0 loaded. http://dbappl.cs.utwente.nl/pftijah
# MonetDB/XQuery module v0.20.0 loaded
# XRPC administrative console at http://localhost:50001/admin
MonetDB>

This tells that:

  • the database software uses the 4.20 version of MonetDB, based on the 1.20 kernel, and the 0.20 XQuery front-end.
  • the software was compiled for 64-bits Linux PCs using 32-bits OIDs
  • the administrative GUI has started on http://localhost:50001/admin

Warnings like the following:

!WARNING: GDKlockHome: created directory /local/MonetDB/ 

are normal: the server creates an empty database if you run it for the first time.

Stopping the server The server is stopped by typing exit(); in the MonetDB console prompt (or by killing the Mserver process using CTRL-C or kill).

However, the exit(); method is to be preferred, as it checkpoints the database and clears the log. Thanks to the empty log, server startup will be much faster, as no recovery will be needed.

2.1.2 Windows

Simply click: 'Start' -> 'Programs' -> 'MonetDB XQuery' -> 'MonetDB XQuery Server'. This will start the MonetDB Server with XQuery support in a separate window. Although the window comes with an interactive prompt, you should (unless you know what you are doing) keep this window minimized.

Stopping the server To stop the MonetDB Server, you can close the MonetDB XQuery Server window, or type exit(); in the server window, as described earlier.

Regrettably MonetDB is not yet available as a windows service. It has to be started explicitly by a logged in user.