Wednesday 13 November 2019

Case Study: Data Aging in SAP HANA and S/4HANA

First, I would like to share a recent message about data aging from SAP:

SAP HANA Study Materials, SAP HANA Learning, SAP HANA Guides, SAP HANA Certifications, SAP HANA Online Exam

Below is an overview of data aging of application logs, object BC_SAL, done in both S/4HANA and Suite on HANA.

SAP HANA Study Materials, SAP HANA Learning, SAP HANA Guides, SAP HANA Certifications, SAP HANA Online Exam

Improved resource management is achieved by using a multi-temperature data strategy

The older the items get the less they are used

Items that are cleared in previous years should not be changed

Items that are still used, such as current year data, are considered hot

Other less used items are cold

Data that is considered cold, can be moved out of main memory into slower storage and accessed when needed

Changing the temperature of data from hot to cold according to application rules and moving them to cold storage is called data aging

SAP HANA Study Materials, SAP HANA Learning, SAP HANA Guides, SAP HANA Certifications, SAP HANA Online Exam

To activate data aging business function go to transaction SFW5 and search for DAAG_DATA_AGING and activate

SAP HANA Study Materials, SAP HANA Learning, SAP HANA Guides, SAP HANA Certifications, SAP HANA Online Exam

Authorizations needed – SAP provides some standard roles, but I found they are missing authorizations

SAP HANA Study Materials, SAP HANA Learning, SAP HANA Guides, SAP HANA Certifications, SAP HANA Online Exam

The list of data aging objects in Suite on HANA is small

SAP HANA Study Materials, SAP HANA Learning, SAP HANA Guides, SAP HANA Certifications, SAP HANA Online Exam

List is much larger for S/4HANA

SAP HANA Study Materials, SAP HANA Learning, SAP HANA Guides, SAP HANA Certifications, SAP HANA Online Exam

Use transaction DB02 to capture the statistics before and after.

Also run transaction TAANA

TAANA – transaction to perform table analysis

It means Table Analysis: Administration

You can use this to analyze tables according to certain fields, in this case, the DATAAGING field

SAP HANA Study Materials, SAP HANA Learning, SAP HANA Guides, SAP HANA Certifications, SAP HANA Online Exam

Generally these are the steps to perform data aging

SAP HANA Study Materials, SAP HANA Learning, SAP HANA Guides, SAP HANA Certifications, SAP HANA Online Exam

Partitioning means dividing tables into smaller pieces called partitions; can be managed when it comes to their in memory status

Data aging means moving data from one partition to another (not kept in memory)

There can only be one hot partition

Transaction DAGPTM

On the left panel, you see a list of partitioning objects and groups, assigned tables, and if already created, partitions.  Details on partitioning are on the right table

Initially tables are not partitioned, which is indicated with a red icon in the Is Partitioned column

SAP HANA Study Materials, SAP HANA Learning, SAP HANA Guides, SAP HANA Certifications, SAP HANA Online Exam

To create a partition, need to go to edit mode and enter time ranges in the intervals section

Some rules:

Time ranges are consecutive – no gaps and they do not overlap

One partition must cover current date

Hot partition should not be entered; it will be created automatically

You can use the period button where a wizard will create the partitions – see above where you enter start data, unit, period value (1 year) and number of repetitions

SAP HANA Study Materials, SAP HANA Learning, SAP HANA Guides, SAP HANA Certifications, SAP HANA Online Exam

Once the new intervals for the partitioning schema are defined, you can start partitioning by pressing F8 – this will trigger the background job

SAP HANA Study Materials, SAP HANA Learning, SAP HANA Guides, SAP HANA Certifications, SAP HANA Online Exam

Once the partitions are ready, you need to activate the data aging object, using transaction DAGOBJ

The red status icon indicates the object is inactive

You can use the activate icon or CTRL+F2 to activate

SAP HANA Study Materials, SAP HANA Learning, SAP HANA Guides, SAP HANA Certifications, SAP HANA Online Exam

After successful activating the object’s status is green

During activation, the system performs various consistency checks and ensures set up is complete

SAP HANA Study Materials, SAP HANA Learning, SAP HANA Guides, SAP HANA Certifications, SAP HANA Online Exam

The last step in configuring data aging is to provide object-specific customization – defining residence time

SAP HANA Study Materials, SAP HANA Learning, SAP HANA Guides, SAP HANA Certifications, SAP HANA Online Exam

Before triggering aging runs in update mode you can analyze potential impact by executing the analysis program

Run transaction DAGADM to launch display, select object, click Start Analysis run (not available for all objects) – only example I could find is FI_DOCUMENT

SAP HANA Study Materials, SAP HANA Learning, SAP HANA Guides, SAP HANA Certifications, SAP HANA Online Exam

After successful execution, the program log is displayed.  You have Summary and Details tabs and you can switch between them

In the summary view, a distinct list of messages is shown along with the number of objects for each message

Items in green, which have exceeded their lifetimes will be moved to cold storage.  Items in red will not be aged.

You can also click the details view

Note that detailed logs are never recorded for data aging runs in update mode

SAP HANA Study Materials, SAP HANA Learning, SAP HANA Guides, SAP HANA Certifications, SAP HANA Online Exam

Data aging in production mode can only be executed in the background

Run transaction DAGRUN

Aging runs are executed for each data aging group – you create or change data groups by going to the menu Goto > Edit Data Aging Groups

SAP HANA Study Materials, SAP HANA Learning, SAP HANA Guides, SAP HANA Certifications, SAP HANA Online Exam

To schedule a run, press F8 or go through the menu.

SAP HANA Study Materials, SAP HANA Learning, SAP HANA Guides, SAP HANA Certifications, SAP HANA Online Exam

Data aging job progress

A data aging job that is in progress is shown in yellow

You can stop a data aging run by using the stop button in the toolbar

When the job is finished the status icon turns to green

SAP HANA Study Materials, SAP HANA Learning, SAP HANA Guides, SAP HANA Certifications, SAP HANA Online Exam

Transaction DAGLOG displays data aging logs from update and simulation runs

Use Display Data Aging Run logs or Display Analysis Log to jump to those logs for a chosen data aging object.

In the aging run logs, use the dropdown menu to go to an aging job log or spool

SAP HANA Study Materials, SAP HANA Learning, SAP HANA Guides, SAP HANA Certifications, SAP HANA Online Exam

TAANA to check the data distribution across the participating tables.

SAP HANA Study Materials, SAP HANA Learning, SAP HANA Guides, SAP HANA Certifications, SAP HANA Online Exam

After the completion of the Data Aging job, SAP recommends to execute UNLOAD followed by LOAD command on the relevant tables (BALDAT , BALHDR), to free up the corresponding space in Memory

So what do you think?

No comments:

Post a Comment