Show TOC

Setting Up a Hot Standby System (With Shared Log Area)Locate this document in the navigation structure

Concept

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.

Note

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

Prerequisites

For the prerequisites, see Database Manager CLI, hss_enable, hss_addstandby, db_standby

Procedure
  1. 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>

  2. Open a parameter session:

    dbmcli on HOTSTANDBY> param_startsession

    OK

    dbmcli on HOTSTANDBY>

  3. Initialize the database parameters and define the database type MaxDB (default value). dbmcli on HOTSTANDBY> param_init

    OK

  4. 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

  5. Check all database parameters:

    dbmcli on HOTSTANDBY> param_checkall

    OK

  6. Confirm changes to the database parameter file:

    dbmcli on HOTSTANDBY> param_commitsession

    OK

  7. Create data and log volumes:

    1. 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

    2. 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

  8. 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

  9. Transfer the master database to the ADMIN operational state:

    dbmcli on HOTSTANDBY> db_admin

    OK

  10. 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

  11. 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

    ==================================

  12. Modify the log volume path for the example (required for this example based on two compatible Windows computers) :

    1. Transfer the master database to the OFFLINE operational state:

      dbmcli on HOTSTANDBY> db_offline

    2. 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

    3. Transfer the master database to the ONLINE operational state:

      dbmcli on HOTSTANDBY> db_online

  13. Add the standby database:

    dbmcli on HOTSTANDBY> hss_addstandby PARMA login=ANNA,MAY user=YES

    OK

  14. Transfer the standby database to the STANDBY operational state:

    dbmcli on HOTSTANDBY> db_standby node=PARMA

    OK

Result

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.