Hello and welcome to the SAP HANA Academy.
I am Denys van Kempen, and the topic of this video tutorial series
is SAP HANA 2.0 new features.
In this video tutorial, we will discuss: what’s new for administration.
It is a big topic for this release and to avoid the video getting too long,
I have cut them up.
This is the second one about database backup and recovery.
The first one was about system administration and the next one will cover high availability
and performance monitoring and analysis.
Now I am going to assume that you already watched the first video on system administration,
which also included a bit of an introduction.
So now we can dive straight into backup and recovery.
We have six main new features and I will cover them in a different order then presented here
in the What’s New guide.
Starting at the bottom we get database recovery using HANA cockpit, database recovery to a tenant
using a single container system backup, configurable backup catalog location,
log area encryption, and log backup performance enhancements.
First of all, we have seen it in the previous video, SAP HANA cockpit.
Biggest change here, of course, is that you can now recover a database using cockpit.
The previous version of cockpit was hosted by HANA itself and to recover a database you
need to shut it down and then your cockpit was also down, of course.
So, this would not get you very far.
Cockpit 2.0 is hosted on a dedicated HANA server, HANA express, in fact.
So now we can use it not only to make database backup but also to recover the database.
Let’s take a brief look at recovery with cockpit.
So here we have our HANA cockpit.
I’ll connect to a database I just shut down and if we scroll down a bit to the section
Administration, we can click the ‘Recover database’ link.
This will start the Recover Database app.
First you are prompted to select your recovery target.
Either the most recent state or a specific point in time.
Step two prompts you to specify the location of the latest backup catalog and this is one
of the new features of HANA 2.0, I will come back to this in a minute, but here you have
the selection screen.
Then in step three, we are going to select the backups to be used for recovery.
These are the backup listed in the catalog.
In our sample, here we only have a single one.
In step four we can specify the backup location.
And as mentioned here, if no location is specified, the location in the backup catalog is used.
So I will accept the default here.
And in step five, you can select whether to check the availability of backups.
And in step six, whether to initialize the log area: yes or no?
Now there is a dedicated playlist on the HANA Academy about backup and recovery, so if you
are not familiar with why you may want or not want to do this, please check them out.
I am just briefly showing you how this all works,
and then finally, we have our Review step.
And then you can click ‘Start Recovery’, or should you want to schedule this, use the
SQL listed here by our tool.
So that is it for recovery using SAP HANA cockpit.
Then we go to SAP HANA multitenant database containers.
It is now possible to use a data backup of a single container system to recover a tenant
database.
With the next release of HANA or so, multitenant container mode will be the default so it is
important that is it very easy to migrate from single to multitenant database systems.
In HANA 1.0 this was not very easy, as you had to setup system replication first before
doing the conversion but, as mentioned, this has been simplified in HANA 2.0.
For the small print, check out the SAP HANA Administration Guide: points to note SAP HANA
multitenant database containers and recovery.
Then we have the location of the backups of the backup catalog.
Now if we return to our cockpit, in step two, we specified the location of the latest backup
catalog.
This is new.
So it allows you to store log backups and catalogs separately.
There is a new system parameter for this.
In the global.ini file, section Persistence.
And here we have our basepath_catalogbackup.
And when you are using a backup script, I am showing you the new Database Explorer here,
with the SQL prompt, you can use in your ‘recover database’ or ‘recover data’ statement
clause ‘using catalog path’ and between quotes the path to your backup catalog.
And again, you will find this documented in the SAP HANA Administration Guide in the
'Destination for backups of the backup catalog’ section.
Then, if we return to our release notes, we have the topic
'Encryption and Backup and Recovery'.
For this, I will open the Administration Guide in the Security Administration section: Server-side
data encryption services, and here we will find this illustration.
HANA 1.0 SPS 09 introduced encryption of the data volume area and in 2.0 you can now also
enable redo log encryption.
The volume is encrypted using a root key, which is stored in the instance SSFS,
think of it as a HANA safe, secure store on the file system, which itself is protected with
a master key.
We see that here.
Couple of points to note on this feature documented here in the Administration Guide,
particularly concerning encryption key management, so make sure to read up on this,
or watch the video, of course, in the Backup and Recovery playlist.
You can enable it using SQL.
ALTER SYSTEM LOG ENCRYPTION ON which is similar as for data volume encryption with the
ALTER SYSTEM PERSISTENCE ENCRYPTION ON
Now for data volume encryption you can also use the HANA cockpit UI, here in the Security view,
there is a button to switch it on, and my guess is that this will be added for
redo log encryption as well in the near future.
You need the system privilege ENCRYPTION ROOT KEY ADMIN to run the statement,
new as well with HANA 2.0, but before you do it, it is a good idea to change the encryption root key,
and again, you do this using SQL.
Best practice is to always change encryption root keys as follows:
First, you generate the new key without activation; then you backup your new key; and finally
you activate the new key.
Here we have the SQL to do this.
And again, this is also covered in another video on this topic.
Then we have some performance enhancements for the log backups.
This is a bit more technical.
HANA makes a backup of each service separately, so there is a backup of the name server who
owns the topology, the directory of the different services running on the HANA system.
There is a backup of the index server, the actual database server.
There is XS, the built-in application server, and so on.
These services are all backed up separately.
Same thing happens for the log backup.
Now, with HANA 2 it is possible that when a log segment is full for say the name server, it
can be backed up together with that of the index server so you get a single log backup.
Couple of new parameters to support this, in the global.ini backup section.
We have backing_response_timeout, defaults to 600 seconds, so 10 minutes.
We have max_log_backup_size, defaults to 16, that is in gigabytes, and the max value is
64.
And we have log_backup_interval_mode, defaults to immediate, triggering a log backup when
a log segment is full, and this, you can now also set to service, in which case a log backup
is created after a service-specific timeout has been reached.
For more information, see the section ‘Working with third party backup tools’, here the
timeout for log backups documented in the HANA Administration Guide.
Then a final remark about release compatibility for IBM Power Systems.
If you want to use a HANA 1 backup to recover a HANA 2 database it needs to be SPS 10, 11,
or 12, and it needs to be from an Intel system.
Your target database for HANA 2 could be both Intel and IBM Power System, it doesn’t matter,
but the source needs to Intel.
You cannot use an IBM Power backup from a HANA 1 box to recover HANA 2.
This has to do with the endianness of Power Systems.
HANA 2 only supports Little Endian but this will get us a bit of topic, so I will not
address this here.
More information you will find here in the Administration Guide
and in the SAP Note 2235581 ‘SAP HANA Supported Operating Systems’,
and if you scroll down a bit, you have a section here
on the IBM Power for HANA 2 with the migration information from Big Endian to Little Endian,
there is a separate PDF, ‘SAPHANA System Migration’.
Then there is also an excellent resource on IBM.com about SAP HANA on IBM Power Systems
with references to Red Books and so on, so great stuff.
OK, so much for what’s new for Administration with SAP HANA 2.0, part 2, database backup
and recovery.
You can find more video tutorials on our YouTube channel.
If you would like to be informed about new video tutorials, please subscribe to our channel.
You can connect with us on LinkedIn or follow us on Twitter, as well for updates.
And we also have a page on Facebook and Google+.
If you are watching this video on YouTube, do not hesitate to leave your comments to
the video page and, if you like, give us your vote on this video.
Thank you for watching.