SAP HANA Recovery

Recovery of an SAP HANA Database

When is it Necessary to Recover the SAP HANA Database?

Disk crash of the data area

Disk crash of the log area

Reset system to a certain point in time for special recovery purpose

Create a copy of the database


What Kind of Recovery Procedures are Available for the SAP HANA Database?

The following recovery types are available:


(A)  Recover the database to its most recent state 

This option recovers the database to as close as possible to the current time.

This recovery option uses the following data:

The most recent data backup

Log backups made since the most recent data backup

Log area

 

(B) Recover the database to a specific point in time

This recovery option uses the following data:

The last data backup available before the specified point in time

Log backups made since the data backup to be used

Log area

(C) Recover the database to a specific data backup

This recovery option uses the following data:

The specified data backup

 

Note:

Option (C) is not supported for delta backups. Log entries are not replayed,

neither from the log backups nor from the log area. All log entries that still exist in

the log area are deleted.



Requirements:

Requirements for Performing a Recovery

SAP HANA database must be shut down

User must have system privilege BACKUP ADMIN

The <sid>adm operating system user is required

At least one data backup is required

Before recovery can start, all data and log backups must be either accessible in the filesystem or available through the third-party backup tool

The number and type of services in source and target systems must be identical

To recover customer-specific configuration settings, configure the customer-specific settings before starting the recovery

 

Note:

Recovery to a lower software version is not possible

An SAP HANA database cannot be recovered to an SAP HANA database with a lower

software version.

The SAP HANA software version used for the recovery must always be the same version or higher than that of the SAP HANA database used to create the data backup

SAP HANA backups created with release 1.0 SPS10 or newer can be used to recover to SAP HANA 2.0. This is true for both SAP HANA single-container systems and tenant databases.

 

To perform an SAP HANA database recovery, the following requirements must be met:

Ø  The SAP HANA database software must be installed so that the initial database exists. In a recovery situation, you can use the SAP HANA cockpit or the SAP HANA studio to restore customer-specific changes to this initial database.

Ø  Note that if you want to restore customer-specific configuration settings, you can do this either before you restore the database and the log backups, or at the end of the recovery.

Ø  Ensure that the target system and the source system have identical configurations. The number and types of services (for example, index server) on each host must be identical for both system landscapes.

Ø   At the beginning of a recovery, all the data and log backups to be used must be either accessible in the file system or available through the third-party backup tool.

Ø  At least one data backup must be available before the recovery is started.

Ø  To restore the database to a particular point in time, you need a data backup and all the log backups up to the point in time for recovery (including the log backups made after the desired point in time of the recovery).


Note:

To recover the SAP HANA database, the database needs to be shut down. For this

reason, during recovery, the database cannot be accessed by end users or

applications.


Recovery with SAP HANA Multitenant Database Containers

For a recovery with SAP HANA multitenant database containers, note the following

information:

To perform a recovery, an SAP HANA database needs to be shut down.

To recover a complete SAP HANA system, the system database needs to be recovered first, and then all the tenant databases are recovered individually.

The recovery of a tenant database is always initiated from the system database. If tenant databases need to be recovered, they are recovered individually, and not altogether in one single operation.

 

If a tenant database is shut down for recovery the system database and any other tenant databases remain online.

The system database only needs to be recovered if it is corrupted. If only a tenant

database is corrupted, the system database does not need to be recovered.

If the system database is shut down for recovery all its tenant databases are automatically shut down as well.

To recover a database, at least one full backup (data backup or data snapshot) must be available.

When an SAP HANA multitenant database container is recovered, the services needed are generated automatically in the tenant databases.

 

·   With SAP HANA 2.0, an SAP HANA single-container system can be recovered to a tenant database.

An SAP HANA database cannot be recovered to an SAP HANA database with a lower

software version.

Recovering a Tenant Database

To recover a tenant database, proceed as follows:

Recovery of the tenant, databases can only be initiated from the system database.

The system database and other tenant databases are not affected.

Select the tenant database to be recovered.

Specify your recovery type and further recovery settings and start the recovery.


Recovering the System Database

To recover the system database, proceed as follows:

The whole system is shut down, including all tenant databases.

Specify your recovery type and further recovery settings and start the recovery.

The system database is recovered and restarted.

Restart the tenant databases.

The content of the tenant databases is not affected by the system database recovery.


Note:

If the system database is shut down for recovery, its tenant databases are shut

down automatically as well. This means that, until the recovery of the system

database is completed, all its tenant databases are unavailable.


Recovery of a Database with SAP HANA Cockpit

The options to recover a database using SAP HANA Cockpit are as follows:

To its most recent consistent state

To a specific point in time


Note:

Using SAP HANA cockpit, only a tenant database can be recovered to a point in

time. To recover a system database to a point in time, use SQL.


