SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
⤢ Open full site

Routing queries to a read only replica

This tutorial demonstrates how read only queries can be routed to a synchronous replica. The option to add a replica to an SAP HANA Cloud instance requires a productive (non free tier) instance.

Overview

🎓 beginner 30 min. SAP HANA CloudBeginnerSAP HANA Cloud SAP HANA Database

You will learn

  • How to add a synchronous replica
  • How to direct a SQL query to a replica using a hint
  • How to connect to a replica so that read only queries can be executed without using hints
  • How to check where a statement was executed
  • Workload class settings related to replicas
  • Additional settings that affect routing
Unknown U Unknown July 9, 2026
Created by March 13, 2026
Contributors

Prerequisites

Prerequisites

  • An SAP HANA Cloud QRC 1 2026 (or newer) instance that supports adding a replica
  • A 2.28 (QRC 1 2026) or newer version of the SAP HANA Client

Steps

Intro

A replica is used to provide an additional copy of your instance that is kept up to date through replication. This replica instance can then be used to quickly replace the source instance with the replica automatically or using the manual takeover action providing higher availability.

By sending read only workloads to the replica, this can offload workloads from the source node and provide better utilization.

The following are some additional sources of information on this topic:


Step 1 Add a replica

The following steps demonstrate how a replica can be added to an SAP HANA Cloud instance.

  1. In SAP HANA Cloud Central, open the manage configuration wizard.

    open the manage configuration wizard
    open the manage configuration wizard

  2. Under Availability Zone, select Add Replica and choose synchronous as the replication mode.

    Add replica
    Add replica

  3. Once the changes have been saved and the instance has completed the update, it will indicate that the replica is available for read operations. The Show Resource Usage for drop down will now additionally have an option for the Replica.

    read only replica ready
    read only replica ready

  4. Once the replica has been added, it is then possible, if needed for testing, to perform a manual takeover so that the replica becomes the source node. This step is shown for illustrative purposes only and does not need to be completed.

    perform a takeover
    perform a takeover

Step 2 Hint based routing
+
Step 3 Directly connect to a replica
+
Step 4 Monitoring
+
Step 5 Workload classes and replicas
+
Step 6 Additional considerations
+
Step 7 Knowledge check
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 7
1. Add a replica 2. Hint based routing 3. Directly connect to a replica 4. Monitoring 5. Workload classes and replicas 6. Additional considerations 7. Knowledge check

Learn more →