post_patch_check shell script

cat /etc/oratab|grep '/opt/oracle/product/'|grep -v agent|awk -F: ' { print $1 }'|while read line
do
. oraenv<<!
$line
!
sqlplus -s '/as sysdba'<<!
set lin 120
select instance_name, version, status,to_char(startup_time,'DD/MON/YYYY HH24:MI:SS'), logins from v\$instance;
select action||'  '||COMMENTS||'  '||ACTION_TIME cpu_apply_history from dba_registry_history where comments like 'PSU%' order by 1;
!
done

Comments

Popular posts from this blog

finding fragmentation at table level and tablespace level in Oracle and steps to remove them

Oracle Custom Procedure for defragmentation Partition tables and their associated index and move non partitioned table

Installing DBMS_JAVA package in Oracle and calling UTL_DBWS web services through Oracle database