@@header

/*
*
*  Author     : Vishal Gupta
*  Purpose    : Display the event name
*  Version    : 10.1 and above
*  Parameters : 1 - Event Name or Description (Use % as wildcard and \ as escape character)
*               
*
*  Revision History:
*  ===================
*  Date       Author        Description
*  ---------  ------------  -----------------------------------------
*  22-Jul-12  Vishal Gupta  Created
*
*/


DEFINE eventname="&&1"

Prompt
Prompt   ***************************************************************************************************
Prompt   *    ALL Event Names like '&&eventname'
Prompt   ***************************************************************************************************

COLUMN Event#             HEADING "Event#"              FORMAT 9999
COLUMN wait_class         HEADING "Wait|Class"          FORMAT a15
COLUMN name               HEADING "Event Name"          FORMAT a40
COLUMN parameter1         HEADING "Parameter1"          FORMAT a30
COLUMN parameter2         HEADING "Parameter2"          FORMAT a30
COLUMN parameter3         HEADING "Parameter3"          FORMAT a30
 
SELECT e.event#
     , e.wait_class
     , e.name
     , e.parameter1
     , e.parameter2
     , e.parameter3
  FROM v$event_name e
WHERE ( UPPER(e.name)          like UPPER('&&eventname') ESCAPE '\'
        OR UPPER(e.wait_class) like UPPER('&&eventname') ESCAPE '\')
ORDER BY UPPER(e.name)  
;
        
UNDEFINE eventname

@@footer
