2026-03-12 20:23:15

This commit is contained in:
root
2026-03-12 21:23:47 +01:00
parent eab4b36eca
commit 93039b8489
3332 changed files with 699614 additions and 0 deletions

19
timhall/10g/ash.sql Normal file
View File

@@ -0,0 +1,19 @@
-- -----------------------------------------------------------------------------------
-- File Name : https://oracle-base.com/dba/10g/ash.sql
-- Author : Tim Hall
-- Description : Displays the minutes spent on each event for the specified time.
-- Requirements : Access to the V$ views.
-- Call Syntax : @active_session_waits (mins)
-- Last Modified: 21/12/2004
-- -----------------------------------------------------------------------------------
SET VERIFY OFF
SELECT NVL(a.event, 'ON CPU') AS event,
COUNT(*) AS total_wait_time
FROM v$active_session_history a
WHERE a.sample_time > SYSDATE - &1/(24*60)
GROUP BY a.event
ORDER BY total_wait_time DESC;
SET VERIFY ON