怎样才能让oracle数据库在linux启动时自动启动?

怎样才能让oracle数据库在linux启动时自动启动?

监听:lsnrctl start
数据库:sqlplus "/as sysdba"
startup
or
svrmgrl
connect internal
startup      
做一个SHELL,放在/ETC/RC.D/INIT.D/      
ORACLE自动启动和关闭的有关的步骤是:

修改/etc/oratab:
ORCL:/u01/oracle/app/oracle/product/8.1.7:Y
在/etc/rc.d/init.d里创建一个脚本,起名为oracle8i。
(你可以拷贝httpd脚本为oracle8i作相应修改):
ORA_HOME=/01/oracle/app/oracle/product/8.1.7
echo -n "Starting Oracle8i "
su - $ORA_OWNER -c $ORA_HOME/bin/dbstart
touch /var/lock/subsys/oracle8i
echo -n "Shutting down Oracle8i "
su - $ORA_OWNER -c $ORA_HOME/bin/dbshut
rm -f /var/lock/subsys/oracle8i
测试:
./oracle8i stop
./oracle8i start

连接脚本:
ln -s /etc/rc.d/init.d/oracle8i /etc/rc.d/rc0.d/K10oracle8i
ln -s /etc/rc.d/init.d/oracle8i /etc/rc.d/rc6.d/K10oracle8i
ln -s /etc/rc.d/init.d/oracle8i /etc/rc.d/rc3.d/S99oracle8i