Skip to Content

control {MonetDB.R}

Control a MonetDB server from the R shell.
Package: 
MonetDB.R
Version: 
0.9

Description

The MonetDB server can be controlled from the R shell using the functions described below. The general process is to generate a MonetDb database directory and startup script using monetdb.server.setup, then pass the path to the startup script to monetdb.server.start. This function will return the process id of the database server, which in turn can be passed to monetdb.server.stop to stop the database server again.

Usage

monetdb.server.setup(database.directory,monetdb.program.path, 
    dbname = "demo", dbport = 50000)
monetdb.server.start(bat.file)
monetdb.server.stop(correct.pid)

Arguments

database.directory
Path to the directory where the initialization script and all data will be stored. Must be empty or non-existant.
monetdb.program.path
Path to the MonetDB installation
dbname
Database name to be created
dbport
TCP port for MonetDB to listen for connections. This port should not conflict with other running programs on your local computer. Two databases with the same port number cannot be accessed at the same time
bat.file
Path to the MonetDB startup script. This path is returned by monetdb.server.setup
correct.pid
Process ID of the running MonetDB server. This number is returned by monetdb.server.start

Values

monetdb.server.setup returns the path to a MonetDB startup script, which can used many times monetdb.server.start returns the process id of the MonetDB database server

Examples

## Not run:
startscript <- monetdb.server.setup("/tmp/database","/usr/local/monetdb/", "db1", 50001)
pid <- monetdb.server.start(startscript)
monetdb.server.stop(pid)
conn <- dbConnect(MonetDB.R(), "monetdb://localhost:50001/db1")
## End(Not run)

Documentation reproduced from package MonetDB.R, version 0.9. License: MPL (== 1.1)