MAXDB (7.6)

From Limbas Wiki

Jump to: navigation, search
This page is a translated version of the page MAXDB (7.6) and the translation is 100% complete.

<-- back to Main Page

Database Server

The easiest way to install the database is to get the rpm packages from the SAP MAXDB page. For x86 Linux you need the following packages: Es werden die folgenden Pakete für x86 Linux benötigt:

  • Release independent
  • Server
  • ODBC
  • Webtools oder Windows Clients

The packages are best saved all in the same directory. Then you can install them by the following command:
rpm –i *.rpm

Afterward the database server can be startet by the command:
/etc/init.d/maxdb76 start


The following message appears when a successful start occurs:

„starting MaxDB services: [root@localhost db]“

The ODBC driver was installed under:
and is required by PHP in later compilation.

Otherwise you can also install the web tools and create and administer new databases via the browser. The LIMBAS package also contains a shell script, which installs a demo database.

If you have an additional Windows client on the network, you should install the MaxDB clients for Windows to manage the database.

MaxDB expects a fully qualified processor name. That means you should make sure that in
the IP-address of the computer can be decomposed.

Excerpt from /etc/hosts:        localhost


In order to use LIMBAS, you need a database instance. This instance can be created in different ways. For the number of instance "only" the hardware is determining.

The following examples create a LIMBAS instance in different ways.

  • creates an instance with the aid of an included script
  • creates an instance by a windows client

Alternatively also the webclient of the database can be used. Its use is not documented here, but it very similar to the windows client installation.

Included skript:

The adapted shell script can be found at:

With its help it is possible, in a very easy way, to create a database instance without basic knowledge of the client installation. During the rpm installation of the MaxDB a user with the name "sdb" was created. At this identifier the installed instances are running. Initially the user does not have a shell. However this shell is neccessary in the following. By the following command this can be changed fast at the root: 

usermod –s /bin/bash sdb
Folgende Schritte müssen nun unternommen werden:

  • start the database server(as root):
    /etc/init.d/maxdb76 start
  • create a shell for the user "sdb":
    usermod –s /bin/bash sdb
  • register as user:
    su – sdb
  • call the script at openlimbas/limbas_src/help/demo_configuration_scripts : : --create LIMBAS LIMBASUSER LIMBASPASS DBCONTROL CONTROLPASS DBA DBAPASS /opt/sdb /var/opt/sdb 7600
Note / Explanation:
LIMBASDatabase Name IP
DBCONTROLDatabase Manager Operator
CONTROLPASSDatabase Manager Operator Password
DBADatabase System Administrator
DBAPASSDatabase System Administrator Password
/opt/sdbabsolute installation path of MaxDB including the directories 7600 and programs
/var/opt/sdbAabsolute installation path of MaxDB including the directory data
7600MaxDB Version

After the successful installation a summary is shown. In addition a demo user is created with which you can log in LIMBAS.


A slightly more individual installation can be done by the help aof the graphical clients. Though in this case the windows firewall should be switched off or the ports TCP 17200 und TCP 17210 should be activated. The windows clients (that are described here) or the web-clients (by browser) can be used. The windows clients are a lot more comfortable as the web clients and offer additional possibilities.

For windows 3 additional client packages must be installed:

  • SQL Studio
  • ODBC Driver

After the installation first the windows ODBC driver must be installed.

--> control panel -> administrative tools -->data sources(ODBC) --> systemDSN

--> add --> selection von Mysql/MaxDB data source

The settings of the newly added data source are:

  • Data Source Name (any name)
  • Server (IP address of the Linux-Servers, here
  • Database (Datenbase name, here LIMBAS)

In the case that MaxDB is installed on a OpenSuse/CentOS the password of the following sdb user must absolutely coded with md5.

Now a new database instance can be created. For this purposes we start the database manager (DBMGUI) and then the „Instance Wizard“ (Create).

  • Select Template: Blank
  • Database Instanz Name
    • Database Server: (Linux IP Adresse)
    • Database name: LIMBAS
    • Logon Name: sdb (wurde vom MAXDB rpm Paket angelegt)
    • Password: pass (must be adjusted or changed: passwd sdb --> pass)
  • Authorisation: Database Manager Operator

With this user you must later log in at DBMGUI (this program). This user can delete the database, change parameters or generate backups BUT CANNOT create tables.

    • User Name: DBCONTROL (freely selectable database control user)
    • Password: CONTROLPASS (freely selectable password)
  • Parameter Initialisation: default values
  • Instance Type: OLTP
  • Adjust Parameters: can stay unchanged


    • neues Data Volume erstellen with 40000 Pages (312 MB)
    • neues Log Volume erstellen with 20000 Pages (156 MB)
  • Backup Medium: optional
  • Creation Mode : Create and start instance

Database System Administrator This user administrates the system tables or creates additional users.

    • User Name: DBA (freely selectable database management user)
    • Password: DBAPASS (freely selectable password)

After a successfull installation it is possible to change the log mode to "overridable". In this case you don't have to pay attention to the log volume. Certainly it is not advisable for a productive system and everyone can create the database with his own concept.

--> Configuration --> Log Settings --> Overwrite Mode for Log Area --> Next

The MaxDB database is an enterprise database. It is only as good as the administrator has installed respectively administered it. For productive use you should make yourself familiar with the singularities and tuning possibilities as well es with the backup or the mirror instances.

The last step in the matter of the database is to create a LIMBAS-users. For this we start the SQL client (SQL Studio) and connect to the currently created database.

  • Server (Linux IP Adresse) z.B.
  • Database (Datenbase name) z.B. LIMBAS
  • User (DBA) in our example „DBA“
  • Pass (DBAPASS) in our example „DBAPASS“

In the now appearing SQL dialog we insert the SQL statement to create a new DBA user.


That's it. With the currently created user LIMBASUSER LIMBAS will later be able to log in the database.

Create Required Functions

Limbas needs a defined function that is executed by triggers. It covers the shown values at the addition or removal of links.

create dbproc LIMBASUSER.lmb_vkn(in id fixed(16),in vid fixed(16), in tabname char(60), in fieldname char(30), in act char(1) , in rtabname char(60), in rfieldname char(30)) as
VAR statement1 char(100); statement2 char(100);


SET statement1 = 'update ' || tabname || ' set ' || fieldname || ' = ' || fieldname || ' ' || act || ' 1 where id = ' || id;
EXECUTE statement1;

SET statement2 = '';

IF rtabname <> '' THEN
SET statement2 = 'update ' || rtabname || ' set ' || rfieldname || ' = ' || rfieldname || ' ' || act || ' 1 where id = ' || vid;
IF statement2 <> '' THEN
EXECUTE statement2;

      Stop($RC, $ERRMSG);

Useful Database Commands

The following database commands can be helpful. For this purpose you change to the directory:


Start Database:


Stop Database:

dbmcli –d LIMBAS –u DBCONTROL,CONTROLPASS db_offline

Delete Database:

dbmcli –d LIMBAS –u DBCONTROL,CONTROLPASS db_offline

Reset Database:


Database - Delete the log, if it is unfortunately full and that is the case why the database can't start:

util_execute clear log

These commands are valid for the single database instances. The databse server, that is kind of a superior process of all instances, can be started / stopped in the following way:

/etc/init.d/maxdb76 start
/etc/init.d/maxdb76 stop