Search This Blog

Friday, December 23, 2011

oracle start script

#!/usr/bin/ksh
stty istrip
stty erase ^?
ulimit -n 1024
PATH=/usr/bin:/usr/ccs/bin:.:/etc:/src:/usr/sbin:/usr/ucb:/usr/openwin/bin/xview:/usr/local/bin export PATH
EDITOR=vi;
export EDITOR
ENV=$HOME/.kshrc
#PS1="oracle@"'$ORACLE_SID'":"'$PWD'"=>"
ORACLE_SID=db1
export ORACLE_SID
export myhost=`hostname`
PS1='$myhost: $ORACLE_SID $PWD $'
LD_LIBRARY_PATH=/ora01/app/oracle/product/10.2.0/lib
export LD_LIBRARY_PATH
export ORATAB=/var/opt/oracle/oratab
export TNS_ADMIN=/ora01/app/oracle/product/10.2.0/network/admin
export ORACLE_BASE=/ora01/app/oracle
export ORACLE_HOME=/ora01/app/oracle/product/10.2.0
PATH=$PATH:$ORACLE_HOME/bin:.
export PATH
export ORACLE_SID=db1
sqlplus /nolog <connect / as sysdba
startup
EOF1
export ORACLE_SID=db2
sqlplus /nolog <connect / as sysdba
startup
EOF1
export ORACLE_SID=db3
sqlplus /nolog <connect / as sysdba
startup
EOF1
export ORACLE_SID=db4
sqlplus /nolog <connect / as sysdba
startup
EOF1
export ORACLE_SID=db5
sqlplus /nolog <connect / as sysdba
startup
EOF1
lsnrctl start
cd /ora01/app/oracle/product/agent10g/bin
./emctl stop agent
sleep 30
./emctl start agent
exit 0

No comments:

Post a Comment