SAP ASE uses the monCachedStatement table to monitor cursors.
1 – batch statement
2 – cursor statement
3 – dynamic statement
select InstanceID, SSQLID, Hashkey, UseCount, StmtType from monCachedStatement
InstanceID SSQLID Hashkey UseCount StmtType ---------- ----------- ----------- ----------- ---------- 0 329111220 1108036110 0 2 0 345111277 1663781964 1 1
select show_cached_text(329111220) -------------------------------------- select id from sysroles
See, Monitoring Tables, in the Reference Manual: Tables and the Performance and Tuning Series: Monitoring Tables.