alert_path.sql


-- ************************************************************************************************************
-- * Filename           : alert_path.sql
-- * Author             : Saravanakumar K
-- * Description        : This script with show alert logfile path and second session with give code to ssh in RAC
-- * Usage              : @alert_path.sql
-- * Version            : v1
-- *************************************************************************************************************
col Alert_Path for a120
select inst_id,value from gv$diag_info where name like '%Diag Trace%' order by 1;
SELECT
    'ssh '
    || i.host_name
    || ' '
    || 'cat '
    || d.value
    || '/alert_'
    || i.instance_name
    || '.log > alert_'
    || i.instance_name
    || '.log' as "Alert_Path"
FROM
    gv$diag_info d,
    gv$instance  i
WHERE
    d.name LIKE '%Diag Trace%'
    AND d.inst_id = i.inst_id
ORDER BY
    1;
clear col

Comments

Popular posts from this blog

Goldengate initial load options - File to Replicat

Reset RMAN configuration all set to default

Mail server configuration on RHEL using gmail