a month ago
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
62 | |
12 | |
7 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.