Quantcast
Channel: SAP HANA Central
Viewing all 711 articles
Browse latest View live

Your SAP on Azure – Part 4 – High Availability for SAP HANA using System Replication

$
0
0
In the today’s post, I would like to present you a solution for protecting the HANA database server.

SAP HANA database offers two solutions that are designed for High Availability:

a) Host Auto-failover – in this solution you need to deploy additional host to the current HANA database and configure it to work in standby mode. In case the active node failures, the standby host can automatically switch operations to the secondary node. This solution requires a shared storage, which we already know is a small problem for Azure

b) System replication – in this solution you need to install separate HANA system and configure replication for data changes. By default, the system replication doesn’t support High Availability as HANA database doesn’t support automatic failover. But you can use the features of SUSE Linux to enhance the base solution!
SAP HANA Guides, SAP HANA Certifications, SAP HANA Learning, SAP HANA Tutorials and Materials

There are different types of templates, designed for different purposes. In this blog, we will make the use of sap-3-tier-marketplace-image-multi-sid-db, which creates components required only by the database. As an alternative, you can use sap-3-tier-marketplace-image-converged which will deploys the entire environment (DB + ASCS + APP Server) in one step.

I prefer to work with Visual Studio, but you can deploy the template right from your browser or with the use of PowerShell.

VM PROVISIONING

In the Visual Studio open new Azure Resource Group project.

SAP HANA Guides, SAP HANA Certifications, SAP HANA Learning, SAP HANA Tutorials and Materials

Now it’s just enough to click Deploy and fill the required parameters:

SAP HANA Guides, SAP HANA Certifications, SAP HANA Learning, SAP HANA Tutorials and Materials

A few moments later I have received a nice message saying the deployment went fine and no errors were reported:

Successfully deployed template 'azuredeploy.json' to resource group 'HANA_HA'.

Let’s have a look how does it look in the Azure portal.

SAP HANA Guides, SAP HANA Certifications, SAP HANA Learning, SAP HANA Tutorials and Materials

As you can see on above screenshot two VMs have been successfully deployed. The chosen template supports highly available scenarios, so both VMs were placed into Availability Set. The Load Balancer is initialized with backend pool and load balancing rules, so after having a quick look we can start building the solution.

HIGH AVAILABILITY CLUSTER IN SUSE LINUX ENTERPRISE SERVER

When our VMs are ready we log in and start configuration of the cluster. Firstly, we need to download additional packages for both servers:

◈ sle-ha-release
◈ fence-agents
◈ SAPHanaSR

You can do it from the command line or with the use of YaST.

SAP HANA Guides, SAP HANA Certifications, SAP HANA Learning, SAP HANA Tutorials and Materials

We initialize the cluster on the hha-db-0 host with the command:

ha-cluster-init

SAP HANA Guides, SAP HANA Certifications, SAP HANA Learning, SAP HANA Tutorials and Materials

On the second host we execute the following command to add a host to the cluster:

ha-cluster-join

Next step is to modify the corosync configuration to define the two nodes of the cluster. This step has to be executed on both servers:

SAP HANA Guides, SAP HANA Certifications, SAP HANA Learning, SAP HANA Tutorials and Materials

To enable new settings, we need to restart the corosync service.

SAP HANA INSTALLATION

We can progress now with SAP HANA installation on two hosts.

The ARM template we have used creates a data disk that is attached to our VM. Its size depends on the SAP System Size we have selected during the deployment.

SAP HANA Guides, SAP HANA Certifications, SAP HANA Learning, SAP HANA Tutorials and Materials

After the new partition is created we need to download HANA packages and start the install:

SAP HANA Guides, SAP HANA Certifications, SAP HANA Learning, SAP HANA Tutorials and Materials

If you’re using the ARM templates, please use 03 as the instance number. Otherwise, you need to manually modify the load balancer rules in Azure.

During the HANA deployment, we have some time to start the database installation on the second node.

SAP HANA Guides, SAP HANA Certifications, SAP HANA Learning, SAP HANA Tutorials and Materials

I want to use my HANA database together with SAP Netweaver, so I quickly provision new virtual machine and install SAP.

SAP HANA Guides, SAP HANA Certifications, SAP HANA Learning, SAP HANA Tutorials and Materials

Once the SAP Netweaver is installed we need to perform a full system backup HANA databases. This is required to enable system replication.

The setup of system replication is really easy and can be done with few mouse clicks in SAP HANA Studio. Select the first node and choose Configure System Replication from the context menu.

SAP HANA Guides, SAP HANA Certifications, SAP HANA Learning, SAP HANA Tutorials and Materials

I recommend reading the full list of important points to consider when working with HANA System Replication and Multitenant Database Containers. For me, the most important fact is that we can enable replication for entire database only. It is not possible to enable it only for particular tenants. The state of each tenant is also synchronized, which means that the ones that are online on the primary node are also online on the secondary node. The same applies to the stopped tenants – they keep the same state on both hosts.

SAP HANA Guides, SAP HANA Certifications, SAP HANA Learning, SAP HANA Tutorials and Materials

When replication is enabled on the primary node, we could start the configuration of the secondary node, but before we proceed we need to ensure that the SSFS PKI is the same on the primary and secondary node. Log in through SSH and copy the SSFS_<SID>.DAT and SSFS_<SID>.KEY files.

SAP HANA Guides, SAP HANA Certifications, SAP HANA Learning, SAP HANA Tutorials and Materials

Registering a system as a secondary node can be done only when the database is offline.

SAP HANA Guides, SAP HANA Certifications, SAP HANA Learning, SAP HANA Tutorials and Materials

Choose Register Secondary System from the Configuration and Monitoring:

SAP HANA Guides, SAP HANA Certifications, SAP HANA Learning, SAP HANA Tutorials and Materials

SAP HANA Guides, SAP HANA Certifications, SAP HANA Learning, SAP HANA Tutorials and Materials

After few minutes, the operation is complete. You can monitor the replication status in SAP HANA Studio. You can say the systems are in sync only if replication status is active for all volumes.

SAP HANA Guides, SAP HANA Certifications, SAP HANA Learning, SAP HANA Tutorials and Materials

The secondary system appears as operational, but you won’t be able to connect to it (you will receive information that Database Connection is not available). This is a correct behavior.

SAP HANA Guides, SAP HANA Certifications, SAP HANA Learning, SAP HANA Tutorials and Materials

The HANA System Replication is done, so let’s go back to SLES Cluster config. In the next step, we will configure the basic cluster config by importing default values. You can decide what action should be performed when the node stops responding (stonith-action). In our case, the VM will be deallocated.

Create new file on the first node called crm-defaults.txt and enter following configuration:

property $id="cib-bootstrap-options" \
  no-quorum-policy="ignore" \
  stonith-enabled="true" \
  stonith-action="off" \
  stonith-timeout="150s"
rsc_defaults $id="rsc-options" \
  resource-stickiness="1000" \
  migration-threshold="5000"
op_defaults $id="op-options" \
  timeout="600"

(source: microsoft.com)

Now import the new configuration with the following command:

sudo crm configure load update crm-defaults.txt

The defined STONITH device will stop the system in case of failure. Therefore we need to authorize it to perform operations in the Azure subscription.

Go to Azure portal and add a new application in the Azure Active Directory:

SAP HANA Guides, SAP HANA Certifications, SAP HANA Learning, SAP HANA Tutorials and Materials

The name and Sign-On URL are not important, just choose Web app / API as Application Type. Now, select the new app and choose Keys in the menu. Create a new entry with chosen name and select Never Expire in the second column. Remember to copy the Value after saving.

SAP HANA Guides, SAP HANA Certifications, SAP HANA Learning, SAP HANA Tutorials and Materials

The chosen role should be Owner to allow the application to start and stop VM.

SAP HANA Guides, SAP HANA Certifications, SAP HANA Learning, SAP HANA Tutorials and Materials

Execute this step for both VMs.

Following script configure the fencing mechanism. Please replace the bold strings with proper values from the table below.

Name in the fileName in Azure Where to get? 
Subscription IDSubscription ID Subscription blade 
Resource Group Resource Group Virtual Machine blade 
Tenant ID Directory ID Azure Active Directory blade -> Properties 
Login ID Application ID Azure Active Directory blade -> App Registration 
Password Key Value Can be retrieved only during key creation 

primitive rsc_st_azure_1 stonith:fence_azure_arm \
    params subscriptionId="subscription ID" resourceGroup="resource group" tenantId="tenant ID" login="login ID" passwd="password"

primitive rsc_st_azure_2 stonith:fence_azure_arm \
    params subscriptionId="subscription ID" resourceGroup="resource group" tenantId="tenant ID" login="login ID" passwd="password"

colocation col_st_azure -2000: rsc_st_azure_1:Started rsc_st_azure_2:Started

(source: microsoft.com)

Load the configuration with the following command:

sudo crm configure load update crm-fencing.txt

SAP HANA Guides, SAP HANA Certifications, SAP HANA Learning, SAP HANA Tutorials and Materials

It is required to execute two more scripts delivered by Microsoft to create SAP HANA resources:

a) crm-saphanatop.txt

SAP HANA Topology is a resource agent that monitors and analyze the HANA landscape and communicate the status between two nodes. The description of each parameter used can be checked by running man ocf_suse_SAPHanaTopology command.

primitive rsc_SAPHanaTopology_HHA_HDB03 ocf:suse:SAPHanaTopology \
    operations $id="rsc_sap2_HHA_HDB03-operations" \
    op monitor interval="10" timeout="600" \
    op start interval="0" timeout="600" \
    op stop interval="0" timeout="300" \
    params SID="HHA" InstanceNumber="03"

clone cln_SAPHanaTopology_HHA_HDB03 rsc_SAPHanaTopology_HHA_HDB03 \
    meta is-managed="true" clone-node-max="1" target-role="Started" interleave="true"
(source: microsoft.com)

b) crm-saphana.txt

This file defines the resources in the cluster together with the Virtual IP which is assigned to the Azure Load Balancer. You need to adjust the system id and number.

primitive rsc_SAPHana_HHA_HDB03 ocf:suse:SAPHana \
    operations $id="rsc_sap_HHA_HDB03-operations" \
    op start interval="0" timeout="3600" \
    op stop interval="0" timeout="3600" \
    op promote interval="0" timeout="3600" \
    op monitor interval="60" role="Master" timeout="700" \
    op monitor interval="61" role="Slave" timeout="700" \
    params SID="HHA" InstanceNumber="03" PREFER_SITE_TAKEOVER="true" \
    DUPLICATE_PRIMARY_TIMEOUT="7200" AUTOMATED_REGISTER="false"

ms msl_SAPHana_HHA_HDB03 rsc_SAPHana_HHA_HDB03 \
    meta is-managed="true" notify="true" clone-max="2" clone-node-max="1" \
    target-role="Started" interleave="true"

primitive rsc_ip_HHA_HDB03 ocf:heartbeat:IPaddr2 \ 
    meta target-role="Started" is-managed="true" \ 
    operations $id="rsc_ip_HHA_HDB03-operations" \ 
    op monitor interval="10s" timeout="20s" \ 
    params ip="10.0.0.4" 
primitive rsc_nc_HHA_HDB03 anything \ 
    params binfile="/usr/bin/nc" cmdline_options="-l -k 62503" \ 
    op monitor timeout=20s interval=10 depth=0 
group g_ip_HHA_HDB03 rsc_ip_HHA_HDB03 rsc_nc_HHA_HDB03

colocation col_saphana_ip_HHA_HDB03 2000: g_ip_HHA_HDB03:Started \ 
    msl_SAPHana_HHA_HDB03:Master  
order ord_SAPHana_HHA_HDB03 2000: cln_SAPHanaTopology_HHA_HDB03 \ 
    msl_SAPHana_HHA_HDB03
(source: microsoft.com)

SAP HANA Guides, SAP HANA Certifications, SAP HANA Learning, SAP HANA Tutorials and Materials

MONITORING

There are various tools that assist us with cluster monitoring.

crm_mon

This tool shows us information about SLES Cluster, including resources and status of each node.

SAP HANA Guides, SAP HANA Certifications, SAP HANA Learning, SAP HANA Tutorials and Materials

SAPHanaSR-showAttr

Displays information about the current status of SAP HANA System Replication. We are interested in sync_state column. When the replication is working fine the values should be PRIM for the primary node and SOK for the secondary.

SAP HANA Guides, SAP HANA Certifications, SAP HANA Learning, SAP HANA Tutorials and Materials

SAP HANA Studio

General information about the system replication status. We need to ensure the replication status is ACTIVE for all volumes.

SAP HANA Guides, SAP HANA Certifications, SAP HANA Learning, SAP HANA Tutorials and Materials

TESTING

It’s time to verify our solutions. In a production environment, a proper testing of the HA solution is crucial. For the purpose of this blog, we will simulation a lost connectivity.

Expected results:

1. The HANA operations are automatically switched to the secondary node
2. The first node will shut down
3. The SAP Netweaver will continue to work

Actual results:

1. The takeover took place and the operations were continued on the secondary node

SAP HANA Guides, SAP HANA Certifications, SAP HANA Learning, SAP HANA Tutorials and Materials

SAP HANA Guides, SAP HANA Certifications, SAP HANA Learning, SAP HANA Tutorials and Materials

2. The primary node is stopped and deallocated.

SAP HANA Guides, SAP HANA Certifications, SAP HANA Learning, SAP HANA Tutorials and Materials

3. I don’t have any good idea how to show you that the Netweaver was still running, so you have to believe me. There was a few seconds delay in operations, but it was continued without any problems!
Thanks for reading my blog! I hope you didn’t run into any issues while configuring the SAP HANA System Replication with automatic failover. See you in a short time – next blog will describe how to create your backup environment in the Microsoft Azure.

Installing the Automated Predictive Library (APL) on SAP HANA Express 2.0

$
0
0
The Automated Mode of SAP Predictive Analytics allows the efficient creation of powerful predictive models. Installing the Automated Predictive Library (APL) on SAP HANA makes it possible to train these models directly in SAP HANA. The data does not have to be extracted into an external system, the architecture is simplified and agility is increased.

This blog is written with SAP Predictive Analytics 3.3 and SAP HANA Express 2.0 SPS02.

Prerequisites


It is assumed that you have a SAP HANA Express 2.0 up and running. You have also been able to establish a connection from the SAP HANA studio.

In case you do not have such a system available yet, you can follow the SAP HANA Express documentation. To follow the steps in this blog it is sufficient to download the “Server only virtual machine”. Some of the steps listed below are flagged for “Server + Applications VM Only”, these are not required to be able to install the APL:

  • Installing SAP HANA 2.0, express edition (Virtual Machine Method) : All steps
  • Start Using SAP HANA 2.0, express edition (Virtual Machine Method) :
    • From “Step 1: Start your VM.”
    • to “Step 20: Optional Configuration: Test your Installation using the HANA Eclipse Plugin”. When installing the development tools inside Eclipse, it is sufficient to select only the option “SAP HANA Administration (Developer Edition)” under “SAP HANA Tools”.
You should be seeing something similar to this screen. Notice that the only installed plug-in is the Application Function Library (AFL). If the APL was installed, we should see it there.

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

Download the APL


The APL can be downloaded from the Software center. You find it by following this path:

◈ INSTALLATIONS & UPGRADES
◈ By Alphabetical Index
◈ P
◈ SAP Predictive Analytics
◈ SAP PREDICTIVE ANALYTICS 3
◈ COMPRISED SOFTWARE COMPONENT VERSIONS
◈ PRED ANALYTICS APL 3 FOR HANA2

Before downloading, make sure to set the drop down on that page to the correct operating system. The APL has different downloads for x86 and PowerPC.

Then download the latest version, currently: “APL 3.3. PRED ANALYTICS APL 3.3 FOR HANA2”. The file itself is called SAPPAAPL3003_0-80002689.TGZ.

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

