SAP Knowledge Base Article - Public

2525191 - SAP Analytics Cloud Best Practice: Troubleshooting Live HANA issue with SAP HANA Multi-Dimensional Services (MDS) query/trace

Symptom

  • SAP HANA Multi-Dimensional Services (MDS) is used to process multidimensional queries including aggregation, transformation and calculation in SAP Analytics Cloud (SAC).
  • Through HANA MDS, queries are translated into a SAP HANA calculation engine execution plan or SQL, which is executed by the HANA core engines (see SAP Note 2670064).
  • SAC will send MDS queries through HTTP/HTTPS requests to this service to get a response for live data connections.
  • How to extract the MDS query as well as the response from HTTP/HTTPS trace?
  • How to execute the MDS query to reproduce the problem in HANA in order to troubleshoot a SAC Live HANA issue?

Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.

Environment

  • SAP Analytics Cloud
  • SAP HANA
    Service package HANA revision
    HANA 1.0 SPS 12 122.12
    HANA 2.0 SPS 01 12.02
    HANA 2.0 SPS 02 21.00
    all subsequent releases
  • Live data connection

Resolution

Extract the MDS query/response

  1. Log on to SAP Analytics Cloud using Google Chrome.
  2. Open the Developer Tools from Chrome browser by pressing F12 key
  3. Go to the Network tab from the window 
  4. Reproduce the issue based on Live HANA connection/model in SAC.
  5. Type GetResponse in the filter of Network window.
  6. Click the Header tab and click the view source button for Request Payload to see the raw MDS query (see more detail from SAP Note 2838921).
    => If there are multiple GetResponse entries, check the Response tab to see which one is with the error. 
    => You may also copy the response from the Response tab.
    • Metadata Use case
      metadata call.png
    • Analytic Use Case
      analyic call.png

 

Execute the MDS query in HANA

  1. Open SAP HANA SQL Editor in SAP HANA Studio or SAP HANA Web IDE.
  2. Connect to the SAP HANA System in the SQL Editor.
  3. Call the EXECUTE_MDS procedure to execute the MDX query extracted from HTTP/HTTPS request above (see more detail from SAP Note 2691501 2550833).
    Analytic Use Case
    CALL SYS.EXECUTE_MDS('Analytics', '', '', '', '',
    '<insert MDS query here>' , ?);

    Example:
    CALL SYS.EXECUTE_MDS('Analytics', '', '', '', '',
    '{
       "Analytics": {
          "Language": "en",
          "Definition": ...
       }
    }' , ?);

    Metadata Use case
    CALL SYS.EXECUTE_MDS('Metadata', '', '', '', '',
    '<insert MDS query here>' , ?);

    CALL SYS.EXECUTE_MDS('Metadata', '', '', '', '',

    '{
       "Metadata": {
             ... details ...
          }
       }
    }' , ?);

     

  4. Check Out and also Performance Data.
    • If same error/data or slow performance can be found there, open or route an incident on the components HAN-DB-ENG-MDS or HAN-AS-INA-SVC.Execute_MDS.png
    • If it is Wrong Data / Incorrect result returned to SAC, it is hard to find it in the Out session of execution result above.
      MDX Exe Result.png
      In this case, you can enable HANA DB trace and then check the result from generated trace file (indexserver[...]_mds.trc) according to the steps suggested in SAP Note 2691501 >> 2.1. Wrong Data / Incorrect result or specific Error message returned during query execution.
      Response.png

See Also

Your feedback is important to help us improve our knowledge base.

Keywords

query, InA, SAP Cloud for Planning, live, remote, sc4p, c4p, cforp, cloudforplanning,Cloud for Planning, EPM-ODS, Cloud for Analytics, C4P, Cloud4Analytics, CloudforAnalytics, Cloud 4 Planning, HCP, C4A, BOC, SAPBusinessObjectsCloud, BusinessObjectsCloud, BOBJ, BOBJcloud, BOCloud., BICloud, BO Cloud, SBOC, SAC, SAP BusinessObjects Cloud, Business Objects, SAC, SAP AC, Cloud-Analytics, CloudAnalytics, SAPCloudAnalytics, trace, mds, ina, CORS, debug , KBA , hana cannot allocate enough memory error , memory error when calling from sac , unable to retrieve data from data source , LOD-ANA-LDC-HAN , SAC Live Data Connection HANA , LOD-ANA-PL , Planning , LOD-ANA-BR , SAC Boardroom , LOD-ANA-DES , Story Design & Visualizations , How To

Product

SAP Analytics Cloud 1.0