Online Tutorials & Training Materials |
Register Login

Changing log mode for SAP HANA DB after SPS2 to SPS3 upgrade

10 Oct 2012 4:56 pm || 0

Support for backup and recovery of the SAP HANA database has been significantly improved in Support Package Stack 3.

Support Package Stack 3 supports the following:

  • The log backup
  • The point-in-time recovery

These features are required urgently for productive use of the SAP HANA database.

To be able to use the point-in-time recovery, you must set the "normal" log mode in the configuration.

Therefore, we strongly recommend that you change the log mode of the SAP HANA database to "normal" after you upgrade from Support Package Stack 2 to Support Package Stack 3

Newly-installed databases have the "normal" log mode by default; an upgrade does not automatically change existing databases on to this new log mode.

Background information:
If you set the database to the "normal" log mode and activated the log backup, the system continuously creates log backups in the file system. This results in an ever-increasing requirement for disk space; the SAP HANA database administrator must monitor and administer these. Therefore, this function is not automatically activated when you perform the upgrade.

Configuration changes

You must perform the following changes to the configuration in order to activate the point-in-time recovery function.

We recommend that you use the SAP HANA Studio to perform the configuration changes.

1. Open the Administration Editor of the system and navigate to the "Configuration" tab. You can use the filter function to find the parameters easily.

2. Change the paths in which data backups and log backups are to be saved so that sufficient disk space is available.

              The relevant parameters are called:

        a) global.ini -> persistence -> basepath_databackup

        b) global.ini -> persistence -> basepath_logbackup

              We recommend that you place the paths for data backups and log backups on an external storage medium that has sufficient storage space. This does not only prevent space problems but also ensures that the backup is safe if a disk error occurs in the file system of the database. In addition, the performance of backups and recoveries improves.

3. Set the log mode to "normal".

              Configuration -> global.ini -> persistence -> log_mode = "normal"

4. Adjust the run level of the following services:

        a) Configuration -> daemon.ini -> indexserver -> runlevel = "3"

        b) Configuration -> daemon.ini -> indexserver.c -> runlevel = "3"

        c) Configuration -> daemon.ini -> statisticsserver -> runlevel = "3"

        d) Configuration -> daemon.ini -> scriptserver -> runlevel = "3"

        e) Configuration -> daemon.ini -> xsengine -> runlevel = "3"

5. Activate the automatic log backups.

              Configuration -> global.ini -> persistence -> enable_auto_log_backup = "yes"

6. Set the log backup timeout to a value greater than 0  (for example, 900 seconds).

              Configuration -> global.ini -> persistence -> log_backup_timeout_s = "900"

              A value of 900 seconds ensures that no more than 15 minutes worth of data is lost if a disk fails.

7. The change to the configuration is not active until you restart the SAP HANA database. Restart the database.

Additional comments:

  • To ensure that a recovery can take place at the most current time without having to subsequently import a large number of log backups, data backups must be performed at regular intervals.
  • Do not delete any backups unless you are absolutely sure that you no longer require these. Deleting log backups may make it impossible to recover the database to a certain time point.
  • Do not rely only on the latest data backups.
  • We recommend that you archive log backups as part of the backup and recovery strategy.
  • The "legacy" log mode is still supported, but we do not recommend using it in productive databases.
  • You are not permitted to use the "overwrite" log mode in productive databases.