# Restoring the SAP HANA SYSTEMDB Database

Restore the multitenant database container SYSTEMDB database. You can only recover the SYSTEMDB database to the most recent state.

If you need to restore a SYSTEMDB database and tenant databases, perform the SYSTEMDB database restore first, and then restore the tenant databases.

You can restore to the same destination, or to the following new destinations:

- Restore to a new destination that has the same SYSTEMDB SID as the source

- Restore to a new destination that has a different SYSTEMDB SID from the source

## Before You Begin

1. Perform a SAP HANA full backup on a Multitenant SYSTEMDB database.

2. Verify that the SAP HANA software version that is used for restore is of the same version, or a later version than the software version used during backup.

## Procedure

1. You can perform a restore on the instances, database details, DbBackupset details, or job details page.

   - Instances: From the navigation pane, go to Protect > Databases > Instances tab. In the row for the instance that you want to restore, click the ellipsis button, and then select Restore. Alternatively, click the instance that you want to restore. Under Overview tab, in the Recovery points section, click Restore.

   - Database Details: From the navigation pane, go to Protect > Databases > Databases tab. In the row for the database instance that you want to restore, click the ellipsis button, and then select Restore. Alternatively, click the database that you want to restore. Under Overview tab, in the Recovery points section, click Restore.

   - DbBackupset Details: From the navigation pane, go to Protect > Databases > Databases tab. Click the database instance that you want to restore. Under Overview tab, in the Recovery points section, click Restore.

   - Job details: From the Command Center navigation pane, go to Monitor > Jobs. Click the Job history tab. In the row for the job that you want to restore, click the ellipsis button, and then select Restore. Alternatively, click the job that you want to restore, and then click Restore.

   The Restore Options page appears.

2. Perform an in-place restore.

   Steps to perform an in-place restore

   1. On the In place tab, from the Destination database list, select the database to restore the data to.

   2. In the Number of streams box, enter the number of streams that are applicable for snapshot or backup copy restores.

   3. For Recover to, specify how to restore the instance:

      - Select the restore by specifying the most recent state, select Most recent state.

      - To recover the database to a point-in-time, select Point in time, and then select the date and time.

      - To restore by specifying the backup prefix, select Using backup prefix, and then enter a prefix to identify the backup.

        The Commvault software creates the backup prefix by pre-pending the job ID to the backup prefix. For example, if you enter COMPLETE_DATA_BACKUP, then the backup is named 4815976_COMPLETE_DATA_BACKUP. You do not need the catalog backup available with backint.

      - To restore by specifying the internal backup job ID, select Using internal backup id, and then enter the internal backup job ID.

        Note

        If you restore by specifying the internal backup job ID, then you must have the catalog backup available with backint. SAP HANA creates the internal backup ID.

   4. Under Advanced options, do the following:

      - To restore from a storage policy copy if backup gets corrupted, from the Restore from copy list, select the copy that you want to use.

      - Select a media agent from the Select MediaAgent box.

      - To restore SAP HANA catalog to a point in time, move the Restore catalog from time toggle key to the right, and then do the following:

        1. To restore to a point in time, select Point in time, and then enter the date and time.

        2. To restore relative to the system date, select Relative to sysdate, and then enter the number of days or hours relative to the system date.

      - To verify that all the backups that are required for the recovery operation are available, select the Check access check box.

      - To initialize the log area after the restore, select the Initialize log area check box.

      - To recover using delta backups, select the Use delta backups check box.

        If you do not use a delta backup for the recovery option, the software uses only the log backups for recovery.

   5. Under Pre or Post options, do the following:

      - In the Pre recovery command box, enter the name or path of the process to run before the restore. Alternately, select the file icon on the right side to select a physical client from the Physical client selection list.

      - In the Post recovery command box, enter the name or path of the process to run after the restore. Alternately, select the file icon on the right side to select a physical client from the Physical client selection list.

      - If you want to initiate the restore as user, move the Run as User toggle button to right.

        - In the User name box, enter a user name you want to run the restore with.

      - To send a notification email when the restore job completes, select the When the job completes, notify me via email.

