Showing posts with label HANA Database. Show all posts
Showing posts with label HANA Database. Show all posts

Tuesday, 17 February 2026

HANA Database Upgrade: How to Choose the Right Target Version

When planning a HANA database upgrade, it’s important to evaluate a few key technical checkpoints before moving forward. This includes validating SAP application compatibility with the target database version, understanding the supported N-1 version strategy provided by SAP SE, and confirming whether a direct upgrade path is available from the current HANA version to the desired target version. Reviewing these factors early helps minimize upgrade risks, prevents compatibility issues, and ensures a smoother execution. In this blog, we’ll walk through these considerations in a practical way to help you plan your upgrade with confidence.

Please refer SAP Note “1948334 - SAP HANA Database Update Paths for SAP HANA Maintenance Revisions” which provide use details about SAP HANA maintenance revisions specifying in detail the supported and unsupported update paths (Lists of SAP HANA Revisions (HANA 1.0 and HANA 2.0) specifying in detail the supported and unsupported update paths). For all update paths not explicitly listed in note, only regular update procedure applies! The regular update procedure is upgrading from a lower revision to a higher revision.


 * Please Note that SPS05 which is used as intermediate jump will be out of maintenance in 31.12.2025

Note:

  • If you upgrade from a SAP HANA 1 revision prior to revision 69.07, first upgrade your system to SAP HANA revision 69.07 before upgrading to the target revision.
  • The HANA 1 revision numbers 75 through 79, 86 through 89, 98 through 99 and 103 through 109 have been skipped.

Upgrading a HANA 1 system to HANA 2:

1) Please read the guideline for upgrading a HANA 1 system to HANA 2 in SAP Note 2372809.

2) In an MDC landscape, the systemserver doesn’t have separated metadata space if the binary version is earlier than the maintenance revision 122.04.
    If you start your upgrade to HANA 2.0 from a SAP HANA 1system in a multiple-container mode (MDC), you first upgrade the latest SAP HANA 1 Support Package Stack (SPS) 12 maintenance  revision. Please take care of the unsupported upgrade paths (tables above).

3) Please check the supported Operating Systems of both source and target revisions using 2235581 before upgrading. 

For more information about the SAP HANA revision and maintenance strategy, see SAP Notes
2021789 - SAP HANA 1.0 Revision and Maintenance Strategy
2378962 - SAP HANA 2.0 Revision and Maintenance Strategy

Monday, 16 September 2024

How to Switch HANA alerts off/on with SQL Statement ?

 we can switch off the underlying alert checker, so it no longer runs automatically or you can switch it back on again using the following methods:

If you need to disable or enable these alerts in batch (more than one at once), the easy way is to manipulate STATISTICS_SCHEDULE (_SYS_STATISTICS).
STATISTICS_SCHEDULE Table (Embedded Statistics Service)
Statistics schedule per host. This view contains information only for the last 7 days.

 

Caution
If you switch off alerts, you may not be warned about potentially critical situations in your system.
Be careful when modifying data on SYSTEM_STATISTICS through SQL Script.

For example: You want to disable all the schedules for the alerts shown in both HANA Cockpit > Configure Alerts / HANA studio > Alerts. Run the following statement:

UPDATE _SYS_STATISTICS.STATISTICS_SCHEDULE SET "STATUS" = 'Inactive' where "ID" between 1 and 710

In case you want to activate them back to the original schedule, you can run the following statement:

UPDATE _SYS_STATISTICS.STATISTICS_SCHEDULE SET "STATUS" = 'Idle' where "ID" between 1 and 710

You can build your own scripts and procedures for this purpose. For example, to save the current status of the alerts to restore later or to just disable a few alerts for a given maintenance window.

 

Saturday, 29 June 2024

What are triggers in SAP HANA environments ?

 Triggers in SAP HANA environments are database objects that automatically execute a specified set of SQL statements or logic in response to certain events on a particular table or view. They are used to enforce business rules, maintain data integrity, and automate system processes. Here’s a detailed overview of triggers in SAP HANA:

Example:

CREATE TRIGGER
  "_SYS_STATISTICS"."STATISTICS_SWITCH_PROFILE"
AFTER UPDATE ON
  "_SYS_STATISTICS"."STATISTICS_PROPERTIES"
