Introduction

In the upcoming weeks, we will be posting new videos to the SAP HANA Academy to show new features and functionality introduced with SAP HANA 2.0 Support Package Stack (SPS) 01.

The topic of this blog is system administration.

For the previous version of this blog, see SAP HANA 2.0 SPS 00 What’s New: Administration – by the SAP HANA Academy

For the full SAP HANA 2.0 SPS 01 blog list, see: What’s New with SAP HANA 2.0 SPS 01 – by the SAP HANA Academy

 

Tutorial Video

 

What’s New?

Multi-tenant Database Containers as standard operation mode

It is not a new feature but an old feature that received a promotion. Starting with SAP HANA 2.0 SPS 01, the standard and only operation mode for SAP HANA is the multi-tenant database container (MDC) mode.

If all your system management operations are already compatible with MDC, there is nothing to do. If not, you might have to make a couple of changes. For more information, see SAP HANA 2.0 SPS 01 What’s New: Installation and Update – by the SAP HANA Academy.

Multi-container database mode is the new default

 

EOL Statistics Server (but not the service running embedded)

As a consequence, as of SPS 01, the statistics server as an autonomous operating system process no longer exists. In a tenant database, the statistics server always runs embedded in the indexserver  (database engine) process.

Single-container systems that are still running the statistics server independently are automatically migrated to embedded after the upgrade.

The embedded statistics service was introduced with SAP HANA 1.0 SPS 09.

 

See SAP HANA Administration Guide – The Statistics Service.

 

Dynamic Result Cache

The result cache was introduced with SAP HANA 1.0 SPS 09 and extended to include virtual tables and linked databases (for use with Smart Data Access) in SAP HANA 2.0 SPS 00.

Calculation views, SQL views, and CDS views (table functions) can all benefit from using the cache to store aggregated values for frequently executed complex queries. This allows for a reduction of CPU consumption which, as a consequence, should increase overall system throughput.

Not all views are suitable for caching, however, and implementation should be carefully tested to  make sure that the correct results are returned, that the cached views is actually used, and that indeed the CPU consumption is reduced. See SAP Note 2014148 – Guidelines for Using the Query Result Cache and SAP HANA Troubleshooting and Performance Analysis Guide – Resources for Testing the Result Cache.

To further enhance the usability of the result cache, SAP HANA 2.0 SPS 01 introduces the Dynamic Result Cache. With this dynamic cache the risk of querying stale data is eliminated; it will always return transactionally consistent data and guarantees up-to-date results by firstly incrementally updating the cache with delta records of newly changed data and then returning the query result from the cache.

The dynamic cache is enabled by default. There are several system parameters available to tweak the configuration:

indexserver.ini - [dynamic_result_cache] 
enabled=true
# maximum memory allocation for all dynamic result cache entries (MB)
total_size=10000 
# memory budget for individual cache entries (MB)
max_cache_entry_size=1000
# prevent garbage collection on view table (sec)
version_garbage_collection_blocking_period=60

Using dynamic cache is easy. Just add the clause WITH | ADD DYNAMIC CACHE to your view definition:

CREATE VIEW <view_name> <...> WITH DYNAMIC CACHE;
ALTER VIEW <view_name> ADD DYNAMIC CACHE;

There are two hints (on/off) available for testing and tuning:

DYNAMIC_RESULT_CACHE | NO_DYNAMIC_RESULT_CACHE
DYNAMIC_RESULT_CACHE_IMPLICIT_MATCH

Two views are available to analyse the operation of the cache:

M_DYNAMIC_RESULT_CACHE
M_DYNAMIC_RESULT_CACHE_EXCLUSIONS

See SAP HANA Troubleshooting and Performance Analysis Guide – Dynamic Result Cache for benefits and limitations.

 

JSON Document Store

After the row store and column store, SAP HANA now also includes a DocStore. Not unlike MongoDB, the SAP HANA JSON Document Store enables the developer to store and manage JSON documents (artifacts) with support for native operations on JSON including filtering, aggregation, and joining JSON documents with HANA relational tables. We are not talking about storing JSON as CLOB in a regular database column, in other words – the quick and dirty way.

 

The Document Store is an optional feature of the SAP HANA database and you have to enable the docstore operating system process per tenant database. This is identical to enabling scriptservers for  the Application Function Library (AFL), for example:

ALTER DATABASE <database name> ADD 'docstore'

The DocStore does not have a pre-determined SQL port, all communication is routed through the regular indexserver (database engine) process.

After this, you can hand it off to the developer, see SAP HANA Developer Guide – Maintaining JSON Collections in the SAP HANA Document Store.

 

Workload Management

SAP HANA 2.0 SPS 00 introduced the Admission Control feature to set processing limits and to decide how to handle new requests if the system is close to the point of saturation. Two new parameters (queue_wait_time_threshold and record_limit) have been added to further fine tune this functionality. See SAP HANA Administration Guide – Configuring Admission Control.

Additionally a new monitoring view has been added (M_ADMISSION_CONTROL_EVENTS), which you can query to get information about why a particular statement was queued.

Additionally, a workload class hint has been introduced so that administrators can apply an alternative workload class at the time when the query is executed.

SELECT name, MAX(salary) 
  FROM employees 
 GROUP BY name
WITH HINT( WORKLOAD_CLASS("CEO") );

See SAP HANA Administration Guide – Managing Workload with Workload Classes.

SAP HANA Database Interactive Terminal (hdbsql)

Now we are getting to the small print, but another formatting option has been added to hdbsql: -fn.

With this option, line number are added when the input is displayed, making debugging easier.

See SAP HANA Administration Guide – SAP HANA HDBSQL Options.

 

Playlist

On the SAP HANA Academy, there is a full playlist covering all aspects of administration: bit.ly/SAPHANAAdmin

 

Documentation

For more information see:

SAP HANA Blogs

 

SAP Help Portal

 

SAP Notes

 

Thank you for watching

The SAP HANA Academy provides free online video tutorials for the developers, consultants, partners and customers of SAP HANA.

Topics range from practical how-to instructions on administration, data loading and modeling, and integration with other SAP solutions, to more conceptual projects to help build out new solutions using mobile applications or predictive analysis.

For the full library, see SAP HANA Academy Library – by the SAP HANA Academy

For the full list of blogs, see Blog Posts – by the SAP HANA Academy

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply