on 07-05-2023 6:08 PM
Hi Experts,
How to find out the executed SQL statements of a particular user in HANA 2.0 SP05.
Can it be found in standard SQL statements?..date and timewise.
Please share the query.
Thanks in advance
you can activate SQL trace on specific user, see 2119087 - How-To: Configuring SAP HANA Traces
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It really depends a lot on what you need, - Here's a starting point - the following will give you the statement history from the plan cache:
SELECT last_execution_timestamp, statement_string,execution_count,avg_execution_time FROM "SYS"."M_SQL_PLAN_STATISTICS" where user_name = 'username-goes-here' order by last_execution_timestamp desc;
If you want a deeper history, you probably have to enable some level of auditing if you have not already.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
9 | |
9 | |
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.