Copy the APL onto SAP HANA


The file you have just downloaded needs to be copied onto the SAP HANA system. I am using a program called WinSCP, but plenty of other options are available.

Connect from WinSCP to the SAP HANA operating system, logging on with the ‘hxeadm’ user and the password you had specified during the setup of SAP HANA Express.

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

Copy the APL you had downloaded into the /tmp folder on the SAP HANA system.

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

Once the file is copied, it needs to be extracted. Still in WinSCP, select the file on the right hand side, on the SAP HANA system. Right-click the file, select “File Custom Commands”, then “UnTar/GZip…”. Confirm all prompts and the file is extracted into a newly created folder.

Install APL


The actual installation of the APL can be started from within the SAP HANA Administration Console. Right-click on your System connection, choose “Lifecycle Management”, then “Platform Lifecycle Management” and finally “SAP HANA Platform Lifecycle Management”.

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

You will be prompted for a password. Logon with the hxeadm user of the Linux operating system. This logon is NOT for your SAP HANA user.

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

Click into “Install or Update Additional Components”. Go into “Add Software Locations…” and choose the “installer” folder of the extracted APL file.

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

Confirm the selection with “Add”. You should see a screen that the “Automated Predictive Library” has been detected in that folder. Continue with “Next”. Confirm that you want to install this library.

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

On the next screen enter the passwords for both the Linux operating system user as well as for your SAP HANA user. Continue and the install will start and complete in a few minutes.

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

The APL is now installed! It will show as new plugin on the Administration panel of the SAP HANA Administration Console. If this screen was open during the install, you need to close and reopen it to see the new component.

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

Configure APL


The APL is installed, but not quite ready yet for use. It still needs to be configured. We will configure the system so that we can use the APL on the HXE tenant database, which comes with SAP HANA Express 2.0.

To run the APL the script server needs to be activated for the database. Open an SQL Console for the SYSTEMDB under the SYSTEM user and execute this statement:

ALTER DATABASE HXE ADD 'scriptserver';

Now make sure you have a connection to HXE in the SAP HANA Administration Console. Just specify the tenant database “HXE” when adding the system.

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

Let’s create a user, under which we call the APL. I name the user SAPPA. Grant this user the role APL_EXECUTE.

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

The role can also be assigned to an existing user, ie with this SQL statement:

call _SYS_REPO.GRANT_ACTIVATED_ROLE ('sap.pa.apl.base.roles::APL_EXECUTE','SAPPA');

Test APL


The APL is installed and configured. As final step we should verify everything is working well. The second line in the following SQL syntax has to be called by the user that wants to call the APL The first line switched the code execution to that user. Stating the obvious, you need to replace the Xs with the user’s real password.

CONNECT SAPPA PASSWORD XXXXXXXXX;
call "SAP_PA_APL"."sap.pa.apl.base::PING"(?)

Only if the above statement executes successfully, the APL is ready!

Bonus Material


If you just wanted to install the APL, then you are all set. Should you want to see how SAP Predictive Analytics leverages that APL, then read on. With SAP Predictive Analytics you get a graphical interface to train predictive models, without the need of using SQL.

This final part of the blog is kept rather short, it is assuming you are already fairly familiar with SAP HANA and SAP Predictive Analytics. Since the user is interacting with SAP HANA, ie to upload data, the user has been granted additional rights. To help you test this quickly, you could assign all roles visible in the SAP HANA Administration Console to the user.

On the machine you have SAP Predictive Analytics installed, you have to create a 64 bit ODBC source to SAP HANA Express. This uses the HANA ODBC driver that is installed by the SAP HANA Client, which is part of the SAP HANA Express download. In the ODBC Administrator, the driver is called HDBODBC.

The Server:Port setting for you is probably something like: hxehost:39015

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

To connect directly to HXE, you can go into “Settings” and add a property called DATABASENAME, pointing to the HXE database.

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

We also need some data in SAP HANA Express to train a model. You can use your own data or test with sample data of SAP Predictive Analytics. There are many ways to upload data. For such a quick test I prefer to use SAP Predictive Analytics itself. Make sour your installation of SAP Predictive Analytics has the same version as the APL you installed. Open the tool and in the menu select “Toolkit”, followed by “Perform a Data Transfer”.

This options allows to easily move data. You can transfer all columns from that file through ODBC into SAP HANA:
C:\Program Files\SAP Predictive Analytics\Desktop\Automated\Samples\Census\Census01.csv

Stay in SAP Predictive Analytics to train a model. Go into “Create a Classification/Regression Model”. Select the ODBC source and choose the table that holds the data from the Census file.
Set the “class” column as target variable. Exclude the columns KxIndex and fnlwgt.

Start the model training and the status messages should show the term “APL”. The model is being trained directly within SAP HANA, without extracting the data!

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

Automate SAP HANA System Replication with SLES for SAP Applications

$
0
0

SAP HANA System Replication on SLES for SAP Applications


What is this solution about?

The solution created by SUSE is to automate the takeover in SAP HANA system replication setups.

The basic idea is that only synchronizing the data to the second SAP HANA instance is not enough, as this only solves the problem of having the data shipped to a second instance. To increase the availability you need a cluster solution, which controls the takeover of the second instance as well as providing the service address for the client access to the database.

Let’s see from a bird’s perspective how the takeover automation is working

Step 1

In the first step a SAP HANA “PR1”  is running in system replication setup. The left node has the primary SAP HANA instance which means that this one is the instance clients should access for read/write actions.

SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA System Replications, SAP HANA Learning

Step 2

The second step demonstrates what happens first, when either the node1 or the instance on that node is failing. The setup has now a “broken” SAP HANA primary and of course also the synchronization to the second node is stopped.

SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA System Replications, SAP HANA Learning

Step 3

Step 3 explains the cluster’s first reaction: The secondary will be switched into a primary and in addition this new primary will be configured as new source of the system replication. Because of the complete node1 or only it’s SAP HANA instance is still down, the synchronization is not in “active” mode.

SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA System Replications, SAP HANA Learning

Step 4

Step 4 illustrates the situation, when node1 (or it’s SAP HANA instance) is coming back. Depending on the resource parameters the cluster registers the former primary to be the new secondary and the system replication begins to work.

SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA System Replications, SAP HANA Learning

If you do not like the cluster to proceed an automated registration of the former primary, you could change the resource parameters and the cluster will keep the “broken”/former primary in shutdown status. This could make sense, if administrators first like to figure out what happened at this instance in detail or for other operating aspects.

When the automated registration is switched off, the administrator could register the former primary at any time. The cluster resource agent will detect this new status during the following monitor action.

Introducing enhancements to SAP HANA capture and replay in SAP HANA 1.0 SPS12 Revision 122.14 and SAP HANA 2.0 SPS02

$
0
0
SAP HANA capture and replay was first made available with the initial release of SAP HANA 1.0 SPS12. Since release, many enhancements have been added to SAP HANA 2.0 and are now also available on SAP HANA 1.0 SPS12 Revision 122.14. While it greatly simplified testing application workload, the testing of data- and system-related changes remains a challenge for many of our customers today, especially in large-scale and complex environments.

Using customized scripts directly on the database layer or developing complex test scenarios in client applications continues to be required in parts, even with the use of SAP HANA capture and replay. However, the possibility to capture a test scenario executed on the database layer and then replay it on different systems multiple times can facilitate testing immensely.

SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA SPS12, SAP HANA Learning

Why use SAP HANA capture and replay?


With SAP HANA capture and replay, users can either use existing test scripts or scenarios and capture their execution, or capture workloads during regular system usage. Either way, these captured workloads can then be used for extensive replay on systems with different characteristics, such as changes in data distribution, data models, partitioning, as well as different revisions, changed .ini-files and more.

Using SAP HANA capture and replay, users can indicate and estimate whether a certain scenario or system configuration improves or degrades the overall workload runtime, introduces regressions in the form of mismatched results and more. These indicators can offer support in deciding on a way forward regarding a certain change made or a planned upgrade, for example. Of course, there are many other scenarios for which SAP HANA capture and replay can be used as well.

SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA SPS12, SAP HANA Learning

Overall, the process of using SAP HANA capture and replay mentioned in my blog for its initial release with SAP HANA 1.0 SPS12 is still relevant.

1. Generate workload on the database using the existing scripts, applications, clients and capture it using SAP HANA capture and replay.
2. Use SAP HANA capture and replay to pre-process the workload and prepare it for replay on the desired SAP HANA system.
3. Trigger the replay.
4. Use the replay report to analyze runtime- and result-based differences between the initial capture and the replay (or between different replays, if available).

SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA SPS12, SAP HANA Learning

Down port of SAP HANA capture and replay enhancements to SAP HANA 1.0 SPS12 Revision 122.14


Since the initial release of SAP HANA capture and replay with SAP HANA 1.0 SPS12 as part of the SAP HANA Performance Management Tools, many enhancements have been added in SAP HANA 2.0. They broaden the supported capture scenarios, improve the usability of the replay results, and offer new options when configuring captures and replays.

Most noteworthy enhancements to SAP HANA capture and replay include:

◈ Improved capture support: capture of XS classic requests and queries including NativeFAE/FDA requests.
◈ Support for time window- or disk space-based capturing: new options for defining continuous captures based on duration or disk space percentage.
◈ Support for multiple replayers: multiple replayer processes during replay for better scalability and performance.
◈ Support for transactional consistent replay and result-based comparison: enable check for transactional consistency during replay, as well as replay reports based on query results, not only runtimes.
◈ Support for replay to replay comparison: possibility to not only compare replay with base capture but also with other replays based on the same capture.

In addition to these mostly server-side enhancements, SAP HANA capture and replay’s UI integration in SAP HANA Cockpit 2.0 has been further improved. Thanks to enhancements to the replay reports and capture and replay configuration, SAP HANA capture and replay is now even easier to use for customers. To leverage all these new enhancements, we recommend the usage of the latest SAP HANA Cockpit 2.0 build and patch set.

Talking to our customers – we see that SAP HANA 1.0 SPS12 is still largely in use by them for productive scenarios. Therefore, we decided to make most of the enhancements related to SAP HANA capture and replay available within this version. Customers still running on SAP HANA 1.0 SPS 12 who want to benefit from these server-side and UI-side enhancements only need to deploy SAP HANA Cockpit 2.0 and are then good to go.

SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA SPS12, SAP HANA Learning

By doing so, they can take advantage of the full functionality of SAP HANA capture and replay. This helps identify potential pitfalls to ensure their transition to SAP HANA 2.0 or to a newer revision of SAP HANA 1.0 SPS12 will go smoothly. Specifically, benefits include:

◈ Evaluation of runtimes across changes in SAP HANA revisions/SPS, hardware, data models, table partitioning, etc.
◈ Evaluation of result regressions across changes in SAP HANA revisions/SPS, hardware, data models, table partitioning, etc.
◈ Comparison of replay to replay for scenarios with multiple replays
◈ Enhanced capture support for larger coverage of customer scenarios
◈ Improved usability and analysis using the new SAP HANA capture and replay interface provided in SAP HANA Cockpit 2.0
◈ Improved ease of use to ensure the most straightforward handling of capture and replay configuration

Considering this number of enhancements, we will provide a new guide for SAP HANA capture and replay, complementary to the information provided in our official documentation.

The guide offers information on setting up a system for the use of SAP HANA capture and replay, including details on capture and replay configuration, setting up a replayer and other prerequisites. It also includes detailed descriptions of available options as well as our recommendations when to use them, benchmarks and other KPIs, and system parameters and how to configure them best. Another portion of the guide deals with the reading of the replay report and offers insights into how to best navigate and read the presented results as a user.

SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA SPS12, SAP HANA Learning

Any feedback is welcome and we will continue to update this guide and our SAP Note as new features become available in SAP HANA capture and replay during the coming releases. If you have any other questions regarding SAP HANA capture and replay or the SAP HANA Performance Management Tools, please feel free to reach out to me directly.

SAP Analytics Cloud: Live Data Connection to HANA DB in SAP Cloud Platform using SSO

$
0
0
The SAP Cloud Platform (SAPCP) is a platform-as-a-service offering which supports customers’ digital transformation. It does not only provide an environment for the development of new applications but also allows the extension of existing cloud and on-premise systems. SAPCP has evolved as a central component in many enterprise landscapes for integrating data and business processes and for leveraging innovative technologies. By connecting a HANA database which is included in SAPCP with SAP Analytics Cloud (SAC), customers are equipped with advanced analytics and business intelligence features for their enterprise data.

In this blog post, we are going to create a Live Connection from SAC to SAPCP using Single Sign-on (SSO). “Live” data means that whenever a user opens a story in SAC, changes to the data in the source system are immediately reflected in SAC.

This blog post is structured as follows:

1. System Requirements


You are using one of the following systems:

◈ SAP HANA 1.0 SPS10, revision 102.2, or
◈ SAPCP running on SAP HANA SPS10, revision 1.02.2, or
◈ SAP HANA 2.0 SP01 or newer.

2. Setup of the HANA System


This section provides information on how to configure your HANA system to be able to establish a Live Connection to this system. It is subdivided into 2.1. Roles for HANA administrator, 2.2. Installation of the HANA Info Access Service and 2.3. Roles for HANA users using the Live Connection.

2.1. Roles for HANA administrator

Please make sure that the following roles are assigned to your HANA administrator account:

sap.hana.xs.admin.roles::SAMLAdministrator
sap.hana.xs.admin.roles::RuntimeConfAdministrator
sap.hana.ide.roles::CatalogDeveloper
sap.hana.ide.roles::SecurityAdmin

In SAP HANA studio this can be verified under Security -> Users -> AdminName (Please note that AdminName has to be replaced with the name of your HANA administrator.) (a). Under Granted Roles you can see the roles that are assigned to your account (b).

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

To grant a missing role to your HANA user, please click on the +– icon (a), type in the name of the role (b), select the corresponding role (c) and click on OK (d).

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB


2.2. HANA Info Access Service

If you are using a SAP HANA version from SPS10 ongoing, please verify that the Info Access Service is installed by default. In SAP HANA studio this can be done in the Systems view (a) under Content (b). You should see the following package (c):

sap\bc\ina\service

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

2.3. Roles for HANA users using the Live Connection

Please assign the Info Access Service role to all users who will use the Live Connection. The name of the Info Access Service role is:

sap.bc.ina.service.v2.userRole::INA_USER

In SAP HANA studio this can done under Security -> Users -> LiveConnectionUser (Please note that LiveConnectionUser has to be replaced with a HANA user that will use the Live Connection.) (a). Under Granted Roles click on the +-icon to add the Info Access Service role (b).

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

3. Configuration of the SAML Identity Provider


In this section we set up the trust relationship (3.1.) between SAP HANA and SAC, enable SAML (3.2.) and either perform an automatic (3.3.1.) or a manual (3.3.2.) user mapping to use SSO.

3.1. Setup of the Trust Relationship

1. Please navigate to the XS Admin Page of your SAP HANA system. The XS Admin Page can be accessed via https://<SAP HANA SYSTEM>/sap/hana/xs/admin. (Please replace <SAP HANA SYSTEM> with the name of your SAP HANA system.)

2. Please click on the main menu and select SAML Service Provider.

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

3. Under Service Provider Information (a), copy the name of the SAML Service Provider (b).

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB


4. Log onto SAP Analytics Cloud and click on Connection in the main menu.

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

Thereafter, click on the +-icon to add a new connection (a). Under Live Data Connection choose SAP HANA (b).

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

5. In the dialog that opens, enter a name for your new connection (Please note that the name cannot be changed later.) (a). Set the connection type to SAP Cloud Platform (b).

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

