首页 > 数据库 > Oracle > 【Oracle】Oracle版本Grid无法随机启动


原创 Oracle 作者:dmcatding 时间:2016-12-05 16:20:25 0 删除 编辑

系统环境:Linux Server release 7.3


参考 MOS 文档:

Install of Clusterware fails while running on OL7 - ohasd fails to start (文档 ID 1959008.1)

redhat 7.2 安装oracle 11204 rac的grid执行root.sh报错:ohasd failed to start

[root@b2i-order-db1 ~]# /app/grid/app/11.2.0/grid/
Performing root user operation for Oracle 11g
The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /app/grid/app/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...

Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file:  /app/grid/app/11.2.0/grid/install/crsconfig_params
Creating trace directory
User ignored Prerequisites during installation
Installing Trace File Analyzer
OLR initialization - successful
  root wallet
  root wallet cert
  root cert export
  peer wallet
  profile reader wallet
  pa wallet
  peer wallet keys
  pa wallet keys
  peer cert request
  pa cert request
  peer cert
  pa cert
  peer root cert TP
  profile reader root cert TP
  pa root cert TP
  peer pa cert TP
  pa peer cert TP
  profile reader pa cert TP
  profile reader peer cert TP
  peer user cert
  pa user cert
Adding Clusterware entries to inittab
ohasd failed to start

因为RHEL 7使用systemd而不是initd运行进程和重启进程,而root.sh通过传统的initd运行ohasd进程。

在RHEL 7中ohasd需要被设置为一个服务,在运行脚本root.sh之前。

1. 使用root用户
[root@Oraclelinux ~]# cd /etc/systemd/system/
[root@Oraclelinux system]# touch ohasd.service
--此处oracle MOS 文档描述错误,应修改为 touch ohas.service

2. ohas.service 文件中添加如下参数
Description=Oracle High Availability Services
ExecStart=/etc/init.d/init.ohasd run >/dev/null 2>&1 Type=simple
3. 用root用户执行以下命令:
[root@Oraclelinux ~]# systemctl daemon-reload
[root@Oraclelinux ~]# systemctl enable ohas.service
[root@Oraclelinux ~]# systemctl start ohas.service

4. 查看运行状态
[root@b2i-order-db1 init.d]# systemctl status ohas.service
ohas.service - Oracle High Availability Services
   Loaded: loaded (/usr/lib/systemd/system/ohas.service; enabled)
   Active: failed (Result: start-limit) sincesince Tue 2017-01-03 18:00:27 CST;2s ago

  Process: 5734 ExecStart=/etc/init.d/init.ohasd run >/dev/null 2>&1 Type=simple (code=exited, status=203/EXEC)
 Main PID: 5734 (code=exited, status=203/EXEC)
状态为failed ,此时状态为失败,原因是现在还没有/etc/init.d/init.ohasd文件。

5、执行 脚本后状态
● ohas.service - Oracle High Availability Services
   Loaded: loaded (/usr/lib/systemd/system/ohas.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2017-01-03 18:00:27 CST;10s ago
 Main PID: 79660 (init.ohasd)
   CGroup: /system.slice/ohas.service
           └─79660 /bin/sh /etc/init.d/init.ohasd run >/dev/null 2>&1 Type=simple

Jan 03 18:00:27 b2i-order-db1 systemd[1]: Started Oracle High Availability Services.
Jan 03 18:00:27 b2i-order-db1 systemd[1]: Starting Oracle High Availability Services...

来自 “ ITPUB博客 ” ,链接:,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录


  • 博文量
  • 访问量