@@header

/*
*
*  Author     : Vishal Gupta
*  Purpose    : Display Online/Standby Redo log members
*  Version    : 
*  Parameters : None
*               
*
*  Revision History:
*  ===================
*  Date       Author        Description
*  ---------  ------------  -----------------------------------------
*  17-AUG-15  Vishal Gupta  Skip 1 line on redolog type
*  14-JUL-14  Vishal Gupta  Created
*
*
*/



/************************************
*  INPUT PARAMETERS
************************************/


/************************************
*  CONFIGURATION PARAMETERS
************************************/

Prompt 
Prompt ************************
Prompt * Redologs Information
Prompt ************************

COLUMN type            HEADING "Redo|Log|Type"               FORMAT a7
COLUMN group#          HEADING "Group#"                      FORMAT 9999
COLUMN thread#         HEADING "Thread#"                     FORMAT 9999
COLUMN status          HEADING "Status"                      FORMAT a10
COLUMN member          HEADING "Member"                      FORMAT a100

BREAK ON type SKIP 1 ON thread# ON group# 

SELECT 'Online' type
    , l.thread#
    , l.group#
    , l.status
    , f.member||'('||l.bytes/1024/1024||')' member
  FROM v$log l 
       JOIN v$logfile f ON f.group# = l.group# 
UNION ALL  
SELECT 'Standby' type
    , l.thread#
    , l.group#
    , l.status
    , f.member||'('||l.bytes/1024/1024||')' member
  FROM v$standby_log l
       JOIN v$logfile f ON f.group# = l.group# 
ORDER BY type, thread# , group#
;
  
@@footer

