Skip to Content

The SAP HANA Academy has published a new video in the series SAP HANA SPS 7 Backup and Recovery.

Backup and Recovery – Backup Configuration Files | SAP HANA

In this video you can view how to generate the ALTER SYSTEM ALTER CONFIGURATION statement for changed parameters.

The SQL file is attached to this document.



select 'ALTER SYSTEM ALTER CONFIGURATION  ('''|| file_name ||''', '''||
        case layer_name
            when 'SYSTEM' then layer_name
            when 'HOST' then layer_name ||''', '''|| host
        end ||
        ''') SET ('''|| section ||''', '''|| key ||''') = '''||value ||''' WITH RECONFIGURE;'
        as "Configuration File Backup"
  from m_inifile_contents
where layer_name != 'DEFAULT'

We also show a simple sample backup script that copies HOST and SID configuration files.

The file is attached to this document.

# Simple sample backup script
# SAP HANA Academy
# Twitter: @saphanaacademy
# define backup prefix
TIMESTAMP="$(date +\%F\_%H\%M)"
# source HANA environment
. /usr/sap/shared/DB1/HDB01/
# execute command with user key
# asynchronous runs job in background and returns prompt
hdbsql -U backup "backup data using file ('$BACKUP_PREFIX') ASYNCHRONOUS"
# create backup directory
# copy host configuration files
# copy system configuration files
SYS_INI_DIR="$(dirname "$SYS_INI_DIR")"
cp $SYS_INI_DIR/hdbconfiguration_* $SYS_BACKUP_DIR

Finally, we briefly discuss the SAP HANA hdbparam tool, which – for as far as I know – has not yet been documented.


SAP HANA Academy

Denys van Kempen

To report this post you need to login first.


You must be Logged on to comment or reply to a post.

    1. Denys Kempen

      Hi Kartik,

      Does the script return errors when executed in a C shell? BASH is an superset for C; typically this should work. \



      1. Former Member

        Hi Denys,

        I haven’t used the above script, but tried with script attached with SAP note 1651055. It didn’t work in my system.



        1. Denys Kempen

          Hi Kartik,

          I see.

          The note appears to date from the early days of SAP HANA:

          Please note: the script is only intended to demonstrate how backup control could be implemented. The responsibility to implement a backup solution appropriately lies with the implementation team. The script is also not intended to replace other scheduling mechanisms for database backups of SAP HANA Database such as the scheduling calendar of dbacockpit. Support for this script will not be provided via E-Mail or SAP Support tickets. Since its initial release, the script has only been provided by means of a consulting note. If have any questions regarding this script, please make use of the SAP HANA community in SAP Community Network (SCN). Version 4 from November 2014 is the final version of the script. There will not be any further changes.

          Have you studied the script?

          What exactly does not work?

          Why would you want the script for the C-shell?



  1. rao sara

    It tells about the Backup interval settings, file based data backup settings and log based data backup setting.

    Recovery of HANA System

    • To recover SAP HANA database, the database needs to be shut down. Hence, during recovery, end users or SAP applications cannot access the database.
    • Recovery of SAP HANA database is required in the following situations −
    • A disk in the data area is unusable or disk in the log area is unusable.
    • As a consequence of a logical error, the database needs to be reset to its state at a particular point in time.
    • You want to create a copy of the database. C_HANATEC_13 syllabus

    Read More: SAP HANA Backup and Recovery


Leave a Reply