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

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