REFERENCING OLD ROW MYOLDROW, NEW ROW MYNEWROW FOR EACH ROW
begin  
  if :mynewrow.key = 'internal.sizing.profile' then
    if :mynewrow.value != :myoldrow.value then
      call _SYS_STATISTICS.shared_copy_profiles (:myoldrow.value, :mynewrow.value);
    end if;
  end if;
end

 

Types of Triggers in SAP HANA

  1. Row-Level Triggers: These triggers execute once for each row affected by the triggering event. They are useful for enforcing row-specific constraints or logging changes.
  2. Statement-Level Triggers: These triggers execute once for the entire SQL statement, regardless of how many rows are affected. They are used for actions that apply to the whole statement, such as auditing.

Trigger Events

Triggers can be defined to execute in response to the following events:

  1. INSERT: Activates when a new row is inserted into the table.
  2. UPDATE: Activates when an existing row is updated.
  3. DELETE: Activates when a row is deleted from the table.

Timing of Triggers

Triggers can be specified to execute at different times relative to the triggering event:

  1. BEFORE: Executes before the triggering event. Used for validation or modification of data before it is committed.
  2. AFTER: Executes after the triggering event. Used for logging, enforcing business rules, or cascading changes to other tables.
  3. INSTEAD OF: Executes in place of the triggering event. Commonly used for views to provide custom behavior for insert, update, or delete operations.


This trigger is executed in context of the SAP HANA statistics server (SAP Note 2147247) after updates on table STATISTICS_PROPERTIES in order to make sure that under certain key / value conditions the procedure SHARED_COPY_PROFILES is called in order to perform follow-up actions.

2800020 - FAQ: SAP HANA Triggers

Thanks !

 

Tuesday, 9 January 2024

Where do we find central information about SAP HANA?

Below are the important details about SAP HANA?  

SAP Notes 1514967, 1523337 and 2536742 contain central information and important links for SAP HANA.

Documentation for SAP HANA is available at http://help.sap.com/hana. Particularly important for the technical SAP HANA administration is the SAP HANA Administration Guide.

SAP Note 2402628 describes how to find SAP HANA documentation for earlier Revisions.

SAP HANA software can be downloaded via the SAP Software Download Center (SWDC).

Useful troubleshooting information can be found in the SAP HANA Troubleshooting and Performance Analysis Guide.

At SAP Press the books SAP HANA Administration and SAP HANA 2.0 – An Introduction are published.

SAP Note / SCN Link Title

1642148 FAQ: SAP HANA Database Backup and Recovery

1999880 FAQ: SAP HANA System Replication

1999930 FAQ: SAP HANA I/O Analysis

1999997 FAQ: SAP HANA Memory

1999998 FAQ: SAP HANA Lock Analysis

2000000 FAQ: SAP HANA Performance Optimization

2000002 FAQ: SAP HANA SQL Optimization

2000003 FAQ: SAP HANA

2014562 FAQ: SAP HANA LT Replication Server (SLT)

2039883 FAQ: SAP HANA Database and Storage Snapshots

2044468 FAQ: SAP HANA Partitioning

2057046 FAQ: SAP HANA Delta Merges

2057595 FAQ: SAP HANA High Availability

2073112 FAQ: SAP HANA Studio

2081591 FAQ: SAP HANA Table Distribution

2082286 FAQ: SAP HANA Graph

2100009 FAQ: SAP HANA Savepoints

2100040 FAQ: SAP HANA CPU

2101244 FAQ: SAP HANA Multitenant Database Containers

2112604 FAQ: SAP HANA Compression

2114710 FAQ: SAP HANA Threads and Thread Samples

2115815 FAQ: SAP HANA Database Patches and Upgrades

2116157 FAQ: SAP HANA Consistency Checks and Corruptions

2124112 FAQ: SAP HANA Parsing

2127458 FAQ: SAP HANA Loads and Unloads

2142945 FAQ: SAP HANA Hints

2143736 FAQ: SAP HANA Table Distribution for BW

2147247 FAQ: SAP HANA Statistics Server

2159014 FAQ: SAP HANA Security

2160391 FAQ: SAP HANA Indexes

2165547 FAQ: SAP HANA Database Backup & Recovery in a SAP HANA System Replication Landscape

2169283 FAQ: SAP HANA Garbage Collection

2177064 FAQ: SAP HANA Service Restarts and Crashes

2180119 FAQ: SAP HANA Smart Data Access

2180165 FAQ: SAP HANA Expensive Statements Trace

2185556 FAQ: SAP HANA Cockpit (delivered with SAP HANA 1.0)

