on 11-02-2023 6:21 PM
Hi Experts,
How to find the application user's running SQL statements in default workload class _SYS_DEFAULT?
Below command is not working...
Is there any direct command ?
##############
`sql
SELECT username
FROM dbc.WorkloadRuleV
WHERE WorkloadName = 'SYS_DEFAULT';
#####################
Please let me know.
Thanks in advance
Hi
Please try the following script for finding active sessions :
select b.USER_NAME, a.WORKLOAD_CLASS_NAME, a.STATEMENT_STRING
from M_ACTIVE_STATEMENTS a
inner join M_CONNECTIONS b
on a.host = b.host
and a.port = b.port
and a.connection_id = b.connection_id
where a.WORKLOAD_CLASS_NAME = '_SYS_DEFAULT';
Hope this helps 🙂You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Again,
As you can see the column name in the script yourself, it is not schema name, but user name. But it is database user under which the statements are executed. If you are looking for application user which are executing the statements using database system user you need to set up traces or look into view M_EXECUTED_STATEMENTS, this will give you overview both of application user & database user & statement strings with executed timestamp information. But probably this view would neither give you the possibility to look for active statements nor workload class.
User | Count |
---|---|
80 | |
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.