Linux 单实例环境下实现Oracle数据库和DDS软件的开机自动重启


Linux 单实例环境下实现Oracle数据库和DDS软件的开机自动重启

1.修改/etc/oratab
# vi /etc/oratab
oradb:/opt/ora10/product/10.2.0.1:Y(原来是N改为Y)

2.修改/etc/selinux/config
# vi /etc/selinux/config
SELINUX=disabled

3.拷贝一个系统配置好的 PFILE 到 dbs 目录下
SQL> create pfile=’/oracle/pfile.ora’ from spfile;
File created.
[oracle@bkjia.com ~]$ cp /oracle/pfile.ora /oracle/product/10g/dbs/init.ora

4、修改dbstart
修改dbstart的第78行 ($ORACLE_HOME/bin/dbstart)
ORACLE_HOME_LISTNER=/ade/vikrkuma_new/oracle
为ORACLE_HOME_LISTNER=$ORACLE_HOME

5、修改/etc/rc.local
[oracle@bkjia.com etc]$ vi rc.local
#!/bin/sh
# This script will be executed *after* all the other init scripts.
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
su – oracle -c ‘/oracle/product/10g/bin/lsnrctl start’+++++++打开监听
su – oracle -c ‘/oracle/product/10g/bin/dbstart’+++++++++++打开数据库
su – dds –c ‘/home/dds/dds/ds/ddstart’+++++++++++++++启动DDS软件
su – dds –c ‘/home/dds/dds/bin/dds_pweb –s’++++++源端起启WEB
su – dds –c ‘/home/dds/dds/bin/dds_pweb –t’+++++目标端起启WEB

通过以上5步的设置,当单机服务器掉电或计划内关机,从启服务器后,可实现Oracle 数据库和DDS软件的自动重启…….

相关内容