自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

oracle自動(dòng)啟動(dòng)多個(gè)數(shù)據(jù)實(shí)例的方法

數(shù)據(jù)庫(kù) Oracle
oracle數(shù)據(jù)庫(kù)自動(dòng)啟動(dòng)多個(gè)數(shù)據(jù)實(shí)例的話,應(yīng)該如何實(shí)現(xiàn)呢?下文就教您幾個(gè)oracle自動(dòng)啟動(dòng)多個(gè)數(shù)據(jù)實(shí)例的方法,供您參考。

oracle自動(dòng)啟動(dòng)數(shù)據(jù)庫(kù)實(shí)例的方法很多,下面就為您介紹最常用的兩種oracle自動(dòng)啟動(dòng)多個(gè)數(shù)據(jù)實(shí)例的方法,希望對(duì)您能有所幫助。

現(xiàn)有一臺(tái)機(jī)器,需要oracle自動(dòng)啟動(dòng)多個(gè)數(shù)據(jù)實(shí)例,如DB1、DB2
方法一:

  1. export ORACLE_SID=DB1 
  2. sqlplus ‘/as sysdba' <<!  
  3. startup  
  4. exit  
  5. !  
  6.    
  7. export ORACLE_SID=DB2 
  8. sqlplus ‘/as sysdba' <<!  
  9. startup  
  10. exit  

如果是不同的監(jiān)聽端口,啟動(dòng)監(jiān)聽端口的方法是lsnctl start listener1/linsterner2/
關(guān)于listener?的配置可以通過lsnctl status查看配置文件,然后再編輯他就好了。
 
如果是同一端口,只需啟動(dòng)lsnctl start就好了。
 
關(guān)于web配置的啟動(dòng),可以更改SID啟動(dòng)

  1. export ORACLE_SID=DB1 
  2. emctl start dbconsole 

方法二:(開機(jī)自動(dòng)啟動(dòng)oracle數(shù)據(jù)實(shí)例)
修改/etc/oratab文件,將需要啟動(dòng)的實(shí)例名稱后面的N修改為Y,如果要全部都啟動(dòng),則使用
:g/N/s//Y/g將全部N修改為Y
然后編寫個(gè)shell腳本

  1. cd /etc/init.d  
  2.  
  3. vi oracle.sh  
  4.  
  5. #!/bin/bash  
  6. case "$1" in  
  7. start)  
  8.     date >>/var/log/oracle  
  9.     echo -e "\nThe oracle will start\n">/var/log/oracle  
  10.     su - oracle -c "lsnrctl start;dbstart;emctl start dbconsole;exit;">>/var/log/oracle  
  11.     echo -e "The oracle started">>/var/log/oracle  
  12. ;;  
  13. stop)  
  14.      date >>/var/log/oracle  
  15.     echo -e "\nThe oracle will stop\n">/var/log/oracle  
  16.     su - oracle -c "dbshut;emctl stop dbconsole;lsnrctl stop;exit;">>/var/log/oracle  
  17.     echo -e "The oracle stoped">>/var/log/oracle  
  18. ;;  
  19. restart)  
  20.     $0 stop  
  21.     $0 start  
  22. ;;  
  23. *)  
  24.     echo -e "usage $0 {start|stop|restart}"  
  25.     exit 1  
  26. esac  

保存。

  1. chmod +x oracle.sh  
  2. ln -s oracle.sh /etc/rc.d/rc3.d/S99oracle  
  3. ln -s oracle.sh /etc/rc.d/rc5.d/S99oracle  
  4. ln -s oracle.sh /etc/rc.d/rc0.d/K01oracle  
  5. ln -s oracle.sh /etc/rc.d/rc6.d/K01oracle 

這樣就可以實(shí)現(xiàn)oracle多實(shí)例自動(dòng)啟動(dòng)了。
 

 

 

【編輯推薦】

Oracle轉(zhuǎn)換函數(shù)一覽

Oracle字符串連接的方法

Oracle模糊查詢的實(shí)現(xiàn)

JAVA創(chuàng)建Oracle存儲(chǔ)過程的實(shí)現(xiàn)

Oracle存儲(chǔ)過程的調(diào)試方法

責(zé)任編輯:段燃 來源: 互聯(lián)網(wǎng)
相關(guān)推薦

2010-04-26 11:58:42

2010-04-19 10:00:02

Oracle SQL

2010-11-15 10:02:49

Oracle數(shù)據(jù)庫(kù)重新

2010-11-19 14:42:37

Oracle數(shù)據(jù)庫(kù)啟動(dòng)

2010-04-06 18:04:09

Oracle數(shù)據(jù)庫(kù)

2010-11-19 10:01:08

Oracle創(chuàng)建實(shí)例

2010-11-15 10:24:24

啟動(dòng)Oracle數(shù)據(jù)庫(kù)

2010-04-16 15:24:00

Oracle數(shù)據(jù)

2011-03-25 09:37:17

2011-05-19 13:25:14

Oracle數(shù)據(jù)庫(kù)

2010-04-30 12:09:26

Oracle數(shù)據(jù)庫(kù)

2010-04-02 13:46:30

Oracle數(shù)據(jù)導(dǎo)出

2013-06-09 10:15:09

2013-06-07 10:05:18

2010-03-31 13:03:04

Oracle 基礎(chǔ)知識(shí)

2011-03-29 10:47:49

ORACLE數(shù)據(jù)庫(kù)

2009-07-02 09:35:02

hibernate訪問

2011-07-20 17:02:51

Oracle數(shù)據(jù)庫(kù)

2010-04-14 15:45:49

Oracle 數(shù)據(jù)庫(kù)

2010-04-06 11:30:09

Oracle 數(shù)據(jù)庫(kù)
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)