@@header

/*
*
*  Author  : Vishal Gupta
*  Purpose : Display ASM Operations
*
*  Revision History:
*  ===================
*  Date       Author        Description
*  ---------  ------------  -----------------------------------------
*  16-APR-13  Vishal Gupta  Created
*
*/


PROMPT ************************************
PROMPT *** A S M    O P E R A T I O N S ***
PROMPT ************************************

COLUMN name              HEADING "DiskGroup"           FORMAT a20
COLUMN inst_id           HEADING "I#"                  FORMAT 99
COLUMN group_number      HEADING "G#"                  FORMAT 99
COLUMN operation         HEADING "Operation"           FORMAT a10
COLUMN state             HEADING "State"               FORMAT a8
COLUMN power             HEADING "Power"               FORMAT 99999
COLUMN actual            HEADING "Actual"              FORMAT 999999
COLUMN sofar             HEADING "SoFar"               FORMAT 9,999,999,999
COLUMN est_work          HEADING "Estimated|Work"      FORMAT 9,999,999,999
COLUMN est_rate          HEADING "Estimated|Rate"      FORMAT 999,999
COLUMN est_minutes       HEADING "Estimated|Minutes"   FORMAT 999,999
COLUMN error_code        HEADING "Error Code"          FORMAT a20

SELECT g.name
     , o.*
  FROM gv$asm_operation o
     , v$asm_diskgroup_stat g
 WHERE g.group_number = o.group_number  
   AND o.state = 'RUN'
 ORDER BY o.inst_id
        , g.name
        
;

@@footer
