linux服務(wù)器開機啟動oracle的設(shè)置方法
1、首先切換到Oracle用戶
[oracle@oracletest ~]$ cd /u01/app/oracle/product/11.2.0/db_1/bin/ -----標紅字體部分數(shù)據(jù)庫可能不一樣,有的是dbhome_1,以自己實際配置目錄為準 [oracle@oracletest bin]$ vi dbstart
LOGMSG="logger -puser.alert -s " trap 'exit' 1 2 3 # for script tracing case $ORACLE_TRACE in T) set -x ;; esac # Set path if path not set (if called from /etc/rc) SAVE_PATH=/bin:/usr/bin:/etc:${PATH} ; export PATH SAVE_LLP=$LD_LIBRARY_PATH # First argument is used to bring up Oracle Net Listener ORACLE_HOME_LISTNER=$ORACLE_HOME ############此處原來是$1,改成$ORACLE_HOME if [ ! $ORACLE_HOME_LISTNER ] ; then echo "ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener" echo "Usage: $0 ORACLE_HOME" else LOG=$ORACLE_HOME_LISTNER/listener.log
2、用root用戶編輯oratab和rc.local
[root@oracletest ~]# vi /etc/oratab # This file is used by ORACLE utilities. It is created by root.sh # and updated by either Database Configuration Assistant while creating # a database or ASM Configuration Assistant while creating ASM instance. # A colon, ':', is used as the field terminator. A new line terminates # the entry. Lines beginning with a pound sign, '#', are comments. # # Entries are of the form: # $ORACLE_SID:$ORACLE_HOME:<N|Y>: # # The first and second fields are the system identifier and home # directory of the database respectively. The third filed indicates # to the dbstart utility that the database should , "Y", or should not, # "N", be brought up at system boot time. # # Multiple entries with the same $ORACLE_SID are not allowed. # # oadb:/u01/app/oracle/product/11.2.0/db_1:Y ###此處原來是N,改為Y [root@oracletest ~]# vi /etc/rc.d/rc.local #!/bin/sh # # This script will be executed *after* all the other init scripts. # You can put your own initialization stuff in here if you don't # want to do the full Sys V style init stuff. touch /var/lock/subsys/local #####在空白處添加下面兩行,其中標紅字體部分數(shù)據(jù)庫可能不一樣,有的是dbhome_1,以自己實際配置目錄為準 su oracle -lc "/u01/app/oracle/product/11.2.0/db_1/bin/lsnrctl start" su oracle -lc /u01/app/oracle/product/11.2.0/db_1/bin/dbstart
經(jīng)過上面兩步操作,數(shù)據(jù)庫服務(wù)器重啟后,數(shù)據(jù)庫也會自動啟動。
總結(jié)
以上所述是小編給大家介紹的linux服務(wù)器開機啟動oracle的設(shè)置方法,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復(fù)大家的。在此也非常感謝大家對腳本之家網(wǎng)站的支持!
如果你覺得本文對你有幫助,歡迎轉(zhuǎn)載,煩請注明出處,謝謝!
- linux下oracle設(shè)置開機自啟動實現(xiàn)方法
- Linux下的Oracle啟動腳本及其開機自啟動
- Linux系統(tǒng)下Oracle數(shù)據(jù)庫的安裝和啟動關(guān)閉操作教程
- 詳解Linux系統(tǒng)中Oracle數(shù)據(jù)庫程序的啟動和關(guān)閉方式
- Linux下啟動Oracle服務(wù)和監(jiān)聽程序步驟
- Linux環(huán)境下重啟Oracle數(shù)據(jù)庫詳細圖文教程
- Linux系統(tǒng)下Oracle數(shù)據(jù)庫監(jiān)聽啟動關(guān)閉命令詳解
- Linux下如何啟動Oracle命令
- Linux系統(tǒng)下啟動/關(guān)閉Oracle數(shù)據(jù)庫
相關(guān)文章
Oracle 數(shù)據(jù)庫導(dǎo)出(exp)導(dǎo)入(imp)說明
exp 將數(shù)據(jù)庫內(nèi)的各對象以二進制方式下載成dmp文件,方便數(shù)據(jù)遷移。2009-02-02MS Server和Oracle中對NULL處理的一些細節(jié)差異
SQL Server和Oracle中對插入數(shù)據(jù)值包含空的處理有所差異,在SQL Server中,我們可以把表字段設(shè)計為非空,但我們?nèi)匀豢梢酝ㄟ^下面語句執(zhí)行插入操作2009-06-06oracle 11g數(shù)據(jù)庫安全加固注意事項
這篇文章主要介紹了oracle11g數(shù)據(jù)庫安全加固須謹慎 ,需要的朋友可以參考下2015-08-08Oracle如何批量將表中字段名全轉(zhuǎn)換為大寫(利用簡單存儲過程)
這篇文章主要給大家介紹了關(guān)于Oracle如何批量將表中字段名全轉(zhuǎn)換為大寫的相關(guān)資料,主要利用的就是一個簡單的存儲過程,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧2020-11-11Oracle帶輸入輸出參數(shù)存儲過程(包括sql分頁功能)
這篇文章主要介紹了Oracle帶輸入輸出參數(shù)存儲過程(包括sql分頁功能)的相關(guān)知識,非常不錯,具有一定的參考借鑒價值,需要的朋友可以參考下2018-10-10oracle SCN跟TIMESTAMP之間轉(zhuǎn)換
本文將詳細介紹oracle SCN跟TIMESTAMP之間轉(zhuǎn)換,需要的朋友可以參考下2012-11-11解決Oracle刪除重復(fù)數(shù)據(jù)只留一條的方法詳解
本篇文章是對Oracle刪除重復(fù)數(shù)據(jù)只留一條的解決方法進行了詳細的分析介紹,需要的朋友參考下2013-05-05