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

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

Starting background process GTX4 and GLOBAL_TXN_PROCESSES

stick the job to the specific instance in Oracle RAC