2186744 FAQ: SAP HANA Parameters

2200772 FAQ: SAP HANA Statement Routing and Client Distribution Mode

2220627 FAQ: SAP HANA LOBs

2222110 FAQ: SAP HANA Load History

2222200 FAQ: SAP HANA Network

2222218 FAQ: SAP HANA Database Server Management Console (hdbcons)

2222220 FAQ: SAP HANA DBACOCKPIT

2222250 FAQ: SAP HANA Workload Management

2222277 FAQ: SAP HANA Column Store and Row Store

2336344 FAQ: SAP HANA Static Result Cache

2340450 FAQ: SAP HANA Table Replication

2366291 FAQ: SAP HANA Executed Statements Trace

2380176 FAQ: SAP HANA Database Trace

2393013 FAQ: SAP HANA Clients

SAP Note / SCN Link Title 

2393464 FAQ: SAP HANA Live Content Installation

2399993 FAQ: SAP HANA Fast Data Access (FDA)

2400005 FAQ: SAP HANA Persistence

2400006 FAQ: SAP HANA Statement Hints

2400007 FAQ: SAP HANA Runtime Dumps

2400022 FAQ: SAP HANA Smart Data Integration (SDI)

2412519 FAQ: SAP HANA SQL Trace Analyzer

2416490 FAQ: SAP HANA Data Aging in SAP S/4HANA

2444090 FAQ: SAP HANA Backup Encryption

2470289 FAQ: SAP HANA Non-Uniform Memory Access (NUMA)

2477204 FAQ: SAP HANA Services and Ports

2502256 FAQ: SAP HANA Caches

2506811 FAQ: SAP HANA Dynamic Result Cache

2520774 FAQ: SAP HANA Performance Trace

2535951 FAQ: SAP HANA Users and Schemas

 2554012 FAQ: SAP HANA Big Endian to Little Endian Migration for IBM Power

2570371 FAQ: SAP HANA Execution Engine (HEX)

2573880 FAQ: SAP HANA Full System Info Dump

2593571 FAQ: SAP HANA integrated liveCache

2596466 FAQ: SAP HANA XS Advanced

2599949 FAQ: SAP HANA Extended SQL Executor (ESX)

2600076 FAQ: SAP HANA Inverted Individual Indexes

2600095 FAQ: SAP HANA Sequences

2669621 FAQ: SAP HANA Capture and Replay

2670064 FAQ: SAP HANA Multi-Dimensional Services (MDS)

2700084 FAQ: SAP HANA Persistent Memory

2729787 FAQ: SAP HANA Data Supplier for System Landscape Directory (SLD) and Focused Run (FRUN)

2799997 FAQ: SAP HANA Native Storage Extension (NSE)

2799998 FAQ: SAP HANA Plan Stability

2800006 FAQ: SAP HANA Cockpit

2800007 FAQ: SAP HANA Temporary Tables

2800008 FAQ: SAP HANA Fulltext Indexes

2800020 FAQ: SAP HANA Triggers

2800028 FAQ: SAP HANA Optimizer Statistics

2800030 FAQ: SAP HANA Kernel Profiler

2800048 FAQ: SAP HANA TREXviaDBSL

2800055 FAQ: SAP HANA Kernel Sentinel

2899330 FAQ: SAP HANA KPI Collector

2975780 FAQ: SAP HANA LDAP Based Authentication and Authorization

3007062 FAQ: SAP HANA Third Party Cluster Solutions

3048191 FAQ: SAP HANA Local Secure Store (LSS)

3049706 FAQ: SAP HANA Hardware and Cloud Measurement Tools (HCMT)

3133628 FAQ: SAP HANA Web Dispatcher

3158257 FAQ: SAP HANA User Store (hdbuserstore)

3266082 FAQ: SAP HANA Cloud

3288971 FAQ: Pacemaker Cluster Resource Manager in SAP HANA System Replication Environments

3300523 FAQ: SAP HANA in the Neo Environment



How to removing the SAP HANA Service from topology and deamon.ini ?

In a single database container environment, carry out the following steps to remove SAP HANA XS from the topology:

Stop all the applications that use the database. This is required because a new data backup has to be created after you remove SAP HANA XS. A log replay over the time of the service removal is not supported.

Determine all the hosts on which SAP HANA XS services are active:

 -- >  select host from m_services where service_name = 'xsengine'


Determine the volume ID of the SAP HANA XS services:

