Thursday, February 4, 2016

1734388 - SAP HANA DB: Record reproducible scenario

Symptom
Recording an application scenario to reproduce it on another HANA instance, e.g. for support purposes.


Other Terms
HANA DB, In-memory database, SQLTrace


Reason and Prerequisites
Make sure you have:
- A database user with the MONITORING role
- Shell access (<sid>adm user)
- The HANA DB Admin Guide


Solution
Steps to record the scenario:

1. Turn on SQLTrace to record all SQL statements arriving at the HANA DB.
If your scenario is run by a single user, you can restrict the SQLTrace to only record statements from that user.
Details on how to configure SQLTrace can be found in the HANA DB Admin Guide.

2. Run your scenario on an application level (e.g. on Business Warehouse, Business Object Explorer, HANA DB Studio or any other application using HANA DB).

3. Turn off SQLTrace.
The SQLTrace file is located on your machine in the trace directory (/usr/sap/<SID>/<INSTANCE>/<host>/trace), or in the HANA DB Studio under "Diagnosis Files". If the default filename was kept, it will start with "sqltrace_".

4. Find out which tables and views are needed to re-run the scenario. Starting with HANA DB 1.0 Revision 36, the "sqlTraceAnalyzer.py" utility is shipped with the database for this purpose.
- Log on to the machine with the <sid>adm user
- Run "cdpy" to change to the python_support directory
- Use the utility to find out which tables and views are used by your recorded scenario.
- Example:
  $ python sqlTraceAnalyzer.py <path-to-recorded-sqltrace> /tmp/sqldump.txt /tmp/usedTables.txt
  The names of the used tables can then be found in /tmp/usedTables.txt.

5. Export the used tables and views.
Please find instructions on how to export tables and views in the HANA DB Admin Guide.

6. Move the exported tables, views, and SQLTrace file to the machine that will be reproducing the scenario.




Header Data

Released On 31.07.2012 07:45:11
Release Status Released for Customer
Component HAN-DB SAP HANA Database
Priority Recommendations / Additional Info
Category Consulting

No comments:

Post a Comment