cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Last Used Date for a Procedure in SAP HANA

mitko1994
Participant
0 Likes
412

Hello,

I have some Procedures defined in a HANA schema and would like to know whether they are used or not.

Can someone help me with the system tables/views I have to use in order to find whether and when a Procedure was last executed.

Regards,

Dimitar

Accepted Solutions (0)

Answers (1)

Answers (1)

Vitaliy-R
Developer Advocate
Developer Advocate
0 Likes

As a starting point, would this work for you

select statement_string, last_execution_timestamp, * 
from M_SQL_PLAN_CACHE
where upper(statement_string) like 'CALL%CHESSBOARD%';

assuming you call procedures via the `CALL` statement and the schema in this example is the `CHESSBOARD`.

VitaliyR_0-1732734730455.png

 

mitko1994
Participant
0 Likes
Thanks, Vitaliy. I ran the suggested query for the schemas in question and I didn't get back any records. I guess they were never called. These schemas were not created by me, therefore I have no idea who developed them and how they were used.