6. Add your SAP Cloud Platform account name (a), database name (b) and landscape name (c). You can optionally choose a default language from the list. Please note that the language can only be changed by the administrator later on. In case the language you have chosen is not installed on your system, SAC will choose the default language.

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

IMPORTANT: You can find your account name, database name and landscape name in your SAP Cloud Platform Cockpit. For detailed information, please see the following screenshots

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

After having clicked on the Global Account, please click again on Global Account to see your subaccounts.

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

Under Subaccount Information you can find your account name.

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

Please click on Databases & Schemas (a) to see the name of your database (b).

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

7. In SAC, please select SAML Single Sign-On (a) under Credentials. Thereafter, click on Download Metadata (b) and save the metadata file. Under SAML Provider Name, enter the IdP Provider Name (c) you copied in step 3.

IMPORTANT: Please do not click on OK, as you are not yet authorized to access the HANA system. We will complete the definition of your Live Connection in section 4. Saving the Live Connection in SAC.

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

8. In the XS Admin Page of your SAP HANA system, select Main Menu -> SAML Identity Provider.

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

9. Click on the +-icon in the bottom left corner to begin importing metadata.

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

10. Open the XML file that you have downloaded in step 7 b). Copy the content of the file and paste it to the Metadata input area in the XS Admin Page of your HANA system.

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

11. Please note down the name (b) of the SAML IdP under General Data (a).

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

12. Under Destination (a), input the following path into SingleSignOn URL (Redirect Binding) and SingleSignOn URL (PostBinding): /saml2/sso (b).

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

13. Please click on Save.

3.2. Enabling SAML

1. In the XS Admin Page of your SAP HANA system, select Main Menu -> XS Artifact Administration.

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

2. In the Packages area (a), please navigate to sap -> bc -> ina -> service -> v2 by clicking on the ->-icon (b).

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

3. Please make sure to have navigated to the correct directory (a). Click on v2 (b) to see the SAP Security Admin page (c).

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

4. Please click on Edit in the bottom right corner. SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

5. Select the SAML checkbox, if it is not already enabled (a).

Choose a SAML IdP in case it is not already selected (b). The name of the IdP should be the name, you noted down in step 11 of  3.1. Setup of  the Trust Relationship. Please click on Save (c).



SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB


3.3. User Mapping

You must either perform an automatic (3.3.1.) or a manual (3.3.2) user mapping. If you are using the same IdP for SAP HANA and SAC, you can automatically map all existing users to SAC. If you are using different IdPs for SAP HANA and SAC, you must perform a manual user mapping.

3.3.1. Automatic

