歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> Linux資訊 >> Linux文化 >> 如何在linux下實現操作系統啟動後,讓oracle服務自動也啟動?

如何在linux下實現操作系統啟動後,讓oracle服務自動也啟動?

日期:2017/2/27 12:02:10   编辑:Linux文化

>>> 此貼的回復 >> 這個是對於9i的:

編輯 /etc/oratab 文件 ,將重啟標志設為 'Y': BDQJDC:/u01/app/oracle/product/9.2.0.1.0:Y 創建文件 /etc/init.d/dbora ,輸入以下內容 #!/bin/sh # chkconfig: - 20 80 # description: Oracle auto start-stop script. # # Set ORA_HOME to be equivalent to the $ORACLE_HOME # from which you wish to execute dbstart and dbshut; # # Set ORA_OWNER to the user id of the owner of the # Oracle database in ORA_HOME. ORA_HOME=/opt/oracle/product/9.2.0.4 ORA_OWNER=oracle if [! -f $ORA_HOME/bin/dbstart] then echo "Oracle startup: cannot start" exit fi case "$1" in 'start') # Start the Oracle databases: # The following command assumes that the oracle login # will not prompt the user for any values su - $ORA_OWNER -c $ORA_HOME/bin/dbstart & ;; 'stop') # Stop the Oracle databases: # The following command assumes that the oracle login # will not prompt the user for any values su - $ORA_OWNER -c $ORA_HOME/bin/dbshut & ;; esac 保存該文件

chmod 750 /etc/init.d/dbora ln -s /etc/init.d/dbora /etc/rc0.d/K10dbora ln -s /etc/init.d/dbora /etc/rc3.d/S99dbora 加上root用戶到dba 和 oinstall 組 (/etc/group) ,現在系統就可以啟動和關閉數據庫

[ 關閉窗口 ]

Copyright © 1999-2000 LSLNET.COM. All rights reserved. 藍森林網站 版權所有。 E-mail : [email protected]
Copyright © Linux教程網 All Rights Reserved