2026-03-12 20:23:15
This commit is contained in:
54
csierra/cs_top_range.sql
Normal file
54
csierra/cs_top_range.sql
Normal file
@@ -0,0 +1,54 @@
|
||||
----------------------------------------------------------------------------------------
|
||||
--
|
||||
-- File name: cs_top_range.sql
|
||||
--
|
||||
-- Purpose: Top Active SQL as per Active Sessions History ASH - time range
|
||||
--
|
||||
-- Author: Carlos Sierra
|
||||
--
|
||||
-- Version: 2022/08/17
|
||||
--
|
||||
-- Usage: Execute connected to PDB or CDB
|
||||
--
|
||||
-- Example: $ sqlplus / as sysdba
|
||||
-- SQL> @cs_top_range.sql
|
||||
--
|
||||
-- Notes: *** Requires Oracle Diagnostics Pack License ***
|
||||
--
|
||||
-- Developed and tested on 12.1.0.2.
|
||||
--
|
||||
---------------------------------------------------------------------------------------
|
||||
--
|
||||
@@cs_internal/cs_primary.sql
|
||||
@@cs_internal/cs_cdb_warn.sql
|
||||
@@cs_internal/cs_set.sql
|
||||
@@cs_internal/cs_def.sql
|
||||
@@cs_internal/cs_file_prefix.sql
|
||||
--
|
||||
DEF cs_script_name = 'cs_top_range';
|
||||
DEF cs_script_acronym = 'tr.sql | ';
|
||||
--
|
||||
DEF cs_top = '30';
|
||||
--
|
||||
SELECT '&&cs_file_prefix._&&cs_script_name.' cs_file_name FROM DUAL;
|
||||
--
|
||||
DEF cs_hours_range_default = '1';
|
||||
@@cs_internal/cs_sample_time_from_and_to.sql
|
||||
@@cs_internal/cs_snap_id_from_and_to.sql
|
||||
--
|
||||
@@cs_internal/cs_spool_head.sql
|
||||
PRO SQL> @&&cs_script_name..sql "&&cs_sample_time_from." "&&cs_sample_time_to."
|
||||
@@cs_internal/cs_spool_id.sql
|
||||
--
|
||||
@@cs_internal/cs_spool_id_sample_time.sql
|
||||
--
|
||||
@@cs_internal/cs_top_activity_internal_range.sql
|
||||
@@cs_internal/cs_top_internal_foot.sql
|
||||
--
|
||||
PRO
|
||||
PRO SQL> @&&cs_script_name..sql "&&cs_sample_time_from." "&&cs_sample_time_to."
|
||||
--
|
||||
@@cs_internal/cs_spool_tail.sql
|
||||
@@cs_internal/cs_undef.sql
|
||||
@@cs_internal/cs_reset.sql
|
||||
--
|
||||
Reference in New Issue
Block a user