1. Please navigate to the SAP HANA Web-based Development Workbench -> Catalog of your HANA system. (https://<SAP HANA SYSTEM>/sap/hana/ide/catalog/; Please replace <SAP HANA SYSTEM> with the name of your SAP HANA system.)

2. In the main menu, click on New -> Schema.

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

3. Enter a name for the new schema (a) and click on OK (b).

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

4. Please open the SQL console (a) and add the following procedure (b):

CREATE PROCEDURE  "<MYSCHEMA>"."sap.fpa.services::mapIdentityFromIdpToIdp" (IN FROM_IdP VARCHAR(2048), TO_IdP VARCHAR(2048))
      LANGUAGE SQLSCRIPT
      SQL SECURITY INVOKER AS
   BEGIN
      DECLARE CURSOR vExistingMappings FOR
         SELECT USER_NAME FROM "SYS"."SAML_USER_MAPPINGS" WHERE SAML_PROVIDER_NAME = TO_IdP;
      DECLARE CURSOR vUserSamlMappings FOR
         SELECT USER_NAME, SAML_PROVIDER_NAME, EXTERNAL_IDENTITY FROM "SYS"."SAML_USER_MAPPINGS";
      FOR cur_row AS vExistingMappings DO
         EXECUTE IMMEDIATE 'ALTER USER '||:cur_row.USER_NAME||' DROP IDENTITY FOR SAML PROVIDER '||:TO_IdP||'';
      END FOR;
      FOR cur_row AS vUserSamlMappings DO
         IF cur_row.SAML_PROVIDER_NAME = FROM_IdP THEN
            EXECUTE IMMEDIATE 'ALTER USER '||:cur_row.USER_NAME||' ADD IDENTITY '''||:cur_row.EXTERNAL_IDENTITY||''' FOR SAML PROVIDER '||:TO_IdP||'';
         END IF;
      END FOR;
END;​

IMPORTANT: Replace <MYSCHEMA> with the name of the schema you have created (here: UserMappingSAC).

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

5. Execute the procedure.

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

6. Please enter the following command in your SQL console:

CALL "<SCHEMA>"."sap.fpa.services::mapIdentityFromIdpToIdp"('<LOGIN IdP>', '<IMPORTED IdP NAME>');​

Replace <SCHEMA> with the selected schema name (here: UserMappingSAC), <LOGIN IdP> with the name of the SAP HANA IdP and <IMPORTED IdP NAME> with the name of the SAC IdP you noted down in step 11 of the subsection 3.1. Setup of the Trust Relationship.

IMPORTANT: To find the name of your SAP HANA IdP, go to the XS Admin Page of your HANA system and select Main Menu -> SAML Identity Provider. Under Destination, copy the Base URL.

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

7. Execute the SQL statement.

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB


3.3.2. Manual

1. Please navigate to Profile Management in SAC and copy the Cloud Identity. Please note that you may have to login first.

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

2. Please navigate to the SAP HANA Web-based Development Workbench -> Catalog of your HANA system. (https://<SAP HANA SYSTEM>/sap/hana/ide/catalog/; Please replace <SAP HANA SYSTEM> with the name of your SAP HANA system.)

3. Open the SQL console (a). Type in (b) and execute (c) the following query:

ALTER USER <HANA USER> ADD IDENTITY '<SAML MAPPING>' FOR SAML PROVIDER <IMPORTED IdP NAME>;
ALTER USER <HANA USER>  ENABLE SAML;​

Important: Please make sure that you are logged in to your HANA system with a user that is different from the user who appears in the SQL statement (i.e., <HANA USER>) as a user is not able to alter the second statement for herself. Replace <HANA USER> with the user ID of the HANA user that is using the Live Connection, <SAML MAPPING> with the Cloud Identity you copied in step 1 and <IMPORTED IdP NAME> with the name of the SAC IdP you noted down in step 11 of 3.1. Setup of the Trust Relationship.

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

4. Saving the Live Connection in SAC


As pointed out in step 7 of 3.1. Setup of the Trust Relationship, we do now complete the definition of our Live Connection in SAC. In case the browser tab you opened in subsection 3.1. Setup of the Trust Relationship (steps 1-7) is still available, the only thing that has to be done is to click on OK. Otherwise, steps 1-7 of 3.1. Setup of the Trust Relationship have to be re-executed.

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

You have now defined a Live Connection and can start creating models using this Live Connection. On top of those models you can build stories and thus consume live data from your HANA system in SAC.

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

In the screenshot above, you can find a sample story which consumes live data and shows the pipeline of the S/4HANA product for all regions.

[Optional: Download HANA Info Access Toolkit]


This section is only relevant in case the Info Access Service is not installed on your HANA system by default, i.e. you have not been able to complete subsection 2.2. HANA Info Access Service successfully.

In the following, we set up and activate the SAP HANA Info Access Service on your HANA system. Therefore, we are going to import the Info Access Toolkit and the SINA API first (steps 1-11) and thereafter we import the Info Access Service (steps 12-16).

Henceforth, we assume that you can access the SAP Software Download Center. Please note that your view may differ from the screenshots provided as it depends on your user rights.

1. Navigate to the Software Download Center.

Under Support Packages and Patches (a), click on By Category (b) and select SAP In-Memory (SAP HANA) (c).

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

3. Please click on SAP HANA Platform Edition.

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

4. Please click on SAP HANA Platform EDIT 1.0.

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

5. Please click on HANA INA TOOLKIT HTML CONTENT.

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

6. Please click on HANA INA TOOLKIT HTML 1.0 (b). (a) shows the directory, you should see having followed the steps described above.

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

7. Please download and unpack the file HCOINAUITOOLKIT<Version>. You can also select a .SAR archive instead. .SAR files can be unpacked using SAPCAR. Each of the archive files contains the SAP HANA Delivery Unit HCOINAUITOOLKIT.tgz.

8. In SAP HANA studio click on File -> Import (a), select SAP HANA Content -> Delivery Unit (b) and click on Next (c).

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

9. Under Target System select your database instance (a) and click on Next (b).

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

10. Please select Client (a) and choose the tgz Delivery Unit on your local disk (b) which you have extracted in step 2. Select both actions (c) and click on Finish (d).

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

11. If the import of the Delivery Unit has been successful, in the Systems view (a) under Content (b), you should see the following packages (c):

sap\bc\ina\api
sap\bc\ina\demos
sap\bc\ina\uitoolkit

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

12. Now that the Info Access Toolkit and the SINA API have been imported, we can import the Info Access Service.

In SAP HANA Studio, select File -> Import.

13. Please click on SAP HANA Content -> Delivery Unit and choose Next.

14. Under Target System choose your database instance.

15. Select Server (a) and from the dropdown list select the SYS/global/hdb/content/HCO_INA_SERVICE.tgz Delivery Unit (b). Please select both actions (c) and click on Finish (d).

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB


16. If the import of the Delivery Unit has been successful, in the Systems view (a) under Content (b), you should see the following package (c):

SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning, SAP Analytics Cloud, SAP HANA SSO, SAP HANA DB

17. The HANA Info Access Service is now set up and activated on your system.

Create a value help (for input parameter / variable) in HANA Calculation view

$
0
0
Input parameters and Variables are two diferent mecanism that HANA provide us to get interaction with final users.

In some cases, we need to include an input parameters / Variables with value help with the propose of provide more information when user have to choose an input value.

In this post I’m goint to explain the steps to create a custom value help and some tips that you have to take in mind to get start with this topic.

Assumptions


I’m going to assume readers has HANA envairoment with SAP ECC tables replicates (like SAP ECC on HANA,  or SAP ECC – SLT – HANA)
We use HANA 2.0 SP01 with Eclipse Neon (4.6.3) to do this tutorial

Problem phase:


Requirement

Customer needs a report where he can identify how many materials are there by material type.

Analysis

We know that this basic information of materials are in MARA table, so we need to develop a HANA view (Calculation view), count materials by material type and add material type value help as an input parameter.

Solution phase:


Create calculation view

We created a calculation view called CV_001_MATERIAL_BY_MATTYPE

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Calculation

Here we need to add MARA table as a projection and select MANDT, MATNR, and MTART fields

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Calculation

After that we need to creat a counter, so open Agregartion and add all fields to output 
SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Calculation

Now in the output section, create a new counter (by material) in calculated colums

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Calculation

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Calculation

Now before create an input parameter we need to have a value help HANA view, so, lets go to create it.

Create calculation view for value help


CV_0002_MATTYPE_VALUE_HELP

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Calculation

Here we need to perform a text join with T134 (Material typs) and T134T (Material type text)

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Calculation

Now it is an importat step, we need to add in semantics, a label colum info for material type field

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Calculation

With this our Value help view is ready, so activate it (Dont forget add a measure field, like counter, to activate the view)

Implement input parameter with custom value help view

In CV_001_MATERIAL_BY_MATTYPE‘s semantics choose Parameter/Variable tab and create an input parameter

◈ Name: I_MaterialType
◈ Label: Material type
◈ Parameter type: Column
◈ View/table for value help: use  CV_0002_MATTYPE_VALUE_HELP
◈ Reference column: choose MTART field

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Calculation

Finally we need to add a filter with this parameter, so open MARA projection and apply a filter in MTART field

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Calculation

Thats it, if we use the data preview, we can see that the value help is working fine

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Calculation

by choosing ZSER material type we can see there is 11 materials created with this type

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Calculation

What about variables?


Is the same process, just choose variables insted input parameter and apply the same steps

SAP Hana Smart Data Access (SDA) – Basic Configuration

$
0
0
In this post, I have explained step by step configuration of  Smart Data Access for Hana Database with error resolutions.

One of main challenges that companies are facing today are

1. Get information in real time to make quick decision on time

2. At the same time, we need to keep control over cost for IT and Technology.

By Keeping Business requirement in mind, SAP has introduced Smart Data Access in SAP HANA which is a Virtualization Technique. This feature is introduced from Hana 1.0 SPS 6 in SAP HANA.

What is Smart Data Access?


SAP HANA smart data access enables remote data to be accessed via SQL queries as if they are local tables in HANA, without copying the data into SAP HANA.

Not only does this capability provide operational and cost benefits, but most importantly it supports the development and deployment of the next generation of analytical applications which require the ability to access and integrate data from multiple systems in real-time regardless of where the data is located or what systems are generating it.

SAP Hana Smart Data Access (SDA), SAP HANA Certifications, SAP HANA Guides, SAP HANA Tutorials and Materials

Key Concept of SAP HANA Smart Data Access

Smart Data Access is a technology which enables remote data access as if they are local tables in HANA without copying data into SAP HANA.

It is based on local virtual tables that maps to an existing object at the remote data source site.

SAP Hana Smart Data Access (SDA), SAP HANA Certifications, SAP HANA Guides, SAP HANA Tutorials and Materials

Data required from other sources will remain in virtual tables. Virtual tables will point to remote tables in different data sources. It will enable real time access to data regardless of its location and at same time, it will not affect SAP HANA database.
Customers can then write SQL queries in SAP HANA, which could operate on virtual tables. The HANA query processor optimizes these queries, and executes the relevant part of the query in the target database, returns the results of the query to HANA, and completes the operation.

With the SAP HANA 2.0 SPS 00 release, virtual tables have been integrated with result caching in HANA. Static caching has been available as of SAP HANA 1.0 SPS 11, what is new in this release is the support for virtual tables. If you choose to enable the caching feature on virtual tables you can look forward to improved performance by means of avoiding redundant computation of identical and frequent queries. You can enable this feature either directly via the ini file or by using SQL. Also keep in mind that you need to define a cache staleness restriction when configuring.

SAP Hana Smart Data Access (SDA), SAP HANA Certifications, SAP HANA Guides, SAP HANA Tutorials and Materials

Restrictions on usage of Smart Data Access:

Data in virtual tables cannot be modified i.e. insert, update and delete operations are not possible on virtual tables. However, we can do select on virtual table and put data in HANA table.

Virtual table does not support BLOB/CLOB data type. Workaround of this problem is to create view on remote table by excluding column of BLOB/CLOB type and then create virtual table with the help of view.

Virtual Tables cannot be used in multi node HANA cluster. However, it is possible to access virtual table from one HANA server to other.

Some analytical view does not support virtual tables.

SAP Hana Smart Data Access (SDA), SAP HANA Certifications, SAP HANA Guides, SAP HANA Tutorials and Materials

Need to add below entries in odbc.ini file

[HDB]

Driver=/hana/shared/<SID>/hdbclient/libodbcHDB.so

ServerNode=<hostname>:31113

->Expand the  folder Provisioning<-we see the option Smart Data Access.

SAP Hana Smart Data Access (SDA), SAP HANA Certifications, SAP HANA Guides, SAP HANA Tutorials and Materials

Expand  the tab Remote Sources, there you will find all different sources connected remotely

SAP Hana Smart Data Access (SDA), SAP HANA Certifications, SAP HANA Guides, SAP HANA Tutorials and Materials

Expand remote sources<-select new remote source

SAP Hana Smart Data Access (SDA), SAP HANA Certifications, SAP HANA Guides, SAP HANA Tutorials and Materials

Click on adapter name<-we can connect to any of the following adapter names

SAP Hana Smart Data Access (SDA), SAP HANA Certifications, SAP HANA Guides, SAP HANA Tutorials and Materials

Right click on remote source<-select new remote source

SAP Hana Smart Data Access (SDA), SAP HANA Certifications, SAP HANA Guides, SAP HANA Tutorials and Materials

Provide source name, adapter name, server name, port number, user name and password

If you connect with system user, use the port 3xx13 (xx->Instance No)

->From Hana 2.0 SP00  by default it contains 1 tenant (Multi Tenant), so use the port 3XX41 (xx- instance no)

SAP Hana Smart Data Access (SDA), SAP HANA Certifications, SAP HANA Guides, SAP HANA Tutorials and Materials

Click on save

SAP Hana Smart Data Access (SDA), SAP HANA Certifications, SAP HANA Guides, SAP HANA Tutorials and Materials

Once it is connected, we see the source system connected as shown below.

SAP Hana Smart Data Access (SDA), SAP HANA Certifications, SAP HANA Guides, SAP HANA Tutorials and Materials

Click on save this editor

SAP Hana Smart Data Access (SDA), SAP HANA Certifications, SAP HANA Guides, SAP HANA Tutorials and Materials

Right click on remote source<-click refresh, now we can see new source “HANA_LOCAL_INDIA5” is created

SAP Hana Smart Data Access (SDA), SAP HANA Certifications, SAP HANA Guides, SAP HANA Tutorials and Materials

Go to catalog<-BEST schema<-tables<right click on tables<-click on new virtual table

SAP Hana Smart Data Access (SDA), SAP HANA Certifications, SAP HANA Guides, SAP HANA Tutorials and Materials

Give the table name and schema type and then click on browse

SAP Hana Smart Data Access (SDA), SAP HANA Certifications, SAP HANA Guides, SAP HANA Tutorials and Materials

Once you click the button browse, expand source system<-null<-schema<-select sales and click on OK

SAP Hana Smart Data Access (SDA), SAP HANA Certifications, SAP HANA Guides, SAP HANA Tutorials and Materials

Click on save this editor

SAP Hana Smart Data Access (SDA), SAP HANA Certifications, SAP HANA Guides, SAP HANA Tutorials and Materials

One it is saved we can see table – HANA_LOCAL_INDIA5_SALES HANA_LOCAL_INDIA5

SAP Hana Smart Data Access (SDA), SAP HANA Certifications, SAP HANA Guides, SAP HANA Tutorials and Materials

Now, we need to use the source table in the calculation view, in order to create calculation view, we need to create a package first, so right click on content->new->click on package

SAP Hana Smart Data Access (SDA), SAP HANA Certifications, SAP HANA Guides, SAP HANA Tutorials and Materials

Provide details and click on ok

SAP Hana Smart Data Access (SDA), SAP HANA Certifications, SAP HANA Guides, SAP HANA Tutorials and Materials

Right click on package “SDA111”<new<-select calculation view

SAP Hana Smart Data Access (SDA), SAP HANA Certifications, SAP HANA Guides, SAP HANA Tutorials and Materials

Provide details and click on finish

SAP Hana Smart Data Access (SDA), SAP HANA Certifications, SAP HANA Guides, SAP HANA Tutorials and Materials

Drag and drop the source table onto the work space

SAP Hana Smart Data Access (SDA), SAP HANA Certifications, SAP HANA Guides, SAP HANA Tutorials and Materials

Drag and drop projection onto workspace

SAP Hana Smart Data Access (SDA), SAP HANA Certifications, SAP HANA Guides, SAP HANA Tutorials and Materials

Drag and drop the source system into the projection

SAP Hana Smart Data Access (SDA), SAP HANA Certifications, SAP HANA Guides, SAP HANA Tutorials and Materials

Select region_id, prod_id and sales_amt in the source system table

SAP Hana Smart Data Access (SDA), SAP HANA Certifications, SAP HANA Guides, SAP HANA Tutorials and Materials

Link a join between projection and aggregation

SAP Hana Smart Data Access (SDA), SAP HANA Certifications, SAP HANA Guides, SAP HANA Tutorials and Materials

Click on aggregation and select the columns from the table

SAP Hana Smart Data Access (SDA), SAP HANA Certifications, SAP HANA Guides, SAP HANA Tutorials and Materials

Click on semantics

SAP Hana Smart Data Access (SDA), SAP HANA Certifications, SAP HANA Guides, SAP HANA Tutorials and Materials

Save and validate<-save and activate

SAP Hana Smart Data Access (SDA), SAP HANA Certifications, SAP HANA Guides, SAP HANA Tutorials and Materials

Assign objects to change and click on finish

SAP Hana Smart Data Access (SDA), SAP HANA Certifications, SAP HANA Guides, SAP HANA Tutorials and Materials

Click on data preview

SAP Hana Smart Data Access (SDA), SAP HANA Certifications, SAP HANA Guides, SAP HANA Tutorials and Materials

Click the button Raw Data

SAP Hana Smart Data Access (SDA), SAP HANA Certifications, SAP HANA Guides, SAP HANA Tutorials and Materials

The data in cache memory is empty, so calculation view request data  from virtual table. The virtual table gets data from source table to connection, then to calculation view through connection itself.

SAP Hana Smart Data Access (SDA), SAP HANA Certifications, SAP HANA Guides, SAP HANA Tutorials and Materials
Troubleshooting

1. 2397816 – SAP DBTech JDBC: [403]: internal error: Cannot get remote source objects: Unable to load driver manager on IBM Power

2316463 – * -10709: Connection failed (RTE: [89006] System call ‘connect’ failed, rc=111: Connection refused

Cause: This error is usually caused by using the wrong port for the connection

Resolution:

SAP Hana Smart Data Access (SDA), SAP HANA Certifications, SAP HANA Guides, SAP HANA Tutorials and Materials

2. Error: SAP DBTech JDBC: [403]: internal error: Cannot get remote source objects: [SAP AG][LIBODBCHDB SO][HDBODBC] General error;10 authentication failed

SAP Hana Smart Data Access (SDA), SAP HANA Certifications, SAP HANA Guides, SAP HANA Tutorials and Materials

Resolution: SAP System is on Hana 2.0 SP01 so by default it contains 1 tenant (Multi Tenant), use the port 3XX41 (xx- instance no)

SAP HANA 2.0 XS Advanced Installation – by the SAP HANA Academy

$
0
0

Introduction


Recently, we have updated a number of SAP HANA Academy tutorial videos about installing SAP HANA components:

SAP HANA Installation and Update – SAP HANA 2.0 SPS 02

In this blog, I will provide some references and background information about the SAP HANA XS Advanced (XSA) runtime.

SAP HANA 2.0, SAP HANA Guides, SAP HANA Tutorials and Materials, SAP HANA Learning, SAP HANA Certifications
SAP HANA Academy – SAP HANA Installation and Update (YouTube Playlist)

Tutorial Video

In this tutorial video, we cover where to download the latest version of both the SAP HANA XS Advanced runtime and the different XS Advanced components; how to perform an installation of the runtime together with SAP HANA database server; and how to perform an update of a server installation to add the XSA runtime component using the SAP HANA database lifecycle management tool (hdblcm) in graphical, web, and command-line mode; how to perform an unattended installation of the XSA runtime with hdblcm in batch mode and the use of a response file.



SAP HANA Academy – XS Advanced

SAP HANA XS Advanced Model


Whereas installing the SAP HANA (database) server maybe takes 15 minutes on a bad day, installing the SAP HANA XSA runtime will take a good 90 minutes. To understand why this is the case, it is good to have a basic understanding of the XSA architecture.

Unlike the xsengine process of XS classic, the XS Advanced runtime is not built-in/embedded into the SAP HANA database server and needs to be installed separately.

The XSA runtime comprises four operating system processes:

◈ xsconstroller (Controller, FileSystem Broker, Platform Router)
◈ xsexecagent (Execution Agent)
◈ diserver (Deployment Infrastructure Server)
◈ xsuaaserver (User Account and Authentication (UAA) service, UAA broker, HDI broker)

The runtime has its own role (xs_worker) and can be included with the SAP HANA server on a single-host installation, on a distributed system for load balancing, and on a dedicated host in a multi-host environment, including as a standby system (xs_standby role) for high availability configurations:

SAP HANA 2.0, SAP HANA Guides, SAP HANA Tutorials and Materials, SAP HANA Learning, SAP HANA Certifications

SAP HANA 2.0, SAP HANA Guides, SAP HANA Tutorials and Materials, SAP HANA Learning, SAP HANA Certifications

XS Advanced system concepts

The images below are from the Developer and Administration/Security guides (same paragraph) and illustrate the functionality which the different services provide.

SAP HANA 2.0, SAP HANA Guides, SAP HANA Tutorials and Materials, SAP HANA Learning, SAP HANA Certifications

XS Advanced system architecture

SAP HANA 2.0, SAP HANA Guides, SAP HANA Tutorials and Materials, SAP HANA Learning, SAP HANA Certifications

Technical System Landscape of XS Advanced Application Server

Software Downloads

You can download the latest version of the XS Advanced runtime and the XSA components from the SAP ONE Support Portal. This works exactly the same as for the other SAP HANA components.

Navigation path: H > SAP HANA PLATFORM EDITION > SAP HANA PLATFORM EDITION 2.0: SUPPORT PACKAGES AND PATCHES

The table below lists the XSA components for SAP HANA Platform Edition 2.0

Software ComponentSupport Package Patches Note 
XS_ADVANCED_RUNTIMEXS RUNTIME 12582204
XS_ADVANCED_RUNTIME SAP EXTENDED APP SERVICES 1 2582204 
XS_MONITORING XS MONITORING 1 2465860 
XS_SERVICES XS SERVICES 1 2465860 
XS_JAVA XS JAVA 1 2465860 
XS_JAVASCRIPT XS JAVASCRIPT 1 2465860 
XSAC_ALM_PI_UI XSAC_ALM_PRODUCT_INSTALLER_UI1 2495800 
XSAC_XSA_COCKPIT XSA COCKPIT 1 2465860 
XSAC_SAP_WEB_IDE SAP WEB IDE 22457320 
XSAC_HRTT SAP HANA RUNTIME TOOLS 2.0 2373065
XSAC_FILE_PROC XSAC FILEPROCESSOR 1.0 2419428 
XSAC_PORTAL_SERV XSAC_PORTAL_SERVICES 1.0 2538943 
XSAC_UI5_FESV2 SAPUI5 FESV2 XSA 1 2451647 
XSAC_UI5_FESV3 SAPUI5 FESV3 XSA 1 2458437
XSAC_XMLA_INT XSAC XMLA INTERFACE FOR HANA 1 2494696 
XSAC_SHINE SAP HANA DEMO MODEL ADV. 12239095 
XSAC_MIGRATION XSAC MIGRATION 1 2493252 
XS_GERRIT XS GERRIT 2 2503815

SAP HANA 2.0, SAP HANA Guides, SAP HANA Tutorials and Materials, SAP HANA Learning, SAP HANA Certifications

SAP Software Downloads – Support Packages and Patches

The XSA runtime and XSA components are included in the SAP HANA 2.0 platform edition installation media.

Most components are included in the XSA_CONTENT_10 directory but not the SAP Web IDE for SAP HANA, the migration toolkit, and the Database Explorer (Runtime Tools: HRTT).

The XS clients for Windows, Linux and macOS are provided as compressed zip files in the XSA_CLIENT_10 directory. 

The XSA runtime directory contains the SAP HANA lifecycle management tools hdbsetup (graphical), hdbinst, hdbsetup and hdbuninst but these utilities should not be executed directly. On the SAP HANA server, always install components using the SAP HANA Database Lifecycle Manager (hdblcm).

SAP HANA 2.0, SAP HANA Guides, SAP HANA Tutorials and Materials, SAP HANA Learning, SAP HANA Certifications

SAP HANA 2.0 platform edition – 51052325 extracted

SAP HANA XS Advanced Runtime Installation


To install the XSA runtime and the different XSA components, you can choose to run the SAP HANA Lifecycle Management tool in graphical (Windows), web or command-line mode.

For the web version, you can start the tool from the SAP HANA cockpit, SAP HANA studio, or directly using the SAP host agent URL [ https://<host>:1129/lmsl/HDBLCM/<SID>/index.html ]

SAP HANA 2.0, SAP HANA Guides, SAP HANA Tutorials and Materials, SAP HANA Learning, SAP HANA Certifications

SAP HANA Platform Lifecycle Management – URL

Start the installation from the Install or Update Additional Components tool.

The first step is to indicate to the tool where the installation media is located using the Add Software Locations button.

SAP HANA 2.0, SAP HANA Guides, SAP HANA Tutorials and Materials, SAP HANA Learning, SAP HANA Certifications

SAP HANA Lifecycle Management – 1. Add Software Locations

Next, select the SAP HANA XS Advanced Runtime component for installation.

SAP HANA 2.0, SAP HANA Guides, SAP HANA Tutorials and Materials, SAP HANA Learning, SAP HANA Certifications

SAP HANA Lifecycle Management – 2. Select Components

In step 3, you can add additional hosts in case you want to create a distributed system and define the host role for the XSA runtime (xs-worker or xs_standby). You will be prompted if you want to assign the XS runtime roles to the hosts with database roles (see above, section XSA system concepts).

SAP HANA 2.0, SAP HANA Guides, SAP HANA Tutorials and Materials, SAP HANA Learning, SAP HANA Certifications

SAP HANA Lifecycle Management – 3. Additional Hosts Properties

In step 4, you need to provide the passwords for the operating system administration account <sid>adm and for the system and tenant database SYSTEM accounts. This is not XSA specific but related to the SAP HANA server.

In step 10 (steps 6, 7, 8, and 9 are for Streaming, Dynamic Tiering, Accelerator and Remote Data Sync – when selected), we get to the screen where we can define the XS Advanced Runtime parameters.

SAP HANA 2.0, SAP HANA Guides, SAP HANA Tutorials and Materials, SAP HANA Learning, SAP HANA Certifications

SAP HANA Lifecycle Management – 10. Configure XS Advanced Runtime

When the checkbox ‘Run Applications in Customer Space with Separate OS User’ is selected, you are prompted to set the operating system user ID for the SAP and customer space users (Linux). In a distributed (multi-host) environment, these need to be the same.

SAP HANA 2.0, SAP HANA Guides, SAP HANA Tutorials and Materials, SAP HANA Learning, SAP HANA Certifications

SAP HANA Lifecycle Management – 11. Configure XS Advanced Space OS User Properties

In the last step, step 13, you can select the XSA components that you want install together with the runtime. Note that not all components are selected by default.

You can run the SAP HANA Lifecycle Management tool again to install (or update) additional XSA components at a later stage. 

SAP HANA 2.0, SAP HANA Guides, SAP HANA Tutorials and Materials, SAP HANA Learning, SAP HANA Certifications

SAP HANA Lifecycle Management – 12. Choose XS Advanced Components to be Installed

The last screen lists all selections made for review and confirmation.

SAP HANA 2.0, SAP HANA Guides, SAP HANA Tutorials and Materials, SAP HANA Learning, SAP HANA Certifications

SAP HANA Lifecycle Management – 14. Review and Confirm

Install using Windows

To run the SAP HANA Lifecycle Management tool in graphical mode, just run the hdblcmgui command from the installation media from the Lifecycle Management directory (HDB_LCM_LINUX_X86_64). To run the tool in graphical mode, an X-Windows environment needs have been installed and configured. This might be a bit of an issue as typically the SAP HANA server will have a minimal installation without X-Windows environment.

SAP HANA 2.0, SAP HANA Guides, SAP HANA Tutorials and Materials, SAP HANA Learning, SAP HANA Certifications

Running HDB_LCM_LINUX_X86_64/hdblcmgui

In the print screens below, you can see that the dialogs in the version are exactly the same as for the web version. The same is true for the command-line.

SAP HANA 2.0, SAP HANA Guides, SAP HANA Tutorials and Materials, SAP HANA Learning, SAP HANA Certifications

SAP HANA Lifecycle Management (hdblcmgui) – Detected Software Components

SAP HANA 2.0, SAP HANA Guides, SAP HANA Tutorials and Materials, SAP HANA Learning, SAP HANA Certifications

SAP HANA Lifecycle Management (hdblcmgui) – Add Hosts

SAP HANA 2.0, SAP HANA Guides, SAP HANA Tutorials and Materials, SAP HANA Learning, SAP HANA Certifications

SAP HANA Lifecycle Management (hdblcmgui) – XS Advanced Runtime Properties

Unattended Installation with Response File

To automate SAP HANA XS Advanced runtime installations (or XSA component updates), you can run the SAP HANA Lifecycle Management tool in batch mode with a response file.

Installation automation is the topic of another blog in this series, so I will just highlight the required steps here.

First, create a template file with the hdblcm parameter ‘–dump_configfile_template=<filename>’

SAP HANA 2.0, SAP HANA Guides, SAP HANA Tutorials and Materials, SAP HANA Learning, SAP HANA Certifications

SAP HANA Lifecycle Management (hdblcm) – Create Config File

Next, you need to edit the template file to provide the required parameters. You use the online help from hdblcm for the specific syntax of the parameters. 

Most parameters will have a default value.

SAP HANA 2.0, SAP HANA Guides, SAP HANA Tutorials and Materials, SAP HANA Learning, SAP HANA Certifications

SAP HANA Lifecycle Management (hdblcm) – configfile 

Once the response file (template file) and password file have been prepared, we can run the hdblcm command in unattended mode (–batch or -b) specifying the action, the template file and to read the password file from STDIN.

SAP HANA 2.0, SAP HANA Guides, SAP HANA Tutorials and Materials, SAP HANA Learning, SAP HANA Certifications

SAP HANA Lifecycle Management (hdblcm) – hdblcm in batch mode

Installing SAP HANA XS Advanced Runtime…

The installer first extracts (unzip) the different components and proceeds to stop the SAP HANA system after which the runtime will be installed (Installing package…) and the system started again. This is the system downtime phase and takes about a minute.

Next, we can see that the SAP HANA XS runtime processes are started: hdbxscontroller, hdbxsexecagent, and hdbxsuaaserver.

SAP HANA 2.0, SAP HANA Guides, SAP HANA Tutorials and Materials, SAP HANA Learning, SAP HANA Certifications

Installing SAP HANA XS Advanced Runtime…

With the runtime processes started, initial content is loaded and the spaces are created.

SAP HANA 2.0, SAP HANA Guides, SAP HANA Tutorials and Materials, SAP HANA Learning, SAP HANA Certifications

Loading initial content

Next, the different services and applications are created that support the infrastructure. This phase ends with the API (URL) of XS Controler, with default HTTPS port 3<instance_number>30 (for port-based routing). This is the API endpoint to use with the XS client.

SAP HANA 2.0, SAP HANA Guides, SAP HANA Tutorials and Materials, SAP HANA Learning, SAP HANA Certifications

XS Controller API End Point

In the next phase, the XSA components (Cockpit, SAP UI5, etc.) are installed. Depending on the number of components selected, this will take some time.

The installer exits with an URL for feedback and the location of the log files, should any issue have occurred.

SAP HANA 2.0, SAP HANA Guides, SAP HANA Tutorials and Materials, SAP HANA Learning, SAP HANA Certifications

SAP HANA Database components updated

Apps!

Once the runtime is up and running and the XSA components installed, we can connect to the controller with the XS client.

In the print screen below, the XS client included with the SAP HANA XS runtime installation is used. You can also install the XS client on a Microsoft Windows, Linux, or Apple macOS computer. This topic will be discussed in a subsequent blog in this series.

To connect, you will need to provide the API_URL, which refers to the XS Controller API, together with the administration user you created during the installation in step 10 Configure XS Advanced Runtime.

SAP HANA 2.0, SAP HANA Guides, SAP HANA Tutorials and Materials, SAP HANA Learning, SAP HANA Certifications

xs login

With the ‘xs apps’ command, we can then list the apps running in space “SAP”, their status, and urls.

SAP HANA 2.0, SAP HANA Guides, SAP HANA Tutorials and Materials, SAP HANA Learning, SAP HANA Certifications

xs apps

You can use the URLs to access the different XSA applications in a browser. Below the xsa-admin application, the web interface for XS Advanced Administration.

SAP HANA 2.0, SAP HANA Guides, SAP HANA Tutorials and Materials, SAP HANA Learning, SAP HANA Certifications

SAP PI/PO & your 0 issues philosophy (yes is possible): Here just your own Analytics / BI via HANA OLAP / Lumira / Java / Excel or other technology that you decide

$
0
0
I will share a complete solution with the objective to achive the logic that will alow you to make corrective decisions for your solutions implemented or to monitor for preventive symptoms for current interfaces… After we can agree that a lot of companies suffer in their integration processes and don’t know the main reason, but this article will not cover that point here; because i just will share a “logical tool” to let you implement your own technology to monitor and decision making reports.

Understanding Michal’s proposal, we can now implement our new tool:

About Metada:
1. Getting metadata:

http://<host>:<port>/mdt/monitor/MessageOverviewQuery.xsd

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

2. Example of execution without values:

http://<host>:<port>/mdt/messageoverviewqueryservlet

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

3. Now your xsd can be uploaded in an external definition via PI Enterprise Service Repository:

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

After you understand the logic about metadata, now we can test with different tools in order to get the Runtime workbech information:

1. Excecute your own url: http://<host>:<port>/mdt/messageoverviewqueryservlet?component=af.<AF.PARAMETER><PITECHNAME>&view=SR_ENTRY_VIEW_XPI&begin=2016-12-31%2018:00:00.0&end=2017-12-31%2018:00:00.0&detailedStatus=true

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

2. Test via POSTMAN:

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

This technique is important because you will confirm 2 data information for security cookie:

http://<host>:<port>/mdt/messageoverviewqueryservlet?component=af.<AF.PARAMETER><PITECHNAME>&view=SR_ENTRY_VIEW_XPI&begin=2016-12-31%2018:00:00.0&end=2017-12-31%2018:00:00.0&detailedStatus=true

Authorization: Basic CONFIDENCIA_BASIC_SECURITY_ID

3. Now you can test it via SOAPUI:

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

After you understand how to get the metadata and how to testing, you can implement different solutions since using only java and excel, or using automatic interfaces, or technologies for analytics via hana, lumira, or another in your robust infraestructure for your decision making…

1. Implement Java Call:

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

package test;

import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;

//import org.apache.commons.codec.binary.Base64;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;

public class ConnectToUrlUsingBasicAuthentication {

public static void main(String[] args) {

try {
String webPage = "http://hostname:port/mdt/messageoverviewqueryservlet?component=af.<AF.PI.PARAMETERS>&view=SR_ENTRY_VIEW_XPI&begin=2016-12-31%2018:00:00.0&end=2017-12-31%2018:00:00.0&detailedStatus=true";
String name = "admin";
String password = "admin";

//String authString = name + ":" + password;
//System.out.println("auth string: " + authString);
//byte[] authEncBytes = Base64.encodeBase64(authString.getBytes());
//String authStringEnc = new String(authEncBytes);
//System.out.println("Base64 encoded auth string: " + authStringEnc);

URL url = new URL(webPage);
URLConnection urlConnection = url.openConnection();
urlConnection.setRequestProperty("Authorization", "Basic " + "SPACEAuthentification ID");
InputStream is = urlConnection.getInputStream();
InputStreamReader isr = new InputStreamReader(is);

int numCharsRead;
char[] charArray = new char[1024];
StringBuffer sb = new StringBuffer();
while ((numCharsRead = isr.read(charArray)) > 0) {
sb.append(charArray, 0, numCharsRead);
}
String result = sb.toString();

System.out.println("*** BEGIN ***");
System.out.println(result);
System.out.println("*** END ***");
                        
                         /*
                 * To write contents of StringBuffer to a file, use
                 * BufferedWriter class.
                 */
               
                BufferedWriter bwr = new BufferedWriter(new FileWriter(new File("C:\\Path/demo.xml")));
                //write contents of StringBuffer to a file
                bwr.write(sb.toString());
               
                //flush the stream
                bwr.flush();
               
                //close the stream
                bwr.close();
               
                System.out.println("Content of StringBuffer written to File.");
                        
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}

}

Test your java solution:

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

2. Implement PI call insted manual solution:

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

Data Source:

<?xml version="1.0" encoding="UTF-8"?>
<ns0:MessageStatisticsQueryResults xmlns:ns0="http://com.sap.aii/mdt/MessageOverviewQuery">
   <ns0:Results>
      <ns0:Code>OK</ns0:Code>
      <ns0:Details>Nice</ns0:Details>
      <ns0:Text>Test</ns0:Text>
   </ns0:Results>
   <ns0:Data>
      <ns0:ColumnNames>
         <ns0:Column>Sender Component </ns0:Column>
      </ns0:ColumnNames>
      <ns0:DataRows>
         <ns0:Row>
            <ns0:Entry>NA</ns0:Entry>
            <ns0:Entry>SENDER_COMPONENT </ns0:Entry>
            <ns0:Entry>NA</ns0:Entry>
            <ns0:Entry>RECEIVER_COMPONENT </ns0:Entry>
            <ns0:Entry>SERVICE_INTERFACE </ns0:Entry>
            <ns0:Entry>NAMESPACE </ns0:Entry>
            <ns0:Entry>A </ns0:Entry>
            <ns0:Entry>0 </ns0:Entry>
            <ns0:Entry>0 </ns0:Entry>
            <ns0:Entry>0 </ns0:Entry>
            <ns0:Entry>0 </ns0:Entry>
            <ns0:Entry>0 </ns0:Entry>
            <ns0:Entry>0 </ns0:Entry>
            <ns0:Entry>22 </ns0:Entry>
         </ns0:Row>
      </ns0:DataRows>
   </ns0:Data>
</ns0:MessageStatisticsQueryResults>

Target Metadata:    
MT_ MessageTypeElement DT_DataType null 
row Element0..unboundedfalse 
SenderPartner Element xsd:string false  

Implement transformation (with one logic proposed but you can change it):

Mapping: in simple idea is a direct mapping node and childnode(here you add UDF)
/ns1:MT_MessageType=/ns0:MessageStatisticsQueryResults
/ns1:MT_MessageType/row=/ns0:MessageStatisticsQueryResults/ns0:Data/ns0:DataRows/ns0:Row
/ns1:MT_Test/row/SenderPartner=ConcatSubnodes(/ns0:MessageStatisticsQueryResults/ns0:Data/ns0:DataRows/ns0:Row)

UDF: ConcatSubnodes

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

public String ConcatSubnodes(String srcTreeFragment, Container container) throws StreamTransformationException{
Document doc = null;
String resStr = "";
try {
 InputStream in = new ByteArrayInputStream(srcTreeFragment.getBytes("UTF-8"));;
 doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(in);
}
 catch (Exception e){
 throw new RuntimeException(e.getMessage());
}
NodeList items = doc.getDocumentElement().getChildNodes();
if(items.getLength()>0){
 for(int i=0;i<items.getLength();i++){
  if(items.item(i).getNodeType()==Node.ELEMENT_NODE)
   resStr = resStr + " | " + items.item(i).getTextContent().trim();
 }
}

return resStr;
}

Result to import to Excel (you can modify the logic):

<?xml version="1.0" encoding="UTF-8"?>
<ns1:MT_MessageType xmlns:ns1="http://example">
   <row>
      <SenderPartner> | NA | SENDER_COMPONENT | NA | RECEIVER_COMPONENT | SERVICE_INTERFACE | NAMESPACE | A | 0 | 0 | 0 | 0 | 0 | 0 | 22</SenderPartner>
   </row>
</ns1:MT_MessageType>

3. Implement Analytics in a simple way via Excel:

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

SAP S4HANA Business Partner: Same Number Range for BP and Vendor

$
0
0
Since the advent of S/4HANA we have seen a lot of changes/simplifications in the application, one of them being – Business Partner.

Today I would like to talk about a scenario where we need to maintain same number for Business Partner and Vendor.

STEP 1 : BP Role Configuration


Path: /spro / SAP Reference IMG/ Cross Application Components / SAP Business Partner / Business Partner / Basic Settings / Business Partner Roles / Define BP Roles

Step 1.1

◈ Create New Entry
◈ Enter BP roles, Title, Description,
◈ BP Role Category – Either standard or ZCategory (only to define acceptable catg – People, Organization or Group)
◈ Interface Control – Select among standard BP Role Category to view respective screen of Company Code , Purchasing Org
◈ Position – Define (1,2 etc) to select position of BP Role in the drop down list.
SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

Step 1.2

Create New Entry – Enter BP Role Categories to define acceptable catg – People, Organization or Group

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

Step 1.3

Enter Allowed Business Transaction for the BP Role (ZBCON2)
BPUS : Business Partner Usage
CHAN : Change (Business Partner)

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

STEP 2 : BP Role Grouping configuration


Path: /spro / SAP Reference IMG/ Cross Application Components / SAP Business Partner / Business Partner / Basic Settings / Business Partner Roles / Define BP Role Groupings

Step 2.1  BP Role Groupings

Create New Entry
Enter BP roles, Title, Description

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

Step 2.2 Define Internal Number Range for BP (Auto Generated)

Path: /spro / SAP Reference IMG/ Cross Application Components / SAP Business Partner / Business Partner / Basic Settings / Number Ranges and Groupings/ Define Number Ranges

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

STEP 3 : Number Range configuration for Business Partner


Path:  /spro / SAP Reference IMG/ Cross Application Components / SAP Business Partner / Business Partner / Basic Settings / Number Ranges and Groupings/ Define Groupings and Assign Number Ranges

Define Number Range and Groupings

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

STEP 4 : Vendor Account Group configuration 


Path: /spro / SAP Reference IMG/ Financial Accounting (New) / Accounts Receivables and Payable/ Vendor Accounts/ Master Data / Preparations for Creating Vendor Master Data

Step 4.1 Define Account Groups with Screen Layout (Vendors)

Copy KRED and create new Vendor Account Group and Create ZBC

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

Here we can change the field settings for General , Company Code and Purchase Organization

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

Step 4.2 Create Number Ranges for Vendor Accounts

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

If we want the BP number and Vendor Number to be same, then we should maintain same Number Range here also for Z3

Also we have to select EXT, Since the BP numbers will act as Ext number range for Vendor Number range.

Step 4.3 Assign Number Ranges to Vendor Account Groups

We need to update this as it picks up Number Range of copied Group KRED.

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

STEP 5: BP and Vendor Link Configuration


Path: /spro / SAP Reference IMG/ Cross Application Components/ Master Data Synchronization/ Customer-Vendor Integration/ Business Partner Settings/ Settings for Vendor Integration

Step 5.1 Set BP Role Category for Direction BP to Vendor

Create New Entry and enter BP Role Category

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

Step 5.2: Assign BP Grouping Number Range to Vendor Number Range. Check Same Nos.

Path: /spro / SAP Reference IMG/ Cross Application Components/ Master Data Synchronization/ Customer-Vendor Integration/ Business Partner Settings/ Settings for Vendor Integration/ Field Assignment for Vendor Integration/ Assign Keys

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

Successful creation of BP, ZBC2 Role as Vendor and they have same Number Range.

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

SAP HANA Express Edition on AWS for XSA development space issues

$
0
0
I launched the SAP HANA, Express Edition on AWS through CAL.

Once it ran, I ran across many issues.

A few things to help out so that I could get start developing:

◈ started nodejstools explicitly.
◈ create a space and explicitly redeployed the builder using the di-space-enablement tool

I was encountering a lot of strange issues and then found out the they could be happening due to disk space issues.  The biggest issue I had was the the logical volume /dev/mapper/vga-sysfiles was getting filled up.  I started deleting log files and any files that were not necessary.  But this did not help.

I was having the issue of /dev/mapper/vga-sysfiles getting filled up to 100%.  I cleared the log files, and would start the system at 95% as shown here – but that would fill up to 100% relatively quickly.
sid-hxe:~ # df
Filesystem                 1K-blocks     Used Available Use% Mounted on
/dev/hda1                   10189112  3035020   6613472  32% /
devtmpfs                    15721704        8  15721696   1% /dev
tmpfs                       40897116        0  40897116   0% /dev/shm
tmpfs                       15730604     9900  15720704   1% /run
tmpfs                       15730604        0  15730604   0% /sys/fs/cgroup
/dev/mapper/vgcal-sysfiles  42985920 40757896   2228024  95% /hana/shared/HXE
/dev/mapper/vgcal-dbdata    60819392  8848024  51971368  15% /hana/data/HXE
/dev/mapper/vgcal-dblog     33553344  2002172  31551172   6% /hana/log/HXE

So here are the steps.

Through the AWS EC2 console, click on Volumes under the ELASTIC BLOCK STORE option on the left sidebar window and then click on Create Volume:

SAP HANA Express Edition, SAP HANA AWS, SAP HANA XSA, SAP HANA Tutorials and Materials, SAP HANA Guides

I chose a 50 GB Magnetic volume type:

SAP HANA Express Edition, SAP HANA AWS, SAP HANA XSA, SAP HANA Tutorials and Materials, SAP HANA Guides

The volume is created.  Note the Volume ID.

SAP HANA Express Edition, SAP HANA AWS, SAP HANA XSA, SAP HANA Tutorials and Materials, SAP HANA Guides

Now attach this Volume to the instance (SAP HANA Express in my case)

SAP HANA Express Edition, SAP HANA AWS, SAP HANA XSA, SAP HANA Tutorials and Materials, SAP HANA Guides

SAP HANA Express Edition, SAP HANA AWS, SAP HANA XSA, SAP HANA Tutorials and Materials, SAP HANA Guides

Log into the SAP HANA system.

Extend the volume group vgcal (in my case) to include this new volume.  If you need the volume group, run vgdisplay and get the VG name

sid-hxe:~ # vgextend vgcal /dev/xvdt
  Physical volume "/dev/xvdt" successfully created
  Volume group "vgcal" successfully extended

Here is the file system:

SAP HANA Express Edition, SAP HANA AWS, SAP HANA XSA, SAP HANA Tutorials and Materials, SAP HANA Guides

Once the volume is attached, we need to extend the logical volume /dev/vgcal/sysfiles to use this volume – note the change from 41 GB to 91 GB:

sid-hxe:~ # lvextend -i 1 -r /dev/vgcal/sysfiles /dev/xvdt
  Size of logical volume vgcal/sysfiles changed from 41.02 GiB (10500 extents) to 91.01 GiB (23299 extents).
  Logical volume sysfiles successfully resized
meta-data=/dev/mapper/vgcal-sysfiles isize=256    agcount=16, agsize=671984 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=0        finobt=0
data   =                       bsize=4096   blocks=10751744, imaxpct=25
         =                       sunit=16     swidth=192 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=0
log      = internal               bsize=4096   blocks=5264, version=2
         =                       sectsz=512   sunit=16 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
data blocks changed from 10751744 to 23858176

So the additional 50 GB is available now for /dev/mapper/vgcal-sysfiles

sid-hxe:~ # df -h
Filesystem                  Size  Used Avail Use% Mounted on
/dev/hda1                   9.8G  6.5G  2.8G  70% /
devtmpfs                     15G  8.0K   15G   1% /dev
tmpfs                        40G     0   40G   0% /dev/shm
tmpfs                        16G   18M   15G   1% /run
tmpfs                        16G     0   16G   0% /sys/fs/cgroup
/dev/mapper/vgcal-sysfiles   91G   41G   51G  45% /hana/shared/HXE
/dev/mapper/vgcal-dbdata     59G  8.5G   50G  15% /hana/data/HXE
/dev/mapper/vgcal-dblog      32G  2.0G   31G   6% /hana/log/HXE


sid-hxe:~ # lvdisplay
  --- Logical volume ---
  LV Path                /dev/vgcal/dbdata
  LV Name                dbdata
  VG Name                vgcal
  LV UUID                trUgvA-oNiA-QHUM-HYMY-2URJ-bp4z-5YKYOQ
  LV Write Access        read/write
  LV Creation host, time ip-10-0-22-11, 2017-09-01 11:26:20 +0000
  LV Status              available
  # open                 1
  LV Size                58.03 GiB
  Current LE             14856
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     3072
  Block device           254:0
   
  --- Logical volume ---
  LV Path                /dev/vgcal/dblog
  LV Name                dblog
  VG Name                vgcal
  LV UUID                7TzNYT-bRRX-wbpA-L5xx-xAEO-RO5R-GpB2aN
  LV Write Access        read/write
  LV Creation host, time ip-10-0-22-11, 2017-09-01 11:26:26 +0000
  LV Status              available
  # open                 1
  LV Size                32.02 GiB
  Current LE             8196
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     3072
  Block device           254:1
   
  --- Logical volume ---
  LV Path                /dev/vgcal/sysfiles
  LV Name                sysfiles
  VG Name                vgcal
  LV UUID                zCjmzn-yjgf-VENQ-HCW1-Af5J-TPAx-fOkEm0
  LV Write Access        read/write
  LV Creation host, time ip-10-0-22-11, 2017-09-01 11:26:27 +0000
  LV Status              available
  # open                 1
  LV Size                91.01 GiB
  Current LE             23299
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     3072
  Block device           254:2

After I did this, the system was behaving much better and I could work on the XSA development.  More BLOGs to follow on the SAP HANA XSA development.

Establishing the Live HANA on-premise Connection from SAP Analytics Cloud using CORS

$
0
0
The HANA CORS (Cross Origin Resource Sharing) configuration is straight forward but as the old saying goes, a picture paints a thousand words.  Such a shame that the SAP documentation policy is does not allow screenshots.  I have therefore tried to capture the configuration steps here.

SAP Analytics Cloud Version 2018.1.0
SAP HANA Version 1.00.111 (SPS 11).

This new CORS setup is really as simple as 1, 2, 3.

1. Configure HANA HTTPS (SSL)
2. INA (Information Access)
3. CORS Configuration


1. Configure HANA HTTPS (SSL)


The Configuration of the SSL certificate is within the Web Dispatcher at

http://<WebServerHost>:80<SAPHANAinstance>/sap/hana/xs/wdisp/admin/

For me that is http://ivml2152.wdf.sap.corp:8024/sap/hana/xs/wdisp/admin/public/default.html

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning
Once completed you must be able to access XS classic via HTTPS, without any security pop-ups or certificate errors. Usually this is port 4300, if your SAP HANA instance number is 00, but 24 in my case, therefore port 4324.

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

2. Information Access (INA)


Verify INA is installed and you have rights to access this service.

https://<hana-hostname>:43<SAPHANAinstance>/sap/bc/ina/service/v2/GetServerInfo

For me that is https://ivml2152.wdf.sap.corp:4324/sap/bc/ina/service/v2/GetServerInfo

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

The response from INA is in JSON, using a JSON browser extension makes the response more readable.  If INA is not working for you should check the INA package is installed and your user has access to this package via the sap.bc.ina.service.v2.userRole::INA_USER role.

3. CORS Configuration


Login to your XS (classic) admin site, the URL would be something like

https://<hana-hostname>:43<SAPHANAinstance>/sap/hana/xs/admin/#/package/sap.bc.ina.service.v2

For me that becomes https://ivml2152.wdf.sap.corp:4324/sap/hana/xs/admin/#/package/sap.bc.ina.service.v2

Verify that Basic Authentication is allowed as below

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning
Configure CORS, with the Allowed Origins, Allowed Headers and Exposed Headers as specified below.

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

# Allowed Headers
accept authorization content-type x-csrf-token x-request-with x-sap-cid

# Exposed Headers
x-csrf-token

SAP Analytics Cloud


With the CORS configuration now completed we can establish the Live Direct HANA connection within SAP Analytics Cloud.

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

SAP HANA 2.0 editions (2018) – by the SAP HANA Academy

$
0
0

Introduction


The Feature Scope Description for SAP HANA has been updated for 2018. In this blog, you will find a brief overview of the feature sets with references to SAP HANA Academy tutorial videos and playlists.

Editions


SAP HANA is available in three editions:

◈ Standard
◈ Enterprise
◈ Express


SAP HANA Features


SAP HANA platform

Standard Edition


The SAP HANA standard edition comprises the core database, integration and application services, series data, plus a number of components that require additional installation:

◈ Dynamic Tiering (PLM)
◈ SAP HANA Accelerator for SAP ASE (PLM)
◈ SAP Enterprise Architecture Designer, edition for SAP HANA (ALM)
◈ Operational Process Intelligence (ALM)
◈ HANA Rules Framework (ALM)
◈ Data Warehousing Foundation (ALM)

PLM = Platform Lifecycle Management (hdblcm)
ALM = Application Lifecycle Management (“powered by HANA”)

There are no playlists on the SAP HANA Academy that specifically cover the core SAP HANA  services but you will find most of them addressed in our library.

Dynamic Tiering


SAP HANA dynamic tiering is a native big data solution for SAP HANA that adds smart, disk-based extended storage to your SAP HANA database with its own database, integration and application services feature sets.


Under the hood: SAP HANA dynamic tiering

For the SAP HANA Academy video tutorial playlists, see



SAP HANA Academy video tutorial – SAP HANA Dynamic Tiering 2.0

SAP HANA Accelerator for SAP ASE


The accelerator for SAP Adaptive Server Enterprise (ASE) adds analytics acceleration to the SAP ASE database engine leveraging SAP HANA.


SAP HANA Accelerator for SAP ASE Architecture

SAP Enterprise Architecture Designer, edition for SAP HANA


SAP Enterprise Architecture Designer, edition for SAP HANA allows you to capture, analyze, and present your organization’s landscapes, strategies, requirements, processes, data, and other artifacts in a shared environment.


SAP EAD – Workspace


SAP HANA Academy video tutorial – SAP Enterprise Architect Designer

Series


Series data is data collected at a measurable interval, such as time. You can use series data SQL statements to detect and forecast trends in a series.

CREATE COLUMN TABLE "InterpolationTable"
    (ts_id VARCHAR(20), date DAYDATE, val DOUBLE)
    SERIES(SERIES KEY(ts_id) PERIOD FOR SERIES(date)
        EQUIDISTANT INCREMENT BY INTERVAL 1 DAY MISSING ELEMENTS ALLOWED);

SELECT CUBIC_SPLINE_APPROX(val, 'SPLINE_TYPE_NOT_A_KNOT')
    OVER(SERIES TABLE "InterpolationTable") FROM "InterpolationTable";

For the SAP HANA Academy video tutorial playlists, see


Operational Process Intelligence (incl HRF)


Includes SAP Operational Process Intelligence powered by SAP HANA and SAP HANA rules framework.


SAP Operational Process Intelligence – Business Scenario

For the SAP HANA Academy video tutorial playlists, see


Data Warehousing Foundation


SAP HANA data warehousing foundation supports data management and distribution across complex SAP HANA landscapes.


For the SAP HANA Academy video tutorial playlists, see



SAP HANA Academy video tutorial playlist – SAP HANA Data Warehousing Foundation

Enterprise Edition


The SAP HANA enterprise edition comprises all of the above, adding:

◈ Spatial and Graph
◈ Data Privacy
◈ Search, Text Analysis, and Text Mining

plus a number of components that require additional installation:

◈ Predictive Analysis Library and R (PLM)
◈ SAP HANA Streaming Analytics (PLM)
◈ Enterprise Information Management
    ◈ Smart Data Integration
    ◈ Smart Data Quality
◈ SAP HANA Replication
    ◈ SAP Landscape Transformation Replication Server,
    ◈ SAP Replication Server

Spatial and Graph


With SAP HANA Spatial, you can process, store and retrieve geospatial data. With SAP HANA Graph, you can process and visualize graphs, and execute built-in algorithms.


SAP HANA Graph Viewer


SAP HANA Spatial Map Client

For the SAP HANA Academy video tutorial playlists, see


For the documentation, see

<a href="https://help.sap.com/viewer/cbbbfc20871e4559abfd45a78ad58c02/latest/en-US/"
<a href="https://help.sap.com/viewer/f381aa9c4b99457fb3c6b53a2fd29c02/latest/en-US/"


SAP HANA Academy video tutorial – Graph: Getting Started 

Data Privacy


Data privacy provides additional protection for sensitive and confidential data.

Search, Text Analysis, and Text Mining


A feature set to search inside the database, gain insights from text analysis and conduct text mining. Previously, search, text analysis, and text mining were collectively referred to as SAP HANA advanced data processing (ADP).


For the SAP HANA Academy video tutorial playlists, see



SAP HANA Academy video tutorial playlist – SAP HANA Search, Text Analysis, and Text Mining playlist

Predictive Analysis Library and R


As part of the application function library software development kit for SAP HANA, SAP HANA predictive analysis library (PAL) offers functions to perform classic and universal predictive analysis algorithms for a number of different data mining categories. Integration of the SAP HANA database with R allows you to use the R environment for specific statistical functions.

For the SAP HANA Academy video tutorial playlists, see



SAP HANA Academy video tutorial – Getting Started with PAL


SAP HANA Academy video tutorial – Getting Started with R Integration



SAP HANA Academy video tutorial playlist – Predictive Analysis Library

SAP HANA Streaming Analytics


SAP HANA streaming analytics (also known as SAP HANA smart data streaming) applies complex processing logic to identify patterns, calculate aggregates, detect problems, and generate alerts by combining real-time streams of data with the appropriate historic and reference data using an in-memory stream processing engine. Integrated machine learning capabilities provide SAP HANA streaming analytics with the ability to generate and use predictions in real time.


Under the hood: SAP HANA streaming analytics

For the SAP HANA Academy video tutorial playlists, see



SAP HANA Academy video tutorial playlist – SAP HANA Streaming Analytics

Enterprise Information Management


Bundles SAP HANA Smart Data Integration (Integration Services and Enterprise Semantic Services) and SAP HANA Smart Data Quality.

For the SAP HANA Academy video tutorial playlists, see



SAP HANA Academy video tutorial playlist – SAP HANA Smart Data Integration and Smart Data Quality

SAP HANA Replication


SAP HANA replication provides technologies for replicating data from any supported source system to the SAP HANA database: trigger-based data replication using SAP Landscape Transformation Replication Server, log-based replication using SAP Replication Server.

SAP HANA Active/Active Read Enabled System Replication


The active/active read-enabled feature enhances the existing high availability and disaster recovery capabilities of SAP HANA system replication and enables you to use the secondary systems of SAP HANA system replication actively for read-intense workloads.


SAP HANA cockpit – System Replication

For the SAP HANA Academy video tutorial playlists, see



SAP HANA Academy video tutorial – SAP HANA System Replication Active/active read-enabled 

Express Edition


SAP HANA, express edition has its own Feature Scope Description document. Most of the standard services are included but obviously not the functionality that would make little sense for a developer edition, like distributed systems (32 GB memory restriction) and dynamic tiering (separate installation on an additional host).

For the video tutorial playlist, see



SAP HANA Academy video tutorial playlist – SAP HANA Express

Migration Cockpit Migration Object Modeler S/4HANA Basics

$
0
0

Introduction:


It is a part of the Migration cockpit which integrates Custom objects or  standard objects not provided in the S/4 Hana Migration Cockpit template.

NOTE: Its available only on On-Premise systems

Transaction for MOM : LTMOM (SAP_CA_DMC_MC_DEVELOPER role should be assigned to user to access it

SAP HANA Tutorials and Materials, SAP HANA Guides, SAP HANA Learning, SAP HANA S/4HANA

Source Structures :

The structures are shown in a hierarchy way  which are visible in different tabs shown in the excel template in Migration cockpit.

SAP HANA Tutorials and Materials, SAP HANA Guides, SAP HANA Learning, SAP HANA S/4HANA

You also have the possibility to make the field ( required ,visible or non-Visible ) in the excel template Right click on the structure->Display view will open the below view

SAP HANA Tutorials and Materials, SAP HANA Guides, SAP HANA Learning, SAP HANA S/4HANA

Target Structures:

Target Structures are the strucutres to which the sources structures are mapped .They can be single or multiple fields or tables.

There is a Function Module on the top of the structure which is used transfer data from source structure to relevant target structure to S/4 System.

SAP HANA Tutorials and Materials, SAP HANA Guides, SAP HANA Learning, SAP HANA S/4HANA

Structure Mapping : : ‘>>’ this symbols represents that the Target structure is mapped with the source structure.You can also Drag and Drop for the structure mapping in the edit mode.

SAP HANA Tutorials and Materials, SAP HANA Guides, SAP HANA Learning, SAP HANA S/4HANA

Field Mapping: This section display all the fields which are mapped and also not mapped

Mapped target fields are displayed with green icon and the others with red.

You can also drag and drop the fields then MOVE statement will appear showing that the field is mapped.

SAP HANA Tutorials and Materials, SAP HANA Guides, SAP HANA Learning, SAP HANA S/4HANA

You can also create own

Rules:

There are some rules similar to the enhancements where you can change the values of fields or add custom code .

Field Based rules: These are used to change the target  field values during the migration.(Exmaples like internal and external numbering of customers  )

SAP HANA Tutorials and Materials, SAP HANA Guides, SAP HANA Learning, SAP HANA S/4HANA

Event Based: Custom coding can be inserted at some predefined points of predefined events(Like strart of loop or start of record ) .You have an option to write the below three in the drop down of the variant type.(You can also

Free Code

Fixed value

Translation Object

SAP HANA Tutorials and Materials, SAP HANA Guides, SAP HANA Learning, SAP HANA S/4HANA

SAP HANA Tutorials and Materials, SAP HANA Guides, SAP HANA Learning, SAP HANA S/4HANA

Internal Rules: These are re-usable code modules which can shared across the other rules.This is triggered either with the field-based or event based rules

Translation Objects: This is used for the translation like Country keys, Language keys .

NOTE: Can be enabled only by the field-based or internal rules.

Publish Analytical View in Webi in simple steps

$
0
0
This document explains step by step to publish Hana views directly into Webi Rich Client in a simple steps.

Since, We are using BOBJ 4.2, we don’t have to create Universes for deploying our Views & We can directly deploy our HANA views in WEBI

This document will also give basic understanding of the basic development/creation of webi reporting after publishing the Analytical view in Webi

This has been created for our internal training team and to help others as well for publishing the Analytical View of HANA in simple steps for Webi.

In this scenario, we are considering ONLINE_SALES Analytical View will get published in Webi thru simple steps

We are going to see how to publish AN View in Webi in simple steps

Step 1: Please open Web Rich client

SAP HANA Certifications, SAP HANA Tutorial and Materials, SAP HANA Guides, SAP HANA Learning

Step 2: since we can directly publish in Analytical & Calculation views in BOBJ4.2, we need to select our appropriate views from HANA

Please click More Button from SAP HANA (data source) from the above snapshot.

It will ask credentials after clicking ‘More’ Button

SAP HANA Certifications, SAP HANA Tutorial and Materials, SAP HANA Guides, SAP HANA Learning

Step 3: After logging in, just scroll & select HANA Connection and expand , find your appropriate Package to find your corresponding Analytical View

SAP HANA Certifications, SAP HANA Tutorial and Materials, SAP HANA Guides, SAP HANA Learning

Step 4: Since mine is SaiBalki, After clicking SaiBalki that will show all the Analytical Views under that package & I’ve selected AN_ONLINE_SALES and click OK.

SAP HANA Certifications, SAP HANA Tutorial and Materials, SAP HANA Guides, SAP HANA Learning

Step 5: After clicking OK by selecting the AN View, it will take you to the Query Panel in Webi Rich Client.

Select the fields which you wanted to bring for the reporting & click Run Query.

SAP HANA Certifications, SAP HANA Tutorial and Materials, SAP HANA Guides, SAP HANA Learning

Step 6: Reporting has been published successfully & Save it.

SAP HANA Certifications, SAP HANA Tutorial and Materials, SAP HANA Guides, SAP HANA Learning

We have published/created reporting in Webi in Six Steps using an Analytical View.

sqlpad meets SAP HANA

$
0
0
Having already contacted the author of the project, Rick, he was open to the idea of a contribution so a fork in Github later and a few alternations to the codebase and I was ready to proceed. The internal process was pretty quick, took me just a couple of days while a simple form was processed (time zones delay everything!).

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Learning, SAP HANA SQL
SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Learning, SAP HANA SQL

All checks were green! Now to wait for the pull request to be merged and see how things go! I’ve always found it amazing how a small amount code changes can make to the overall functionality of a program.

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Learning, SAP HANA SQL

8 files, a few lines and a whole new database is supported!

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Learning, SAP HANA SQL

The coolest part of course is watching your request get merged!

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Learning, SAP HANA SQL

To top it off I just got an email this morning where Rick let me know that he has deployed the latest version to “npm” so you can now officially get your hands on it and connect it to your SAP HANA systems!

Looks like I may need to submit a change or two to the docs for the program in general but functionality wise we are set to go so far! So I wanted to share 3 ways you can get your hands on the program.

◈ Direct install
◈ Vagrant
◈ Docker

The direct install, well all of them are pretty straight forward. For this one you will need to have Node JS installed (version 6.0.0 is what I have done all my testing and usage with).

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Learning, SAP HANA SQL

At your command prompt/terminal you can execute “npm install sqlpad -g”

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Learning, SAP HANA SQL

To run it just type “sqlpad”, granted you will probably want to add parameters, etc

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Learning, SAP HANA SQL

The second option I played with is Vagrant, which I mentioned in my previous post about my system issues. My Vagrant file looks like:

# -*- mode: ruby -*-
# vi: set ft=ruby :
$rootScript = <<SCRIPT
sudo locale-gen "en_US.UTF-8"
sudo dpkg-reconfigure locales
sudo apt-get install -y git-core curl
SCRIPT

$userScript = <<SCRIPT
  cd /home/vagrant
  mkdir /home/vagrant/sqlpaddb

  # Installing nvm
  wget -qO- https://raw.github.com/creationix/nvm/master/install.sh | sh

  # This enables NVM without a logout/login
  export NVM_DIR="/home/vagrant/.nvm"
  [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"  # This loads nvm

  echo "Installing: "
  echo "Application:  node.js"
  nvm install stable &> /dev/null
  nvm install 6.0.0
  nvm alias default 6.0.0
  npm install -g npm

  # Install sqlpad
  npm install sqlpad -g
  
  sqlpad --dir /home/vagrant/sqlpaddb/ --port 3000 &> start.log & echo "SQL Pad started"
  #/home/vagrant/.nvm/versions/node/v6.0.0/bin/sqlpad --dir /home/vagrant/sqlpaddb/ --port 3000 &> start.log
  #/usr/sbin/node /home/vagrant/.nvm/versions/node/v6.0.0/lib/node_modules/sqlpad/server.js --dir /home/vagrant/sqlpaddb/ --port 3000 &> start.log
SCRIPT

ENV["LC_ALL"] = "en_US.UTF-8"
Vagrant.configure("2") do |config|
  config.vm.box = "ubuntu/xenial64"
  config.vm.provision "shell", inline: $rootScript
  config.vm.provision "shell", inline: $userScript, privileged: false
  config.vm.network "forwarded_port", guest: 3000, host: 3000, host_ip: "127.0.0.1"
  config.vm.network "forwarded_port", guest: 3010, host: 3010, host_ip: "127.0.0.1"
  config.vm.provider "virtualbox" do |vb|
    # Customize the amount of memory on the VM:
    vb.memory = "2048"
  end
end

This puts everything self contained into a VM.

The final option which i lean towards the most is my Docker config. Which puts my configuration for the program locally (I make sure it’s in a sync’d folder).

My “docker-compose.yml” file looks like:

version: '3'

services:
  app:
    build:
      context: .
    volumes:
      - db-data:/opt/data
    ports:
      - "3000:3000"
volumes:
  db-data:

My “DockerFile” looks like:

FROM node:6.0.0
RUN apt-get update
RUN apt-get install -y less
RUN npm install
RUN npm install sqlpad -g  

RUN mkdir -p /opt/data/
COPY ./db /opt/data/

EXPOSE 3000
CMD ["sh", "-c", "/usr/local/bin/sqlpad --dir /opt/data --port 3000"]

Regardless of which of these methods or another method once it’s up an running here you go. Once you have either signed in or signed up you can add your connection.

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Learning, SAP HANA SQL

Now I added the IP of my SAP HANA express system to my hosts file so I could just put the hostname.

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Learning, SAP HANA SQL

Now by leaving the “schema” blank I’m not tying the connection to anything specific, I can also give a specific “schema” as well.

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Learning, SAP HANA SQL

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Learning, SAP HANA SQL

Once I have my system connection I can start running queries.

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Learning, SAP HANA SQL

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Learning, SAP HANA SQL

To quickly test things I decided to check very quickly how my system was running.

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Learning, SAP HANA SQL

Saving the queries make life easy because I can re run favorite queries anytime.

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Learning, SAP HANA SQL

The data visualization is awesome, just not with this particular query.

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Learning, SAP HANA SQL

Lightweight, easy to use and extensible – what more can you want from a tool? Now granted I’m sure many people are scratching their heads and saying “but but but” and yes SAP has their own tools, however if you are going after the “Server Only” version of SAP HANA express edition those tool choices are limited and limitations are not something I am a fan of so I decided to add another option to the mix.

Execute SQL Statement in HANA Studio using Literals or Bind variables

$
0
0
There are two variants of SQL statement execution defined in SAP note 2000002 – FAQ: SAP HANA SQL Optimization. The difference is how the where condition is specified in SQL Statement.

Sometimes I prefer to call “Literals” as “Hard code”.

SAP HANA Studio, SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

And for Bind variables, it means the where condition is unknown in compile time, but bound to a variable filled by application logic in the runtime. A typical example:
SAP HANA Studio, SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

A caution in SAP note:
It can make a significant difference in terms of execution plan, performance and resource consumption if a SQL statement is executed with explicit literals or with bind variables. Therefore it is recommended that you analyze an expensive SQL statement that uses bind variables in the same way, i.e. also with bind variables.

See a real case to understand it.
I wrote the following report to search all Service Orders whose header “description” field contains specified key word.

REPORT zorder_query.
PARAMETERS: descr  TYPE crmd_orderadm_h-description OBLIGATORY DEFAULT 'Jerry',
            conta  TYPE char1 AS CHECKBOX DEFAULT abap_false,
            ttype  Type crmd_orderadm_h-process_type DEFAULT 'SRVO',
            ctype  type char1 AS CHECKBOX DEFAULT abap_false.

DATA: lt_selection_parameter TYPE genilt_selection_parameter_tab,
      ls_query_parameters    TYPE genilt_query_parameters,
      ls_selection_parameter TYPE genilt_selection_parameter.
DATA(lo_core) = cl_crm_bol_core=>get_instance( ).
lo_core->load_component_set( 'ONEORDER' ).

IF conta = abap_true.
  ls_selection_parameter = VALUE #( attr_name = 'DESCRIPTION' sign = 'I' option = 'CP'
 low = |*{ descr }*| ).
ELSE.
  ls_selection_parameter = VALUE #( attr_name = 'DESCRIPTION' sign = 'I' option = 'EQ'
 low = descr ).
ENDIF.

APPEND ls_selection_parameter TO lt_selection_parameter.

IF ctype = abap_true.
   ls_selection_parameter = VALUE #( attr_name = 'PROCESS_TYPE' sign = 'I' option = 'EQ' low = ttype ).
   APPEND ls_selection_parameter TO lt_selection_parameter.
ENDIF.
ls_query_parameters-max_hits = 100.
cl_crm_order_timer_home=>start( ).
TRY.
    DATA(lo_collection) = lo_core->dquery(
        iv_query_name               = 'BTQSrvOrd'
        it_selection_parameters            = lt_selection_parameter
        is_query_parameters                = ls_query_parameters ).
  CATCH cx_root INTO DATA(cx_root).
    WRITE:/ cx_root->get_text( ).
    RETURN.
ENDTRY.
cl_crm_order_timer_home=>stop( 'Search by Description' ).
WRITE:/ |Number of Service Orders found: { lo_collection->size( ) }| COLOR COL_NEGATIVE.

This report uses CRM BOL API to delegate the query to database layer, which finally executes the following SQL statement.

SAP HANA Studio, SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

This execution belongs to “Bind variables” variant.
As a result, if we would like to paste the SQL statement from ABAP to HANA Studio, we should ensure we have pasted the “correct style” of SQL statement.

Wrong approach


Find statement from Edit->Display Execution Plan->For Recorded Statement:

SAP HANA Studio, SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

If you simply paste the following SQL statement into HANA Studio and execute it there, you actually failed to 100% simulate the ABAP SQL statement’s execution detail in HANA Studio.
The reason is: the SQL statement in ABAP has “Bind variables” variant, and the statement you paste below has “Literals” variant instead: pay attention to the area highlighted in blue below.

SAP HANA Studio, SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

Correct approach


You can use this menu instead to get the appropriate SQL statement to be pasted:

SAP HANA Studio, SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

Check the where condition which now has “Bind variables” variant. The variables here have been marked using “?” as placeholder.

SAP HANA Studio, SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

Execute it in HANA Studio and there is a new tab “Prepared SQL” displayed. You should fill the actual value for each variable now. Choose “Add Parameter Values” from context menu:

SAP HANA Studio, SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

and paste the following string into input field in popup dialog:
504,BUS2000116,BUS2000116,BUS2000140,BUS2000105,BUS2000137,BUS2000131,BUS2000146,BUS2000159,BUS2000153,BUS2000199,,Y,,%2017-12-21%,SRVO,100

SAP HANA Studio, SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

Now each parameter has been automatically filled with corresponding value:

SAP HANA Studio, SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

Execute SQL statement in HANA Studio. In this way, it has the same performance result as executed in SAPGUI.
SAP HANA Studio, SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Guides, SAP HANA Learning

HANA 2.0 SP1 on SUSE 12 SP02

$
0
0
This time I will show you how to install SAP HANA 2.0 SP01 with latest patch on SUSE 12 SP02. I am not using Redhat because they refused to give me a trial with SAP repositories, so SUSE for the win.

Required SAP Notes

1984787 – SUSE LINUX Enterprise Server 12: Installation notes

2205917 – SAP HANA DB: Recommended OS settings for SLES 12 / SLES for SAP Applications 12

2404375 – SAP HANA Platform 2.0 SPS 01 Release Note

2456795 – SAP HANA 2.0 SPS 01 Database Revision 011

2235581 – SAP HANA: Supported Operating Systems
SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

Register your system first. Assign a hostname, static IP address and then continue.

Setup your disk layout according to your landscape. Considering this is only a test system I am giving 100 GB to operating system, 25 GB to SWAP and rest to HANA.

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

Change Software settings

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

Disable Firewall and continue

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

Check disks

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

Check release

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

Install Vmware Tools

Mount Vmware Tools and copy compressed file into /tmp

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

Update system (if anything is available for your subscription)

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

Copy installation files into /hana/install

-Reminder. Do not use installation packages from SAP Marketplace. Use packages from Support Package instead.

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

Adjust SUSE Linux to HANA

SLES 12 SP2 requirements (applies currently to Intel-based systems only)

glibc-2.22-51.6 or newer

systemd-228-142.1 or newer

Copy “/usr/lib/tuned/sap-hana/tuned.conf” to “/etc/tuned/sap-hana/tuned.conf” and change/add “force_latency” to the following:

force_latency=70

Manually create the file “/etc/systemd/logind.conf.d/sap.conf” with the following content:

[Login]

UserTasksMax=infinity

To enable these changes, a system reboot is required.

From SUSE RL

The version of systemd shipped in SLES 12 SP2 uses the PIDs cgroup controller. This provides some per-service fork() bomb protection, leading to a safer system.

However, under certain circumstances you may notice regressions. The limits have already been raised above the upstream default values to avoid this but the risk remains.

If you notice regressions, you can change a number of TasksMax settings.

To control the default TasksMax= setting for services and scopes running on the system, use the system.conf settingDefaultTasksMax=. This setting defaults to 512, which means services that are not explicitly configured otherwise will only be able to create 512 processes or threads at maximum.

For thread- or process-heavy services, you may need to set a higher TasksMax value. In such cases, set TasksMax directly in the specific unit files. Either choose a numeric value or even infinity.

Similarly, you can limit the total number of processes or tasks each user can own concurrently. To do so, use the logind.confsetting UserTasksMax (the default is 12288).

nspawn containers now also have a TasksMax value set, with a default of 16384.

From <https://www.suse.com/releasenotes/x86_64/SUSE-SLES/12-SP2/>

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

Also you can edit logind.conf

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

UUIDD Check

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

tuned HANA

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

Turn off auto NUMA balancing

SAP HANA is a NUMA (non-uniform memory access) aware database. Thus it does not rely on the Linux kernel’s features to optimize NUMA usage automatically. Depending on the workload, it can be beneficial to turn off automatical NUMA balancing (autoNUMA). In order to permanently switch off autoNUMA either

Call saptune with the parameter “HANA” (starting with SLES 12 for SAP Applications SP2)

# saptune solution apply HANA

Edit /etc/default/grub

search for the line starting with “GRUB_CMDLINE_LINUX_DEFAULT” and append to this line

numa_balancing=disable

Save your changes and run

# grub2-mkconfig -o /boot/grub2/grub.cfg

After a reboot, autoNUMA will be disabled.

Use YaST2 bootloader, execute

# yast bootloader

Choose “Kernel Parameters” tab (ALT-k) and edit the “Optional Commandline Parameters” section by appending

numa_balancing=disable

To enable this change, a system reboot is required. In a scale-out environment, those changes have to be done on every server of the landscape. In case you already have a running HANA instance, rebooting the server should only be done when a standby server is configured. Do not reboot all servers at once. For single node instances a downtime has to be considered.

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

Disable transparent hugepages

With SLES 12, the usage of transparent hugepages (THP) is generally activated for the Linux kernel. The THP allows the handling of multiple pages as hugepages to reduce the translation lookaside buffer (TLB) footprint, in situations where it might be useful. Due to the special manner of HANA’s memory management, the usage of THP may lead to hanging situations and degradations.

To check the current configuration run the following command:

# cat /sys/kernel/mm/transparent_hugepage/enabled

Its output should read:

always madvise [never]

If this is not the case you can disable the THP usage at runtime by issuing the following:

# echo never > /sys/kernel/mm/transparent_hugepage/enabled

There is no need to shut down the database to apply this configuration. This setting is then valid until the next system start. To persist the disabling of THP usage you have the following options:

Call saptune with the parameter “HANA” (starting with SLES 12 for SAP Applications SP2)

# saptune solution apply HANA

Edit /etc/default/grub

search for the line starting with “GRUB_CMDLINE_LINUX_DEFAULT” and append to this line

transparent_hugepage=never

Save your changes and run

# grub2-mkconfig -o /boot/grub2/grub.cfg

After a reboot, the usage of THP will be disabled.

Use YaST2 bootloader, execute

# yast bootloader

Choose “Kernel Parameters” tab (ALT-k) and edit the “Optional Commandline Parameters” section by appending

transparent_hugepage=never

To enable this change, a system reboot is required. In a scale-out environment, those changes have to be done on every server of the landscape. In case you already have a running HANA instance, rebooting the server should only be done when a standby server is configured. Do not reboot all servers at once. For single node instances a downtime has to be considered.

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

Configure C-States for lower latency in Linux (applies to Intel-based systems only)

An Intel CPU normally operates in C-state C0. When the processor is put to a higher C-state, it will save power. But for low latency applications, the additional time needed to stop and restart the execution of the code will cause performance degradations. We recommend to limit the C-states to C0 and C1 by setting the following parameters:

intel_idle.max_cstate=1 processor.max_cstate=1

To set this parameter permanently, use one of the following options:

Call saptune with parameter “HANA” (starting with SLES 12 for SAP Applications SP2)

# saptune solution apply HANA

Edit /etc/default/grub

search for the line starting with “GRUB_CMDLINE_LINUX_DEFAULT” and append to this line

intel_idle.max_cstate=1 processor.max_cstate=1

Save your changes and run

# grub2-mkconfig -o /boot/grub2/grub.cfg

After a reboot the usage of C-states C2 and higher will be disabled.

Use YaST2 bootloader, execute

# yast bootloader

choose “Kernel Parameters” tab (ALT-k) and edit the “Optional Commandline Parameters” section by appending

intel_idle.max_cstate=1 processor.max_cstate=1

To enable this change, a system reboot is required. In a scale-out environment, those changes have to be done on every server of the landscape. In case you already have a running HANA instance, rebooting the server should only be done when a standby server is configured. Do not reboot all servers at once. For single node instances a downtime has to be considered.

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

Energy Performance Bias EPB (applies to Intel-based systems only)

The Linux 3.x kernel obeys the EPB bit in the CPU flags. Consequently, it configures the CPUs according to the global “energy performance bias” setting in the BIOS. If the EPB setting in the BIOS is “Maximum performance”, all should be fine. Otherwise, the CPUs try to save power at the cost of reduced performance. The power management dialog in YaST (yast2 power-management) has a dropdown menu where you can set the system to “low latency/maximum performance” resp. “Low Latency Computing”, it takes effect immediately, and a reboot is not required.

You can achieve the same on the command line by running

# cpupower set -b 0

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

Further Optimization

VFS Caches

echo 50 > /proc/sys/vm/vfs_cache_pressure

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

Memory Overcommit

echo 1 > /proc/sys/vm/overcommit_memory

echo 70 > /proc/sys/vm/overcommit_ratio

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

HANA Installation


SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

Install components

AFL

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

Data Provisioning Agent

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

Smart Data Access (normally you have this package, only install / update if you have lower version)

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

HANA Client

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

HANA Cockpit 2.0

In HANA 2.0, Cockpit 1.0 is installed as default and you cannot use it. If you want to use Cockpit you need to use 2.0 of it. It is recommended to install in another server and use it as a central HANA management system.

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

Remember to take note of your ports.

HANA Studio

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

Result

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

Remember, after HANA 2.0 SP1, it is no longer to create single systems. All HANA databases are now multitenant databases. If you have standalone database and want to migrate HANA 2.0 SP01 consider multitenant sizing.

HANA Cockpit Setup


SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

Register Resources and systems

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

HANA Cockpit Monitoring

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

SAP HANA 2.0, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

Enterprise applications with optimized costs – SAP HANA-based systems on Hetzner Online

$
0
0
In this article I would like to share my experience  of building our company SAP infrastructure and hardware costs optimization that we  have managed to achieve. Currently we have over 20 internal sap systems in our internal  landscape, including about 15 HANA-based installations. We use a combined approach with Hetzner Online and Amazon web services, and our average monthly expenses  for hardware rental are about EUR 1,000.  In fact, this is not a productive landscape, so most of those tricks  will not work once you have mission-critical systems. However, in many production  scenarios serious costs saving can be achieved, and this is what I am going to describe below.

For a long time enterprise applications  have been associated with expensive (and complicated in maintenance) hardware, mainframes,  committed technical teams and so on. For the last  few years  the role of cloud solutions has increased, where a customer either only rents equipment  (i.e. virtual servers), or complete application service. However, the main feature of cloud – elastic resource allocation  resulting in costs saving  –  is not required with many scenarios typical for small- and mid-size sap installations.
The most popular idea is to optimize costs  thanks to elastic capacity – disable non-required servers, change resource allocation (i.e. memory and CPU). Those make sense in case  you have scale-out environment (i.e. multiple application servers). However, for most cases (except BW) you will have a single “large” HANA instance that requires one solid (and expensive) instance. Once you decide to install SAP – in many cases you do not have  to dynamically resize or start/stop it on request – you just need to have it up and running, and probably you would like to have an option to increase hardware resources in case  your system load grows. So, it looks like a regular  server rental, the only difference is that those servers are located in cloud.

For example, a cloud instance with 256Gb RAM will cost about EUR 1,200-1,700  monthly, depending on the specific cloud provider, geo location and so on.  Even  if we decide to use a 8×5 schedule, in a very optimistic scenario (without taking into  consideration necessary time for updates, long-time background jobs usually scheduled for night time or weekends) we still get about 400-500 EUR monthly.

Those costs might be acceptable (and even more than acceptable) once you are running a mission-critical  production system. However, it is quite expensive  if you are running a set of internal systems (in case if you are a sap partner), or you simply do not need  all features  offered by “big” cloud providers, and/or 2-4 hours’ system downtime is not a critical risk for your business ( which is usually the case with small and medium companies). Frankly  speaking, you  do not need 99.9999% availability of sap,  unless you have the same provisions for internet connection or electrical power in your location.  Based on my experience, I can say that it might make sense to  consider direct server rental instead of virtualized environments.

In our company we started using Hetzner Online  at the beginning of 2014 – as a cheap option to keep non-production  systems for internal needs.   Since 2016 we have been using  it for non-production  purposes together with HANA,  as for those purposes it is a nice and   quite a cheap option.

Now our internal landscape is based on Hetzner Online PX121-SSD servers with single Xeon E5-1650 v3 hexa-core and 256Gb RAM. For sure this is not a certified platform for HANA,  but  for the 2 years of usage we have never faced any hardware-related issues.  We typically run 2-3 systems on one host, including IDES versions with demo data inside. Indeed,  these are low-loaded systems, without a significant number of users logged in, and such a landscape  cannot be suggested for any production  usage.

Non-productive hosting
PX121 SSD: 256 GB Gb RAM, Intel® Xeon® E5-1650 v3 Hexa-Core 117 EUR/month 

As  to production  landscape provided to clients – we use DX291 – Dell PowerEdge R730 with dual Xeon E5-2620 v4 octa-core and up to 768Gb RAM.  This one is officially supported by SAP and listed in HANA certified hardware directory. From the pricing perspective, we get instance with 256Gb RAM for 350 EUR per month, or in “maximum ” configuration –  756Gb RAM for approx. 900 EUR per month.

Let me sum up “ net” hardware costs for productive hosting:

Hosting optionApproximate monthly price
256 Gb RAM512 Gb RAM 756 Gb RAM 
Cloud hosting 24×71200-1700 EUR2500-3000 EUR5000-5500 EUR
Cloud hosting 8×5 400-500 EUR 700-900 EUR1400-1700 EUR 
Hetzner Online – Dell Power Edge R730350 EUR600 EUR900 EUR

From the technical point of view the whole production  landscape will look like this:

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Learning

This solution is aligned with enterprise-level requirements. However, there is no way to measure how stable a single server is  – this is nothing without backup solution. After trying several various options we finally decided to use Amazon S3 as external backup storage. All database backups are transferred to S3; as well as redo logs are stored  in it. So, this allows keeping data for point-in-time recovery outside Hetzner Online data center and allows fast restore in case of failure.

As an additional protection option, we use reserve instance on Amazon EC2. The main idea is, that normally on SAP system only database can change, and quite rarely files on the  file system. So once a server is set up on Amazon EC2 as a copy of some production  system, it might be easily actualized via database restore.

The diagram of such protection (disaster-recovery) process will show as follows:

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Learning

In such a way we have primary instance on Hetzner Online, and additional copy of it on AWS, switched-off most time, and  hardly requiring any additional payments. However, in case of failure of “primary” Hetzner Online instance, it can be easily started , updated with latest backup and redo logs, and continue production  operations. This approach allows  using  a cheaper hardware hosting option, and  at the same time keeping unplanned downtime  within 4-8 hours’ slot  in the worst case. To keep access to a system transparent for the end user, access to such a system can be organized via additional load balancing instance as  shown in the schema below:

SAP HANA Tutorials and Materials, SAP HANA Certifications, SAP HANA Learning

In conclusion I would like to say that  nowadays it is possible to keep quite complicated internal landscape and take advantage of modern in-memory computing technologies without any huge investments into internal hardware infrastructure or expensive enterprise-level cloud solution.  Many scenarios   will allow using less expensive hosting options; in combination  with modern cloud services even production environment can be kept in such a way.

Installing SAP HANA database using self service on SAP Cloud Platform

$
0
0
A new capability was released on SAP Cloud Platform to allow customers to perform installation of SAP HANA/ASE database instance in a self-service manner. Prior to this, there was a manual process in place. If a customer has an existing SAP Cloud Platform subscription with several subaccounts and decides to subscribe to a HANA DB, they would have to raise a support ticket requesting the assignment of a HANA DB to a particular subaccount. Behind the scene, the SAP Cloud Platform DevOps team would install the HANA DB and assign it to the requested subaccount.

As of 2018, all new subscriptions to HANA DB would show up in “Entitlements” section of the Global Account. In the below screen, you can see that I have a quota of 1 Standard Edition of SAP HANA. The Entitlements section would also list the available quotas for Java compute units and Virtual machines.

SAP HANA Database, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

Within my subaccount, when I navigate to Menu SAP HANA/SAP ASE > Database Systems, I get to see the option “New Database System”.

SAP HANA Database, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

This  provides a “Create Database System” popup screen where I can select the type of DB, version and network visibility. If I have subscribed to multiple HANA DBs (say two 128GB for DEV/TEST and 256GB for PRD). I  would get to select them in the “available quota” as shown below. Hence, when I am in my PROD subaccount, I would use the same self service option to install the HANA DB which is meant for production.

SAP HANA Database, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

Once you have provided the information and started the installation, it would take couple of minutes to finish the installation. Time to grab a coffee while it finishes the installation.

Once the installation is complete, you will get to see the ONLINE status along with the version details.

SAP HANA Database, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

You can navigate into the details by selecting the database system. In this case, “scpta”. Before you start to use the SAP HANA Cockpit or Development Workbench, you would need to get a user account created.

SAP HANA Database, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

Click on the link “Database User” and this will give you a database user with an initial password. This user is assigned with set of roles to administer the database. You can also add additional roles by navigating to the Development Workbench > Security. It’s also important to note that few users like SYSTEM, BKPMON, CERTADM, and PSADBA are automatically created by SAP Cloud Platform to manage the database and are reserved for use by SAP Cloud Platform.

Another existing functionality is the ability to update the database in a self-service fashion. This feature has been available for a while. I thought I highlight it in this blog too. Clicking on “Check for updates” will open up the update dialog.

SAP HANA Database, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

The system will detect the current version of components and also calculate the different target versions available for each component. As an administrator you can select the corresponding version and navigate through the wizard. Its important to note that the database would restart at the end of this process for the changes to take effect.

SAP HANA Database, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Guides

Using the self service option, you now have more flexibility to create, assign and move the databases within your subaccounts.
Viewing all 711 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>