SELECT
d.dest_name, DECODE (d.status, 'VALID',3, 'DEFERRED', 2, 'ERROR', 1, 0) AS status,
d.log_sequence,
d.error
FROM v$archive_dest d , v$database db
WHERE d.dest_name = '{#DEST_NAME}' AND d.status != 'INACTIVE' AND db.log_mode = 'ARCHIVELOG';