linux下設置oracle開機自啓動

 1.vi /etc/rc.local

 
su - oracle -c "/bin/sh /opt/dbstart.sh"
 
2. dbstart.sh的內容
 
export ORACLE_BASE=/opt/oracle
export ORACLE_SID=orcl
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
 
sqlplus '/as sysdba'<<eof
 
startup;
 
exit
 
eof
 
/opt/oracle/product/10.2.0/db_1/bin/lsnrctl start
 
3.修改/etc/oratab內容
 
ORACLE_SID:/u01/app/oracle/product/10.2.0/db_1:N改爲如下內容
 
ORACLE_SID:/u01/app/oracle/product/10.2.0/db_1:Y
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章