乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      Oracle實驗(四) - 開機自動啟動腳本

       芥納須彌 2015-05-08


      啟動腳本代碼

      復制代碼
      #!/bin/bash
      #
      # /etc/init.d/oracledb
      #
      # Run-level Startup script for the Oracle Instance, Listener, and 
      # Web Interface
      
      
      export ORACLE_HOME=/your/oracle/home/goes/here
      export ORACLE_SID=oraclesidgoeshere
      export PATH=$PATH:$ORACLE_HOME/bin
      ORA_OWNR="oracleownergoeshere"
      # 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 -- startup, shutdown, 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/lsnrctl start"
      su $ORA_OWNR -c $ORACLE_HOME/bin/dbstart
      touch /var/lock/oracle
      
      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/lsnrctl stop"
      su $ORA_OWNR -c $ORACLE_HOME/bin/dbshut
      rm -f /var/lock/oracle
      
      su $ORA_OWNR -c “$ORACLE_HOME/bin/emctl stop dbconsole”
      echo "OK"
      ;;
      reload|restart)
      $0 stop
      $0 start
      ;;
      *)
      echo "Usage: `basename $0` start|stop|restart|reload"
      exit 1
      esac
      exit 0
      復制代碼

      //script中有兩行的引號有問題.把引號改一下.就可以.

      另原腳本中無isqlplus的啟動.可自行加入:

      su $ORA_OWNR -c “$ORACLE_HOME/bin/isqlplusctl start”

      su $ORA_OWNR -c “$ORACLE_HOME/bin/isqlplusctl stop”

      如不加入從客戶端瀏覽器中無法訪問.也可以手動啟動.

       

      將這個文件放到指定的位置并讓它可執(zhí)行, 將它連接到所有的運行級:

      #chmod 755 /etc/init.d/oracledb
      #update-rc.d oracledb defaults 99

      如果你希望在系統(tǒng)啟動時啟動你創(chuàng)建的所有數(shù)據(jù)庫實例,那么需要修改 /etc/oratab 文件. 下面是一個例子:

      oracle:/opt/oracle/:N

      修改為

      oracle:/opt/oracle:Y

        本站是提供個人知識管理的網(wǎng)絡存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權內(nèi)容,請點擊一鍵舉報。
        轉藏 分享 獻花(0

        0條評論

        發(fā)表

        請遵守用戶 評論公約

        類似文章 更多