-->   select VOLUME_ID from m_volumes where service_name = 'xsengine'


Stop the SAP HANA XS services. To do this, carry out the following command for every <host name> with an SAP HANA XS service:

--   ALTER SYSTEM ALTER CONFIGURATION ('daemon.ini', 'host', '<host name>') UNSET ('xsengine','instances') WITH RECONFIGURE


Remove the SAP HANA XS service entry from the topology. To do this, carry out the following command for every <host name> with an SAP HANA XS service:

--  ALTER SYSTEM ALTER CONFIGURATION ('topology.ini', 'system') UNSET ('/host/<Hostname>', 'xsengine') WITH RECONFIGURE


Remove the volumes from the topology. To do this, carry out the following command for every <volume_id> of an SAP HANA XS service:

--   ALTER SYSTEM ALTER CONFIGURATION ('topology.ini', 'system') UNSET ('/volumes', '<volume_id>') WITH RECONFIGURE

           Caution: It can be a risk to make changes to the topology. Therefore, carefully check the host and the volume ID.


Create a new data backup.

Start the applications that use the database.

 If you want to restart SAP HANA XS, proceed as follows:

Stop all the applications that use the database.

Activate SAP HANA XS. When you do this, specify the host on which you want SAP HANA XS to run:

 --   ALTER SYSTEM ALTER CONFIGURATION ('daemon.ini', 'host', '<host name>') SET ('xsengine','instances') = '1' WITH RECONFIGURE

 SAP HANA XS is started automatically, and the volumes of the service are created automatically.

Create a new data backup and start the applications that use the database.

In case XS Engine is still active and running: Determine the port of SAP HANA XS for the relevant tenant:

SELECT HOST, PORT FROM "SYS_DATABASES"."M_SERVICES" where DATABASE_NAME = '<tenant>' and SERVICE_NAME = 'xsengine'

Remove SAP HANA XS.

ALTER DATABASE <tenant> REMOVE 'xsengine' AT '<host>:<port>';

In case XS Engine is inactive / cannot be started:

get database_id:

select * from M_TOPOLOGY_TREE where path = '/databases' 


By default the database_id is 3, but it can differ if multiple tenants are configured. So please verify by:


select * from M_TOPOLOGY_TREE where path = '/databases/3' and name = 'name' and value = '<tenantdb name>'

get hostname:

select host from sys_databases.m_services where service_name = 'xsengine'

verify host name in topology.ini:

select * from M_TOPOLOGY_TREE where path = '/host/<host name>' and name = 'xsengine'

get volume id

select VOLUME_ID from sys_databases.m_volumes where service_name = 'xsengine'

verify volume in topology.ini:

select * from M_TOPOLOGY_TREE where path = '/volumes' and name = '<database id from step 1>:<volume_id>'

remove xsenine from daemon.ini:

ALTER SYSTEM ALTER CONFIGURATION ('daemon.ini', 'host', '<host name>') UNSET ('xsengine','instances') WITH RECONFIGURE;

remove xsengine from topology:

ALTER SYSTEM ALTER CONFIGURATION ('topology.ini', 'system') UNSET ('/host/<host name>', 'xsengine') WITH RECONFIGURE;


ALTER SYSTEM ALTER CONFIGURATION ('topology.ini', 'system') UNSET ('/volumes', '<database id>:<volume id>') WITH RECONFIGURE;

Verify that xsengine is removed:

select * from sys_databases.m_services where service_name = 'xsengine'


Do you want to add the XSengine service again?

see also https://help.sap.com/docs/SAP_HANA_PLATFORM/4fe29514fd584807ac9f2a04f6754767/ee36e3441ae24a7883ab353631ecd4d6.html?locale=en-US

ALTER DATABASE JS2 ADD 'xsengine' AT '<host name>';

Verify that xsengine is back and active:

select * from sys_databases.m_services where service_name = 'xsengine'

Note

Need to run the command from SYSTEM Database if your database is a part of MDC

It can be a risk to make changes to the topology. Therefore, only use the above procedure carefully and carefully check the hostname, database, and volume id.

Make sure that you have a valid data backup and that you also backed up your topology.


Monday, 4 September 2023

SAP HANA SPS06 – Early Revisions upgrade reason.

 Data Consistency Regression in SAP HANA SPS06 – Early Revisions

