This series began at Part I. Be sure to read the first article before continuing with this article.
Welcome to the second installment of my articles on the MaxDB Synch manager. In the previous article, we covered installing MaxDB and related client packages.
First Steps with MaxDB
As you will remember from the first article, we are now at the point of doing what the installer calls launching the first steps. These steps include basic administration of the database in order to familiarize the user with the syntax and interface of the software.
To set up the environment for using MaxDB, run the sapdbenv.sh script that is placed into /opt/sdb/MaxDB1/doc/FirstSteps/ directory. This script sets some environment variables which will be used throughout these articles. Since my regular user doesn't have permission to it, I will put the file in my MaxDB folder and run it from there.
$ mkdir -p $HOME/mysql/maxdb $ cp /opt/sdb/MAXDB1/doc/FirstSteps/sapdbenv.sh $HOME/mysql/maxdb/ $ chmod u+rx $HOME/mysql/maxdb/sapdbenv.sh $ . $HOME/mysql/maxdb/sapdbenv.sh $ which dbmcli
If the last command does not return the full path to your installed version of dbmcli, you've done something wrong. Feel free to ask me for help.
The documentation forgot one vital step. You will not have the TST database that is mentioned in the FirstSteps tutorial unless you do the following:
$ sudo /opt/sdb/MAXDB1/misc/create_demo_db.sh
You will see some output that tells you the TST database is being created.
You must add your regular user to the sdba group to be able to perform many tasks in this tutorial. To do this, run the following command:
$ sudo adduser $USER sdba
We can now continue with the tutorial.
$ dbmcli -d TST -u DBM,DBM db_state # check the state of the database $ dbmcli -d TST -u DBM,DBM db_offline # stop the database $ dbmcli -d TST -u DBM,DBM db_online # bring the database back up
Feel free to mix and match the above statements to see what state "offline" and "online" put the database in.
This article is continued in MaxDB Synch Manager, Part III.