set linesize 300
set pagesize 3000
ALTER SESSION SET NLS_DATE_FORMAT='DDMMYYYY HH24:MI:SS';

column member format a70
column DBID format a15
column IS_RECOVERY_DEST_FILE format a22

column DEST_NAME format a22
column DESTINATION format a22
column ALTERNATE format a22
column DEST_ID format 999
column VALID_NOW format a10
column STATUS format a8


SET FEED OFF
set HEADING off
SELECT '---------V$LOG--------' FROM DUAL;
SET FEED ON
set HEADING on

select GROUP#, THREAD#, SEQUENCE#, BYTES, MEMBERS, ARCHIVED, STATUS, FIRST_CHANGE#, FIRST_TIME
from v$log
ORDER BY THREAD#, GROUP#;

SET FEED OFF
set HEADING off
SELECT '---------V$LOGFILE--------' FROM DUAL;
SET FEED ON
set HEADING on

column STATUS format a8
select GROUP#, STATUS, TYPE, MEMBER, IS_RECOVERY_DEST_FILE
from v$logfile
order by type, group#;

--SET FEED OFF
--set HEADING off
--SELECT '---------V$STANDBY_LOG--------' FROM DUAL;
--SET FEED ON
--set HEADING on

--SELECT GROUP#, DBID,THREAD#, SEQUENCE#, BYTES, USED, ARCHIVED, STATUS, FIRST_CHANGE#, FIRST_TIME, LAST_CHANGE#, LAST_TIME
--FROM V$STANDBY_LOG
--ORDER BY THREAD#, GROUP#;

SET FEED OFF
set HEADING off
SELECT '---------V$ARCHIVE_DEST--------' FROM DUAL;
SET FEED ON
set HEADING on

column STATUS format a8
column VALID_TYPE format a16
column VALID_ROLE format a10
column SCHEDULE format a8
SELECT DEST_ID, DEST_NAME, STATUS, SCHEDULE, DESTINATION, ALTERNATE, VALID_NOW, VALID_TYPE, VALID_ROLE, FAILURE_COUNT FAILURE_CNT
FROM V$ARCHIVE_DEST
where DESTINATION is not null
order by dest_id;
