zoukankan      html  css  js  c++  java
  • Oracle 配置

    Oracle 配置
    
    Oracle 开关机配置
    vim /data/oracle/product/11.2.0/dbhome_1/bin/dbstart
    vim /data/oracle/product/11.2.0/dbhome_1/bin/dbshut
    
    
    
    
    vim /etc/oratab
    orcl:/data/oracle/product/11.2.0/dbhome_1:Y
    
    
    
    开机自启动脚本
    
    #! /bin/bash
    # oracle: Start/Stop Oracle Database 11g R2
    #
    # chkconfig: 345 90 10
    # description: The Oracle Database is an Object-Relational Database Management System.
    #
    # processname: oracle
    . /etc/rc.d/init.d/functions
    LOCKFILE=/var/lock/subsys/oracle
    ORACLE_HOME=/data/oracle/product/11.2.0/dbhome_1     # 注意Oracle的家目录
    ORACLE_USER=oracle
    case "$1" in
    'start')
       if [ -f $LOCKFILE ]; then
          echo $0 already running.
          exit 1
       fi
       echo -n $"Starting Oracle Database:"
       su - $ORACLE_USER -c "$ORACLE_HOME/bin/lsnrctl start"
       su - $ORACLE_USER -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME"
       su - $ORACLE_USER -c "$ORACLE_HOME/bin/emctl start dbconsole"
       touch $LOCKFILE
       ;;
    'stop')
       if [ ! -f $LOCKFILE ]; then
          echo $0 already stopping.
          exit 1
       fi
       echo -n $"Stopping Oracle Database:"
       su - $ORACLE_USER -c "$ORACLE_HOME/bin/lsnrctl stop"
       su - $ORACLE_USER -c "$ORACLE_HOME/bin/dbshut"
       su - $ORACLE_USER -c "$ORACLE_HOME/bin/emctl stop dbconsole"
       rm -f $LOCKFILE
       ;;
    'restart')
       $0 stop
       $0 start
       ;;
    'status')
       if [ -f $LOCKFILE ]; then
          echo $0 started.
          else
          echo $0 stopped.
       fi
       ;;
    *)
       echo "Usage: $0 [start|stop|status]"
       exit 1
    esac
    exit 0
    

      

  • 相关阅读:
    MXNet.gluon——图像I/O
    ECCV2018 论文简析 Oral_1 持续更新
    hdu 3123 GCC
    hdu 2481 Toy
    hdu 3441 Rotation
    hdu 1812 Count the Tetris
    hdu 3923 Invoker
    hdu 1352 I Conduit!
    2013 ACM-ICPC长沙赛区全国邀请赛——Bottles Arrangement
    2013 ACM-ICPC长沙赛区全国邀请赛—Special equations
  • 原文地址:https://www.cnblogs.com/wenyule/p/12734765.html
Copyright © 2011-2022 走看看