Collingwood Football Club (FC), nicknamed the Magpies or simply the Pies in the land Down Under, is a leading team in the premier Australian Football League (AFL). It’s ...
With SAP HANA 2.0 one of the biggest changes is its multitenancy property. By default, SAP HANA 2.0 will have multitenant database containers (MDC) and it is the only operational mode. In this three-part blog series, I am going to cover in detail how to use FlashArray//m snapshots for doing backup and recovery of SAP HANA 2.0 MDC system with only Single Tenant. This is the current limitation from SAP where only SAP HANA 2.0 MDC system with the single tenant is supported with storage snapshots. The first part you would have seen (here is the link:https://krishnasatyavarapu.wordpress.com/2018/01/17/backup-and-recovery-of-sap-hana-2-0-multitenant-database-containers-with-single-tenant-on-pure-storage-flasharray-m-using-snapshots-part-1/)is about how to perform backups using storage snapshots using SAP HANA studio.
In this part, I will cover the recovery of SAP HANA MDC system. In the third part, I will cover how to automate this whole process using shell scripts.
SAP HANA 2.0 MDC basically consists of a system database and one or more tenant databases. System database is used for overall system administration activities and tenant databases are self-contained and completely isolated in terms of persistence layer, database catalog, repository, backups, and logs. As mentioned previously storage snapshots will work only for SAP HANA MDC systems with a system database and only one tenant database.
As shown below, is a SAP HANA MDC 2.0 system with one system database and one tenant database.
Here is the backup using snapshots which I have taken last time: Go to the backup Catalog and look for the backup id from which you would like to do the recovery of SAP HANA MDC system.
We will start the recovery process with the System Database.Start the recovery process in SAP HANA studio:
2. In the recovery window as shown below select Recover the database to a specific data backup.
3. Then, select Recover without the backup catalog
4. Unmount the Data volume using the mount point as
5. Login to Pure Storage GUI and update the data volume using the snapshot from which we would like to recover.
6. Mount the data volume using the mount command.
mount /dev/mapper/3624a93701037b35fd0ef40a5000124ec /hana/data/PSD
6. Select snapshot as destination type.
7. By default, the Log area will be initialized as shown below
which is equivalent to the below SQL statement and start the recovery of the System database.
RECOVER DATA USING SNAPSHOT CLEAR LOG
Once the recovery of the system database is done you will see the following message tells you that you also need to recover tenant database as well.
9. Now let us start the recovery of the Tenant database from the System database select the Backup and Recovery –> Recover Tenant Database
10. Select the tenant which needs to be recovered which is PSD in this case
11. Select the recovery type for this tenant which is “Recover the database to a specific data backup”.
12. Specify the backup location as “Recover without the backup catalog”
13. Provide the destination type “Snapshot” as shown below
14. Initialize the log area as we did for the system database.
this all is equivalent to the following SQL statement
RECOVER DATA FOR PSD USING SNAPSHOT CLEAR LOG
This will start the recovery of the tenant database.
15. You will see the following message saying PSD@PSD(PSD tenant) is recovered.
In the next part, I will explain how to write a script to automate the full backup process using snapshots.