Procedure documentationSetting up a Hot Standby System Locate this document in the navigation structure

 

You can only set up a hot standby system suitable for use in production if you have installed the required cluster software and if your storage solution is approved for MaxDB. For more information, contact MaxDB Support.

The following example is based on two compatible Windows computers. Its purpose is to demonstrate the actions necessary to set up a hot standby system for development and testing purposes. The system works with network shares from the Windows program, which needs to be manually modified for the log volume in the example.

A hot standby system intended for productive use should only be set up by an experienced administrator who knows how to use cluster software.

Scenario

You want to set up a hot standby system (consisting of the master database and a 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 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

You can find the prerequisites under 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 user name DBM and password DBM.

    To simulate the example on Microsoft Windows, you must also specify the option –u so that the service for starting the database kernel runs under the name of the operating system user that is specified at the end of the DBM command, i.e. ANNA with 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 you also need to 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 name DISKD0001, type FILE, size 32768 pages: dbmcli on HOTSTANDBY>param_addvolume 1 DATA DISKD0001 F 32768

      OK

    2. Create log volume no. 1 with name DISKL0001, type FILE, size 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 and the master database of the hot standby system, depending on the default value of the 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 user name DBADMIN and 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. For the example on Microsoft Windows you need to perform steps a - c. For all other operating systems proceed with step 13.

    Modify the log volume path for the example:

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

      dbmcli on HOTSTANDBY>db_offline

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

    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.

More Information

Creating and Configuring a Database

Database Administration, Hot Standby