Loading...

HDBSQL Example: Recovering the SAP HANA 2.0 Tenant Databases for a Disaster Recovery

Use this procedure for a disaster recovery situation.

After you restore the SAP HANA SYSTEMDB, restore the tenant databases

Note: You must restore the SYSTEMDB and all tenant databases.

Before You Begin

  1. Restore the SYSTEMDB. For more information, see HDBSettings.sh Example: Performing SAP HANA 2.0 SYSTEMDB Restores for Disaster Recovery.
  2. Make sure that you have the following information:
    • The source instance SID name
    • The SAP HANA source physical client name
  3. Update the SAP HANA parameter file with the following entries:
    • srcCrossClient - This is the source physical client name.
    • srcCrossDbName - This is the source database name.
  4. Stop the SAP HANA tenant database. On the command line, type the following command:

    Note: You can run this command from SAP HANA Studio in the SQL console.

    hdbsql -U BACKUPM "alter system stop Database TENANTDBNAME"

Procedure

  • Select one of the following recovery options:

    Where:

    SRTENANT is the source tenant database name.

    TENANTDBNAME is the destination tenant database name.

    W02 is the source instance name

    • Recover to the most recent backup. On the command line, type the following command substituting the timestamp that is in the future and the source SID.

      hdbsql -U BACKUPM "RECOVER DATABASE FOR TENANTDBNAME UNTIL TIMESTAMP '2018-10-27 05:59:22' CLEAR LOG USING SOURCE 'SRTENANT@W02' CHECK ACCESS USING BACKINT"

    • Recover to a point in time. On the command line, type the following command, substituting the timestamp and tenant SID.

      "hdbsql -U BACKUPM "RECOVER DATABASE FOR TENANTDBNAME UNTIL TIMESTAMP '2017-10-27 05:59:22' CLEAR LOG USING SOURCE 'SRTENANT@W02' CHECK ACCESS USING BACKINT"

    • Perform a data only recovery. On the command line, type the following command, substituting the backup prefix and tenant SID.

      hdbsql -U BACKUPM "RECOVER DATA FOR TENANTDBNAME USING SOURCE 'SRTENANT@W02' USING BACKINT ('4344648_COMPLETE_DATA_BACKUP') CLEAR LOG"

Last modified: 3/1/2018 9:42:15 PM