startup_db shell script
cat /etc/oratab|grep '/opt/oracle/product'|grep -v '*'|grep -v '#'|grep -v DG|grep -v agent|awk -F: ' { print $1 }'|while read line
do
. oraenv<<EOF
$line
EOF
echo "**************************************************"
sqlplus -s '/as sysdba'<<!
startup
select a.name, a.open_mode, b.status, b.startup_time from v\$database a, v\$instance b;
!
echo "**************************************************"
done
do
. oraenv<<EOF
$line
EOF
echo "**************************************************"
sqlplus -s '/as sysdba'<<!
startup
select a.name, a.open_mode, b.status, b.startup_time from v\$database a, v\$instance b;
!
echo "**************************************************"
done
Comments
Post a Comment