67 lines
1.7 KiB
SQL
67 lines
1.7 KiB
SQL
@@header
|
|
|
|
/*
|
|
*
|
|
* Author : Vishal Gupta
|
|
* Purpose : Display top activity from ASH
|
|
* Parameters : 1 - Number of MINUTES (Default 5min))
|
|
* 2 - Top Row Count Default 10)
|
|
*
|
|
* Revision History:
|
|
* ===================
|
|
* Date Author Description
|
|
* --------- ------------ -----------------------------------------
|
|
* 02-Apr-13 Vishal Gupta Created
|
|
*
|
|
*/
|
|
|
|
|
|
/************************************
|
|
* INPUT PARAMETERS
|
|
************************************/
|
|
UNDEFINE MINUTES
|
|
UNDEFINE TOPROWCOUNT
|
|
UNDEFINE INST_ID
|
|
|
|
DEFINE MINUTES="&&1"
|
|
DEFINE TOPROWCOUNT="&&2"
|
|
DEFINE INST_ID='&&3'
|
|
|
|
|
|
set term off
|
|
COLUMN _MINUTES NEW_VALUE MINUTES NOPRINT
|
|
COLUMN _TOPROWCOUNT NEW_VALUE TOPROWCOUNT NOPRINT
|
|
COLUMN _INST_ID NEW_VALUE INST_ID NOPRINT
|
|
|
|
SELECT DECODE('&&MINUTES','','5','&&MINUTES') "_MINUTES"
|
|
, DECODE('&&TOPROWCOUNT','','5','&&TOPROWCOUNT') "_TOPROWCOUNT"
|
|
, DECODE('&&INST_ID','','%','&&INST_ID') "_INST_ID"
|
|
from dual;
|
|
|
|
set term on
|
|
|
|
|
|
PROMPT *****************************************************************
|
|
PROMPT * ASH - Top Activity
|
|
PROMPT *
|
|
PROMPT * Input Parameters
|
|
PROMPT * - Minutes = '&&MINUTES'
|
|
PROMPT * - Top Row Count = '&&TOPROWCOUNT'
|
|
PROMPT * - Instance ID = '&&INST_ID'
|
|
PROMPT *****************************************************************
|
|
|
|
PROMPT
|
|
@@ash_top_services '&&MINUTES' '&&TOPROWCOUNT' '&&INST_ID'
|
|
PROMPT
|
|
@@ash_top_users '&&MINUTES' '&&TOPROWCOUNT' '&&INST_ID'
|
|
PROMPT
|
|
@@ash_top_modules '&&MINUTES' '&&TOPROWCOUNT' '&&INST_ID'
|
|
PROMPT
|
|
@@ash_top_actions '&&MINUTES' '&&TOPROWCOUNT' '&&INST_ID'
|
|
PROMPT
|
|
@@ash_top_clients '&&MINUTES' '&&TOPROWCOUNT' '&&INST_ID'
|
|
PROMPT
|
|
@@ash_top_sessions '&&MINUTES' '&&TOPROWCOUNT' '&&INST_ID'
|
|
|
|
@@footer
|