select b.SQL_CHILD_NUMBER,a.SQL_TEXT,a.SQL_FULLTEXT,a.SQL_ID,b.EVENT,b.USERNAME,b.* from gv$sql a,gv$session b
where a.sql_id=b.sql_id
and a.CHILD_NUMBER=b.SQL_CHILD_NUMBER and b.USERNAME not in(‘SYSTEM‘,‘SYS‘)
and b.EVENT not in(‘SQL*Net message from client‘,‘SQL*Net message to client‘)
order by 1
exec DBMS_STATS.GATHER_TABLE_STATS(‘stg‘,‘T_PRINT_LABEL‘);
grant select on T_PRINT_LABEL to public;
原文地址:https://www.cnblogs.com/Snowfun/p/12096007.html
时间: 2024-11-11 06:09:31