3. Perform an out of place restore.

   Steps to perform an out of place restore

   1. On the Out of place tab, from the Destination server list, select the host to restore the data to.

   2. From the Destination instance list, select the instance to restore the data to.

   3. In the Number of streams box, enter the number of streams that are applicable for snapshot or backup copy restores.

   4. From the Source database, select the source database from where you want to restore.

   5. From the Destination database list, select the database to restore the data to.

   6. To restore from a snapshot backup, in the HANA data directory box, specify the HANA directory.

      Enter the full path where the destination instance resides. For example, if the SAP HANA SID path is hana/data/SID, then enter /hana/data.

      Note

      This value is required for IntelliSnap cross-instance and cross-machine restores.

   7. For Recover to, specify how to restore the instance:

      - Select the restore by specifying the most recent state, select Most recent state.

      - To recover the database to a point-in-time, select Point in time, and then select the date and time.

      - To restore by specifying the backup prefix, select Using backup prefix, and then enter a prefix to identify the backup.

        The Commvault software creates the backup prefix by pre-pending the job ID to the backup prefix. For example, if you enter COMPLETE_DATA_BACKUP, then the backup is named 4815976_COMPLETE_DATA_BACKUP. You do not need the catalog backup available with backint.

      - To restore by specifying the internal backup job ID, select Using internal backup id, and then enter the internal backup job ID.

        Note

        If you restore by specifying the internal backup job ID, then you must have the catalog backup available with backint. SAP HANA creates the internal backup ID.

   8. Under Advanced options, do the following:

      - To restore from a storage policy copy if backup gets corrupted, from the Restore from copy list, select the copy that you want to use.

      - Select a media agent from the Select MediaAgent box.

      - To restore SAP HANA catalog to a point in time, move the Restore catalog from time toggle key to the right, and then do the following:

        1. To restore to a point in time, select Point in time, and then enter the date and time.

        2. To restore relative to the system date, select Relative to sysdate, and then enter the number of days or hours relative to the system date.

      - To verify that all the backups that are required for the recovery operation are available, select the Check access check box.

      - To initialize the log area after the restore, select the Initialize log area check box.

      - To recover using delta backups, select the Use delta backups check box.

        If you do not use a delta backup for the recovery option, the software uses only the log backups for recovery.

   9. Under Pre or Post options, do the following:

      - In the Pre recovery command box, enter the name or path of the process to run before the restore. Alternately, select the file icon on the right side to select a physical client from the Physical client selection list.

      - In the Post recovery command box, enter the name or path of the process to run after the restore. Alternately, select the file icon on the right side to select a physical client from the Physical client selection list.

      - If you want to initiate the restore as user, move the Run as User toggle button to right.

        - In the User name box, enter a user name you want to run the restore with.

      - To send a notification email when the restore job completes, select the When the job completes, notify me via email.

4. Click Submit.

## Result

The software restores the SYSTEMDB database to the specified location.

If you did not select the Initialize Log area check box, then the job goes to pending with a job pending reason (JPR) that is similar to the following message:

    Error Code: [18:146] Description: SAP HANA Error [2017-02-28T07:59:55-05:00 P003115 15a84cd9aa8 ERROR RECOVERY RECOVER DATA finished with error: [448] recovery could not be completed, volume 1, reached log position 0, [110058] The existing log area is not compatible to the log and data backups ]. Source: hana07, Process: ClHanaAgent

## What to Do Next

You can control or view the job. For more information, see Jobs.

- If you only restored the SYSTEMDB database, then after the restore the SYSTEMDB is in the Up state, but you need to manually start the tenant databases. On the command line, type the following command:

       hdbsql -U $[hdbuserstore_key]

  Example

      hdbsql -U $[BACKUPM]

  On the command line, type the following command:

       hdbsql SYSTEMDB=> alter system start database $[Tenant_Database_Name]

  Example

      hdbsql SYSTEMDB=> alter system start database $[mn1]
       0 rows affected (overall time 733.912 msec; server time 732.685 msec)

- If you need to restore the system and tenant databases, perform a tenant database restore.

×

Loading...