How to create a database instance
=================================

1) The user who wants to create a database instance *must* be part of
   the 'sdba' group. (This group will be created during the
   installation of the maxdb-server package.). Also, make sure you are
   *not* root (for security reasons the MaxDB kernel refuses to run as
   root).  Once the database has been created, the users accessing it
   do not have to be in the 'sdba' group (even for administrative
   tasks) as long as they can provide the necessary passwords.

2) If you are using a Linux 2.6 kernel, make sure to export
   LD_ASSUME_KERNEL=2.4.1 before trying to create or start a database
   on an i386 machine. You _must_ not do this for other architectures.

3) Either use dbmcli or WebDBM to create your database. dbmcli is in
   the maxdb-dbmcli and WebDBM in the maxdb-webtools package. If you
   are creating your database with WebDBM check the step by step
   instructions in the maxdb-webtools package.

   You have to decide whether you would like your database to be able
   to store unicode characters at database creation time. See the
   WebDBM walkthrough for details. If you are using dbmcli, check out
   the sample script 'insttestdb.dbm'. It contains all basic
   information and comments of how to doinstall an instance.

   IMPORTANT: In any case, make sure your data volumes have a size of
   at least 2500 pages, otherwise the kernel will refuse to start.

5) Create your SQL database users. 

   *You _cannot_ create those using WebDBM or the dbmcli user_create command!*

   Instead you should login with your sysdba (DBA in insttestdb.dbm)
   and create your SQL users using the 'create user username password
   userpassword' SQL command. If you want your new user to be able to
   If you want your new user to be able to create/drop tables add
   'resource' to the end of the statement, if he/she should be able to
   have multiple connections to the database at the same time add 'not
   exclusive' as well.

   You can do this using WebSQL (from the maxdb-webtools package) or
   the Python scriping interface (python-maxdb).


Dropping a database instance
============================

You can't drop a database instance from WebDBM. Instead log into the
database via dbmcli, set it to offline and issue the 'db_drop'
command. This will delete the configuration information and all log
and data volumes of the database instance. However, if you have
additional files in the run directory of the database instance they
will not be removed automatically.


Troubleshooting
===============

If you run into problems there are a number of files whose contents
may point you in the right direction. Even if not, for serious
problems they will be usually requested on the mailing list

below /var/lib/maxdb/data/wrk/YOURDBNAME:
  - knldiag: contains all output of the
    database kernel itself; if your database crashes or won't start,
    this is the place to look

  - dbm.prt: logs all dbm commands issued for YOURDBNAME

- /var/lib/maxdb/data/wrk/dbmsrv.prt: logs all dbmserver commands that
  are not specific to a database

- /var/lib/maxdb/data/wrk/loader.prt: contains all commands processed
  by the loader server; this might help you as well if you have
  trouble during loading of the system tables


Help on the Internet
====================

If you are stuck, check out the following sources of information:

- the MaxDB homepage at http://www.mysql.com/products/maxdb

- the MaxDB mailing list at http://lists.mysql.com/maxdb. Usually
  MaxDB developers give you a helping hand there. Be sure however to
  mention that you are using the Debian packages of MaxDB so people
  can take into account the differences in packaging and installation
  paths.

- there is a wiki for MaxDB/SAPDB at
  http://sapdb.2scale.net/moin.cgi/FrontPage

 -- Martin Kittel <debian@martin-kittel.de>, Sun Mar 14 12:43:29 2004
