【Oracle】Oracle 11.2.0.4版本Grid无法随机启动

系统环境:Linux Server release 7.3

数据库环境:11.2.0.4.0

参考 MOS 文档:

Install of Clusterware fails while running root.sh 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/root.sh
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 文件中添加如下参数
 
[Unit]
Description=Oracle High Availability Services
After=syslog.target
 
[Service]
ExecStart=/etc/init.d/init.ohasd run >/dev/null 2>&1 Type=simple
Restart=always
 
[Install]
WantedBy=multi-user.target
 
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、执行root.sh 脚本后状态
● 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博客 ” ,链接:http://blog.itpub.net/30327022/viewspace-2129753/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/30327022/viewspace-2129753/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值