Steps:


To recover an SAP HANA database, perform the following steps:

1. In the SAP HANA cockpit, choose the following:

Overall Tenant Statuses àselect the tenant database from the overview and choose

Recover Tenant .

Recover Database to recover the system database.

2. Specify the recovery type from one of the following:

Recover the database to the most recent state

Recover the database to a specified point in time

3. Specify the location of the most recent backup catalog.

An overview of the available full backups is displayed.

4. Select the complete data backup to be used for the recovery.

5. Specify whether to use delta backups.

6. If you are using backups that differ from those recorded in the backup catalog, specify their locations.

7. Check whether the backups are available.

Decide if SAP HANA checks before the recovery starts if all the backups are available and if they can be accessed.

8. Specify whether to initialize the log area.

If you initialize the log area, the content of the log area is lost. No log entries from the log area can be replayed during the recovery. The log entries from the log backups are

replayed if they are needed. Initialize the log area when the log area is unusable or when you are recovering the database to a different system.

9. Choose Review .An overview of the recovery settings displays.

To change any settings, choose Edit. All the settings that you specified are retained until you change them.

10. To display the SQL statement that is used for the recovery, choose Display SQL

Statement .

11. Choose Start Recovery .

The progress of the recovery for each SAP HANA service displays.

When the recovery is complete, a message confirms this, and shows the timestamp to which the recovery was completed.

The database is restarted automatically after the recovery.


Recover a Database using SAP HANA Studio

 

The options to recover a database using SAP HANA Studio are as follows:

To its most recent consistent state

To a specific point in time

To a specified full data backup

Before you start the recovery, shut down the SAP HANA database.

To recover an SAP HANA database, perform the following steps:

1. Open the Recovery Wizard.

2. Confirm that the database can be shut down.

3. Specify the recovery type from one of the following:

Recover the database to its most recent state

Recover the database to a specified point in time

To a specified full data backup

4. If the log backups are not in the original location, specify a new location.

An overview of data backups displays.

5. From the backup catalog, select a complete data backup.

6. Finalize the recovery settings.

7. Start the recovery

The progress of the recovery for each SAP HANA service is displayed in the dialog box. When the recovery is complete, a message confirms this, and it shows the timestamp for when the recovery was completed.

The database restarts automatically after the recovery.


Note:

Automatic checks for file system backups at the start of a recovery. The extended checks are executed for file system backups only. If a third-party backup tool is used, only the existence of the backups on the third-party backup server is verified.

 

Progress reporting for a recovery shows the recovery process in detail

After the initial collection of system information for the recovery, the recovery wizard

shows the following phases (progress per service):

Phase 1: Data recovery

Using data backup or snapshot

Phase 2: Log recovery

Using log backups or log that is still available in the log area

Phase 3: Restart




Recovery using the command line: Can be done using Python Script

Note :

Tenant databases cannot be recovered using the command-line tool. To recover

a tenant database use SAP HANA cockpit or the recoverSys.py tool to

execute SQL statements on the online system database to recover an offline

tenant database.


                    Resume Recovery After Error

Note:

A recovery from only a full data backup cannot be resumed. If recovery from

only a full data backup is interrupted, repeat the recovery from the beginning.

 



  

Note:

The fallback points are recorded in the backup.log file. The fallback points

indicate whether you can resume a recovery from failure.

 

Perform Recovery After Error:

A recovery that can be resumed is also recorded in the backup catalog. In SAP HANA cockpit and SAP HANA studio, a partially completed recovery that can be resumed is given the backup prefix RESUME. To resume the recovery from that backup, proceed as follows:

1. Start the recovery from SAP HANA cockpit.

2. In the recovery dialog, select the backup with the prefix RESUME.

3. Follow the steps described on-screen to complete the recovery.

 


Backup and Recovery Using Data Snapshots

 

A data snapshot captures the data persisted in the data area at a particular point in time. A data snapshot includes all the data that is required to recover SAP HANA to a consistent state.

 

Data Snapshots Benefits :

They can be created with minimal impact on the system.

Recovery from a data snapshot is faster than a recovery from a data backup

 

Important Points:

Currently, a data snapshot of an SAP HANA database with more than one tenant is not Supported

Data snapshots can only be created through the system database. It is not possible to create data snapshots for the tenant database separately.

 


                                                                                 Recovery Video:



Recovery Scenarios:





Comments

Popular Posts

SAP Logon Configuration(Load Balancing)

EHP Upgrade (SUM)

Interview Questions

SNOTE Implementation and FAQ

SAP Startup Troubleshooting

HANA Installation & upgrade

SAP HANA Backup

SAP Transport Management System (STMS)

Set Up SAP HANA System Replication with hdbnsutil

SAP Kernel Upgrade in Distributed System