@@header

/*
*
*  Author     : Vishal Gupta
*  Purpose    : Display MRP (Managed Recovery Process) Status
*  Version    : 
*  Parameters :                
*
*  Revision History:
*  ===================
*  Date       Author        Description
*  ---------  ------------  -----------------------------------------
*  12-Feb-13  Vishal Gupta  Created
*
*/

Prompt
Prompt   *******************
Prompt   *    MRP Status
Prompt   *******************

COLUMN inst_id             HEADING "I#"                FORMAT 99
COLUMN process             HEADING "Process"           FORMAT a10
COLUMN pid                 HEADING "PID"               FORMAT 999999
COLUMN status              HEADING "Status"            FORMAT a15
COLUMN client_process      HEADING "Client|Process"    FORMAT a10
COLUMN client_pid          HEADING "Client|PID"        FORMAT a10
COLUMN thread#             HEADING "Th#"               FORMAT 999
COLUMN sequence#           HEADING "Seq#"              FORMAT 99999999
COLUMN block#              HEADING "Block#"            FORMAT 9999999999
COLUMN blocks              HEADING "Blocks"            FORMAT 9999999999
COLUMN delay_mins          HEADING "Delay|Mins"        FORMAT 999999
COLUMN known_agents        HEADING "Known|Agents"      FORMAT 999999
COLUMN active_agents       HEADING "Active|Agents"     FORMAT 999999
 
SELECT inst_id
     , process
     , pid
     , status
     , client_process
     , client_pid
     , thread#
     , sequence#
     , block#
     , blocks
     , delay_mins
     , known_agents
     , active_agents
  FROM gv$managed_standby
 WHERE process in ('MRP0','RFS')
--   AND status NOT IN ('IDLE')
    AND thread# <> 0
   ORDER BY process
          --, inst_id
          , thread#
          , sequence#
;

@@footer