As part of a proactive landscape stabilization initiative, SAP Enterprise Cloud Services has identified a potential issue, that could lead to unplanned downtime or slow performance or non-compliance. These potential issues are tracked as Top Issues by SAP Enterprise Cloud Services and recommendations are shared with customers to mitigate the risk and avoid any business impact.

 

We are contacting you, because you may have a SAP S/4HANA Cloud system or SAP HANA Enterprise Cloud system impacted by a new Top Issue.

 

Top Issue Description

Due to a programming error in early SAP HANA 2 SPS06 revisions, the complete SAP HANA transaction is being rolled back instead of a rollback on the statement level in case an enterprise search statement was cancelled previously on the same SAP HANA connection. This issue only applies for the following Revisions:

  • SAP HANA 2 SPS06 Revision 60.00
  • SAP HANA 2 SPS06 Revision 61.00
  • SAP HANA 2 SPS06 Revision 62.00

 

What is the Business Impact?

Due to this programming error, an incorrect transaction status might be returned to the application level. In the worst case, this might lead to situations where SAP HANA has rolled back changes on the database level, which the application is not aware of. This can look from the application level as an inconsistency in business data while on the SAP HANA database level no inconsistency can be found by the technical consistency checks on the database level as described in SAP Note 1977584. This could lead to potential inconsistency or apparent data loss in business data due to incorrect transaction status.

 

 

What are SAP recommendations?

Update to SAP HANA 2 SPS06 Revision 63.00 or higher

Check SAP note 3213111 and 3198962 for more details

 

What actions SAP has taken to solve this issue? 

Standard templates are made available for you on Service Request App to request implementation of the above recommendation.

 

What action is recommended for you? 

Contact your SAP Enterprise Cloud Services Representative to discuss the details of the impacted systems, Target DB version compatibility with existing OS/application and plan the implementation of recommendations.

 

What will happen if recommendations are not applied?

SAP’s abilities for the provision of support may be limited and System Availability Service Levels may not apply. 

 

If you have any questions, please contact your SAP Enterprise Cloud Services representative. 



Thanks.

Rupesh Chavan

Monday, 31 July 2023

Server architecture for SAP HANA XS Advanced Runtime Platform

 SAP HANA extended application services, advanced model (XS advanced for short) provides a comprehensive platform for the development and execution of micro-service oriented applications, taking advantage of SAP HANA's in-memory architecture and parallel execution capabilities.

About SAP HANA XS Advanced

SAP HANA XS advanced offers a rich set of embedded services that enable end-to-end support for web-based applications including lightweight web servers, persistency services, and a configurable identity provider. Furthermore, the platform supports polyglot application development with a core set of pre-deployed runtimes that are accepted as industry standards, for example, node.js or JavaEE.

Although the built-in runtimes come with first-class development and monitoring support, the platform has an open architecture that allows you to add custom runtimes. This high flexibility makes it essential that you put a strong focus on security concepts, not only when configuring and setting up the infrastructure, but also throughout operating the system.

Architecture Overview

The basic system architecture has a classic 3-tier approach, we can see in below diagram 

3-Tier Architecture of SAP HANA with XS Advanced

There is a distinction between the overall SAP HANA system and the SAP HANA XS advanced application server. The SAP HANA system refers to the entire SAP HANA platform as part of the integrated solution. All services of the SAP HANA system share the same system identifiers (that is, instance number and SID) and are controlled by the hdbdaemon service.

The third tier, represented by an SAP HANA database, provides persistency services, that is, data storage. In contrast, the application server components in the middle tier are responsible for deploying, running, and monitoring the applications. Most security-related features such as authentication, authorization, and auditing are primarily enforced in this layer. End users interact on the client layer with system or business users that are authenticated by an identity provider (IdP), which is SAP HANA user management by default. However, both the server components and the applications themselves access the SAP HANA database only through technical database users that the platform generates implicitly. Direct access to the database is only intended for database administration and monitoring purposes.

The following diagram provides a more detailed overview of the technical system landscape of the XS advanced application server. All relevant components and storages used by the application server layer are highlighted with a gray background.

Technical System Landscape of XS Advanced Application Server
Technical System Landscape of XS Advanced Application Server

The XS advanced application server relies on the following SAP HANA services contributing to the integrated platform solution:

  1. xscontroller (Controller, FileSystem Broker, Platform Router)
  2. xsexecagent (Execution Agent)
  3. xsuaaserver (UAA, UAA Broker and SAP HANA Service Broker)
Thanks 
Rupesh Chavan