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
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
Post a Comment