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


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