cancel
Showing results for 
Search instead for 
Did you mean: 

HANA Active Active read-only

kalyan
Participant
0 Kudos
105

If we have setup Active/Active (Read Enabled) to enable read access to the secondary system using HSR and used a hint in ABAP as per  2731728 - Using SAP HANA Active/Active out of customer ABAP programs. How can we check that the query in question has indeed run on Secondary and not on primary. I can check expensive SQL statements/statements executed directly via HANA Studio/HANA cockpit to know that the query in question has indeed run on secondary because secondary system designated to be read-only can be logged onto and run monitoring queries but how can we check this from ABAP. Is there a way of knowing which site it executed on from ABAP layer

Accepted Solutions (0)

Answers (1)

Answers (1)

umasaral
Participant

Hi 

Yes, you can check which site a query executed on from the ABAP layer by using the SYSTEM_INFO table. This table provides information about the system where the query was executed. You can query this table in your ABAP program to determine if the query ran on the primary or secondary system.

SELECT * FROM "SYS"."SYSTEM_INFO" INTO @DATA(system_info).

Check the column SYSTEM_ID in the result to identify if it corresponds to the primary or secondary system.