Oacle 시동

4540 단어 Oacle
、、
 
http://www.xifenfei.com/638.html #!/bin/bash #chkconfig: 345 99 10 #description:oracle #***************** (oradb )********************** # : 、 、 # 、 root /etc/oratab : # $ vi /etc/oratab # orcl:/u01/oracle:N (ORACLE_SID:ORACLE_HOME:N) # : # orcl:/u01/oracle:Y N Y # 、 Oracle $ORACLE_HOME/bin/dbstart dbshut : # ORACLE_HOME_LISTNER=$1 # : # ORACLE_HOME_LISTNER=$ORACLE_HOME # 、 oradb /etc/rc.d/init.d/ # :oradb, /etc/rc.d/init.d/ # 、 、 、 # # chown oracle.oinstall /etc/rc.d/init.d/oradb # # chmod 775 /etc/rc.d/init.d/oradb # # chkconfig –add oradb #------------ oracle ----------- # chkconfig # K99oradb # ln -s  /etc/rc.d/init.d/oradb  /etc/rc.d/rc0.d/K01oradb #------------------- ---------------------------- # # chkconfig –list oradb #-------------- ( )--------------- # chown oracle.oinstall /etc/rc.d/init.d/oradb # chmod 775 /etc/rc.d/init.d/oradb # chkconfig –add oradb # ln -s  /etc/rc.d/init.d/oradb  /etc/rc.d/rc0.d/K01oradb # chkconfig –list oradb #-------------------- --------------------------- #***************** ( )**********************     #************** ( )******************* # : 、 、 oradb # 1、 $ORACLE_HOME/bin dbstart , 78 , #    ORACLE_HOME_LISTNER=$ORACLE_HOME # 2、 /etc/oratab , #    ( :$ORACLE_SID:$ORACLE_HOME:Y/N) #    orcl:/u/oracle/product/10.2.0/db_1:Y # 3、 /etc/rc.local su - oracle -c 'dbstart' #***************** ( )********************** # description: Startup Script for Oracle Databases # /etc/rc.d/init.d/oradb export ORACLE_BASE= /u01 export ORACLE_HOME= /u01/oracle export ORACLE_SID=orcl export PATH=$PATH:$ORACLE_HOME /bin ORA_OWNR= "oracle" # if the executables do not exist -- display error if [ ! -f $ORACLE_HOME /bin/dbstart -o ! -d $ORACLE_HOME ] then echo "Oracle startup: cannot start" exit 1 fi # depending on parameter -- start, stop, restart # of the instance and listener or usage display case "$1" in start) # Oracle listener and instance startup echo -n "Starting Oracle: " su - $ORA_OWNR -c "$ORACLE_HOME/bin/dbstart" touch /var/lock/subsys/oradb su - $ORA_OWNR -c "$ORACLE_HOME/bin/emctl start dbconsole" echo "OK" ;; stop) # Oracle listener and instance shutdown echo -n "Shutdown Oracle: " su - $ORA_OWNR -c "$ORACLE_HOME/bin/emctl stop dbconsole" su - $ORA_OWNR -c "$ORACLE_HOME/bin/dbshut" rm -f /var/lock/subsys/oradb echo "OK" ;; reload|restart) $0 stop $0 start ;; *) echo "Usage: `basename $0` start|stop|restart|reload" exit 1 esac exit 0

좋은 웹페이지 즐겨찾기