Thursday, December 7, 2017

2) # "VERIFY INSTALLED PATCHES"

2) # "VERIFY INSTALLED PATCHES"

sqlplus -S /nolog <<EOF
conn / as sysdba
set pages 700 lines 700 timing on colsep '|'
alter session set nls_date_format='dd/mm/yyyy';
prompt ##############################################################
prompt # Status                                                     #
prompt ##############################################################
exec dbms_qopatch.get_sqlpatch_status;
col time for a25
col "Target" for a30
col "Action" for a70
col action_time for a40
col product for a50
col version for a30
col status for a30
col comments for a30
prompt Registry History
select to_char(action_time,'dd/mm/yyyy HH24:MI:SS') time
  , namespace || ' ' || version as "Target"
  , action || ' ' || comments as "Action"
  , case when action_time < sysdate - 120 then 'Need Patch Apply' else 'Updated Recently' end as "Patch Info"
from dba_registry_history;
prompt ##############################################################
prompt # PSU History                                                #
prompt ##############################################################
col action for a20
col version for a15
select to_char(action_time,'dd/mm/yyyy HH24:MI:SS') as TIME
  , ACTION
  , NAMESPACE
  , VERSION
  , BUNDLE_SERIES
  , COMMENTS
from sys.registry\$history
where bundle_series = 'PSU'
order by action_time;
prompt ##############################################################
prompt # Product Components                                         #
prompt ##############################################################
SELECT PRODUCT
  , VERSION
  , status
FROM SYS.PRODUCT_COMPONENT_VERSION;
quit;
EOF

No comments:

Post a Comment