如题!
第一个实例已经启动,但第二个实例不知道是什么状态。
怎么检查是否启动?我要启动它应该如何处理?
用哪些命令,请详细一点说一步一步的操作,谢谢!

解决方案 »

  1.   

    http://topic.csdn.net/t/20040429/17/3022021.html
      

  2.   

    export ORACLE_SID=db1
    sqlplus "/ as sysdba" <<eof
    startup
    exit
    eofexport ORACLE_SID=db2
    sqlplus "/ as sysdba" <<eof
    startup
    exit
    eof
      

  3.   

    方法一:
    export ORACLE_SID=DB1
    sqlplus ‘/as sysdba' <<!
    startup
    exit
    !
     
    export ORACLE_SID=DB2
    sqlplus ‘/as sysdba' <<!
    startup
    exit
    !
    如果是不同的监听端口,启动监听端口的方法是lsnctl start listener1/linsterner2/
    关于listener?的配置可以通过lsnctl status查看配置文件,然后再编辑他就好了。
     
    如果是同一端口,只需启动lsnctl start就好了。
     
    关于web配置的启动,可以更改SID启动
    export ORACLE_SID=DB1
    emctl start dbconsole方法二:(开机自动启动oracle数据实例)
    修改/etc/oratab文件,将需要启动的实例名称后面的N修改为Y,如果要全部都启动,则使用
    :g/N/s//Y/g将全部N修改为Y
    然后编写个shell脚本
    cd /etc/init.dvi oracle.sh#!/bin/bash
    case "$1" in
    start)
        date >>/var/log/oracle
        echo -e "\nThe oracle will start\n">/var/log/oracle
        su - oracle -c "lsnrctl start;dbstart;emctl start dbconsole;exit;">>/var/log/oracle
        echo -e "The oracle started">>/var/log/oracle
    ;;
    stop)
         date >>/var/log/oracle
        echo -e "\nThe oracle will stop\n">/var/log/oracle
        su - oracle -c "dbshut;emctl stop dbconsole;lsnrctl stop;exit;">>/var/log/oracle
        echo -e "The oracle stoped">>/var/log/oracle
    ;;
    restart)
        $0 stop
        $0 start
    ;;
    *)
        echo -e "usage $0 {start|stop|restart}"
        exit 1
    esac
    保存。
    chmod +x oracle.sh
    ln -s oracle.sh /etc/rc.d/rc3.d/S99oracle
    ln -s oracle.sh /etc/rc.d/rc5.d/S99oracle
    ln -s oracle.sh /etc/rc.d/rc0.d/K01oracle
    ln -s oracle.sh /etc/rc.d/rc6.d/K01oracle
    这样就可以实现oracle多实例自动启动了。