Welcome to PrimeBase 4.5

Copyright © 2008, PrimeBase Systems GmbH. All rights reserved.


Documentation and Support
Installing and Running the Data Server
Important Security Concerns
Post Installation Setup
Starting and Stopping Servers
Developer and Demo Versions
Administration using a Web browser
Server Default Setup
Using Server Scripts
Interactive SQL/PBT
Description of Installation Contents


Welcome to PrimeBase 4.5

PrimeBase is a development platform for the production of client/server and web applications. It consists of 3 main products: the PrimeBase Database Server, the PrimeBase Application Server, and the PrimeBase Open Server, all of which are based on open standards.

The PrimeBase Database Server is a relational Database Management System (DBMS) for Mac, UNIX and Windows platforms. The PrimeBase Database Server supports all common database access standards (PBT, SQL, ODBC, JDBC, PHP, Perl, RealBasic, EOF and DAL) and protocols (TCP/IP, Shared Memory and Appletalk).

The PrimeBase Application Server allows rapid development and deployment of Web applications. The PrimeBase Application Server has many features that make implementing a Web application simple and efficient, including: an object-oriented programming environment and framework and multi-processor capabilities to ensure unlimited scalability.

The PrimeBase Open Server allows the PrimeBase Application Server or other applications using the PrimeBase Virtual Machine to connect to alternate data sources via PrimeBase Open Server plug-ins loaded by the PrimeBase Open Server. For example the Oracle plug-in enables you to access an Oracle database, or by loading the ODBC plug-in you will be able to access data servers via their ODBC drivers.

Documentation and Support

Some of the PrimeBase documentation including reference manuals and user guides is provided in PDF (Portable Document Format) and may be read and printed using Adobe Acrobat available, free of charge, from http://www.adobe.com. Other documentation is provided in HTML format and can be viewed with any browser.

Should you still have problems with the installation of this software, or you have any other questions then you are free to contact us by telephone at ++49 3890440 or via e-mail: support@PrimeBase.net. If you have general support questions that may be interesting to the entire PrimeBase community, then we suggest you visit our Web-site, www.PrimeBase.net, and join our mailing list.

Installing and Running the Server

Before starting the PrimeBase Database Server please read the license agreement at the end of this document. Only proceed to use the PrimeBase Database Server if you are in agreement with the terms of this license.

If you have not already done so, we recomend that you create a new user (by convention called 'primebase') on your system for the PrimeBase software. Ensure that you have a least 20 MB of free disk space in the user's home directory.

Under Windows, simply unpack the archive to install the server. Under UNIX a shell script called "Install_PrimeBase" is provided to install the server.

You must run this script as user "root".

You will be asked where you want to install the server (choose a location in the home directory of the user primebase), who the owner of the server should be, and whether the server should be started at boot time.

Important Security Concerns

The administration server runs as the same user as the Database Server. If you are running the Database Server as user 'root' or equivalent then anyone who is able to log into the administration server will be able to upload and download files as 'root'. This can be very dangerous if a malicious user were to overwrite a file which the Database Server executes automatically on start up. So for this reason it is strongly recommended that the Database Server NOT be installed as root.

Post Installation Setup

In addition to the actual server installation, the installer places global resources in the location called $PRIMEBASEHOME. This is by default '/usr/local/primebase'.

After running the installer we recommend that you add the following path to your system PATH:


This is the default location of all the PrimeBase executables.

Starting and Stopping Servers

You may use 'pbctl' to start, and stop any server installed on your machine, and to make changes to the installation. Enter 'pbct -h' for more information on 'pbctl'.

Alternatively you can use the 'start_data_server' and 'stop_data_server' shell scripts to start and stop the server.

To attach a console to a database server running in the background, start the console (pbcon) program or use the 'data_server_console' script. The console executable may be started from any directory on the server machine.

At the console you can log-in to the server as System Administrator (see below for login details).

You can then enter '#help' for help on the console commands.

You may enter CTRL-R to detach the console, leaving the server running in the background.

Developer and Demo Versions

The software in this directory will run for a limited period only. The activation information, including the expiry date is stored in the file 'pbds.key' in this directory.

When the demo period has expired the server will still start but will not run for longer than 2 hours.

You may request an extension to this demonstration period for development purposes by sending an e-mail to support@PrimeBase.net. Please state the nature and duration of you project.

We will send you a new 'pbds.key' file. To activate the server, replace the file in this directory and restart the server.

