In the following, you find a description on how to set up a hot standby system that consists of a master database and one standby database, which share the log area of the master database.
This example is only based on two compatible Windows computers and network shares, which need to be manually modified for the log volume in the example. The only purpose of the example is to demonstrate the actions necessary to set up a hot standby system for development and testing purposes.
A hot standby system intended for productive use should only be set up by an experienced administrator who knows how to use cluster software.
You can only set up a hot standby system suitable for production use if you have installed the required cluster software and if your storage solution is approved for SAP MaxDB. For more information, contact SAP MaxDB Support.
The SAP MaxDB software does not configure the cluster software on Unix and Linux.
Scenario
You want to set up a hot standby system (consisting of the master database and one standby database) with the following properties:
Property |
Example |
---|---|
Name of the hot standby system |
HOTSTANDBY |
Computer of the master database |
GENUA (local computer) |
Computer of the standby database |
PARMA |
Name of the virtual server |
VIRTUAL_SERVER |
Operating system user that is valid for the local computer and for the computer PARMA |
User name ANNA, password MAY |
Name of the library used to access the memory management system (part of the memory software) |
libhsscopy |
For the prerequisites, see Database Manager CLI, hss_enable, hss_addstandby, db_standby
Call Database Manager CLI, create the database HOTSTANDBY, and define the first DBM operator with the user name DBM and the password DBM.
To simulate the example on Microsoft Windows, also specify the option -u so that the service for starting the database kernel runs under the name of the operating system user specified at the end of the DBM command, that is ANNA with the password MAY.
> dbmcli db_create -u HOTSTANDBY DBM,DBM ANNA,MAY
OK
dbmcli on HOTSTANDBY>
Open a parameter session:
dbmcli on HOTSTANDBY> param_startsession
OK
dbmcli on HOTSTANDBY>
Initialize the database parameters and define the database type MaxDB (default value). dbmcli on HOTSTANDBY> param_init
OK
On Microsoft Windows, also perform the following step. For all other operating systems proceed with step 5.
Change the database parameter RunDirectoryPath to a path that does not contain any spaces:
dbmcli on HOTSTANDBY> param_put RunDirectoryPath C:\test\wrk
OK
Check all database parameters:
dbmcli on HOTSTANDBY> param_checkall
OK
Confirm changes to the database parameter file:
dbmcli on HOTSTANDBY> param_commitsession
OK
Create data and log volumes:
Create data volume no. 1 with the name DISKD0001, of type FILE, and a size of 32768 pages:
dbmcli on HOTSTANDBY> param_addvolume 1 DATA DISKD0001 F 32768
OK
Create log volume no. 1 with the name DISKL0001, of type FILE, and a size of 6400 pages:
dbmcli on HOTSTANDBY> param_addvolume 1 LOG DISKL0001 F 6400
OK
Define the name of the virtual server:
This makes the database part of a hot standby system. Simultaneously it becomes the master database of the hot standby system (default value of Database Manager):
dbmcli on HOTSTANDBY> hss_enable node=VIRTUAL_SERVER lib=libhsscopy
OK
Transfer the master database to the ADMIN operational state:
dbmcli on HOTSTANDBY> db_admin
OK
Initialize the master database and create the database system administrator with the user name DBADMIN and the password SECRET:
dbmcli on HOTSTANDBY> db_activate DBADMIN,SECRET
OK
Load the system tables:
dbmcli on HOTSTANDBY> load_systab
OK
0,OK: everything works fine
0,""c:\program files\sdb\maxdb1\bin\x_python" "c:\program files\sdb\maxdb1\env
\lsystab.py" -R "c:\program files\sdb\maxdb1" -d HOTSTANDBY -u dbadmin,*"
Removing obsolete objects
Installing Loader tables
...
...
==================================
Installation successfully finished
==================================
Modify the log volume path for the example (required for this example based on two compatible Windows computers) :
Transfer the master database to the OFFLINE operational state:
dbmcli on HOTSTANDBY> db_offline
Specify the path for the log volume commonly used by the master and standby databases:
dbmcli on HOTSTANDBY> param_addvolume 1 LOG \\GENUA\HSS_HOTSTANDBY\DISKLO001 F 6400
Transfer the master database to the ONLINE operational state:
dbmcli on HOTSTANDBY> db_online
Add the standby database:
dbmcli on HOTSTANDBY> hss_addstandby PARMA login=ANNA,MAY user=YES
OK
Transfer the standby database to the STANDBY operational state:
dbmcli on HOTSTANDBY> db_standby node=PARMA
OK
The hot standby system is set up.
The master database is in the ONLINE operational state. The standby database is in the STANDBY operational state.
Database Administration, Hot Standby System, Creating Databases
Database Studio, Setting Up Hot Standby Systems: Overview