Administration using a Web browser

When the PrimeBase Database Server starts it automatically starts the Administration Server (dsa) as well.

You can connect to the Admin Server using a JavaScript capable browser (Version 3.0 or later of Netscape Navigator or MS Internet Explorer).

The default URL is http://<host_ip_address>:46914

<host_ip_address> is the TCP/IP address or host name of the machine on which the database server is running. You can use 'localhost' or '' if the browser and database server are running on the same machine.

The Admin server will require you to enter your password in a text file called 'password.adm' (in the server folder), before you can continue. NOTE: This is the password for access to the Admin Server only. After connecting to the Admin Server you will be required to login to the PrimeBase Server as "System Administrator" (ee below for login details).

If the PrimeBase Data Server is running on the same machine as your browser you can use this link to access the Admin Server: Admin Server

Server Default Setup

The directory 'databases' contains the databases currently mounted by the server. This includes the Master and Model databases. Place databases in this folder that you wish to mount without having to specify the location.

By default, backups you make will also be placed in this folder.

The server has been installed with the following defaults for system administrator and server name:

* User Name & Password:

The server is maintained by the "System Administrator", who has all privileges and access rights. By default the user name of the system administrator for the server is:


with no password.

To login to the server, use the name 'administrator' (user names are not case-sensitive) and no password.

Once you have installed your server, we recommend that you connect to the Admin Server using a browser as describe above, and set the system administrator's password.

If you wish to alter the name of the system administrator then you can create a new user in the Master database, and grant the user SA privileges using the Admin Server.

* The Server Name:

The server has the name 'PrimeServer' by default. If you wish to run more than one server you will need to change the server's name.

To change the server name, login to the Admin Server and click on the server name to change it. The Admin Server will require you to login to the server as a system administrator (default name 'Administrator', with no password).


Using Server Scripts

You will find some useful PrimeBase scripts in the 'setup/scripts' directory. To run a script, login at the server console (start the pbcon executable if necessary) and enter:

execute file "<script name>";

then CTRL-G, to execute a script.

Here is a list of a few of the scripts that you will find along with a short desciption:

admin.dal: Procedures to help administer server locations and partitions used for database backups. After executing the script enter "help_locations;" and "help_partitions;"  followed by CTRL-G to get more help on how to use the script.

backup.dal: Procedures to help administer and control backups. After executing the script enter "help_backup;" and "help_groups;"  followed by CTRL-G to get more help on how to use the script.

reorgall.dal: Declares the procedure reorgall() which can be used to  reorganise all the tables in a database.   Reorginizing tables compacts the data file and rebuilds all indexes.  This will improve the server's performance and reduce the disk space required by the database. How often this should be done depends on how often "updates", "inserts", and "deletes" are done on the database.

schema.dal: Declares the procedure Schema() which prints the CREATE statements for a
 given table name. After executing the script enter "SchemaHelp;"  followed by CTRL-G to get more help on how to use the script.

showall.dal: Declares the procedure showall() which can be used in place of the standard procedure printall to display the results of a select statement. Showall() will display the formated data along with column headers where printall will display just the data. After executing the script enter "select * from systables; showall;"  followed by CTRL-G to see an example of it's output. You must first have a database open of course.

Interactive SQL/PBT

An alternative to the server console is the "interactive SQL shell" provided by the PrimeBase Automcation Client. To use interactive SQL, run the automation cllient binary, 'pbac'.

The automation client allows you to create a connection definition, which you can then use to connect to the server.

After login, your can enter any PBT (a super-set of SQL) statement, and the '#go'. For example:

create database my_db;
open database my_db;
select * from SysObjects; printall;


Description of Installation Contents

The server's insstallation directory contains:

start_data_server   - A shell script used to start the server up in the
stop_data_server    - A shell script used to stop the server running in this
data_server_console - A shell script used to connect an interactive console
                      to the server running in this location.

documentation.html  - this HTML file contains links to the PrimeBase
                      documentation installed on your machine.

setup/pbds.env      - the server environment file. It contains copies of the
                      server system parameters, stored in the master database,
                      and is used to boot the server.

setup/scripts       - directory containing commonly used scripts.

admin/setup         - directory containing the Admin Server preferences and
                      configuration information.
admin/xfer          - directory containing the default locations for uploading
                      and downloading files for the Admin Server. Some example
                      database schema scripts and data are provided.

databases/Master    - the master database.
databases/Model     - the model database.