Troubleshooting for oracle 18c

本文总结与归纳了平常遇到的一些关于Oracle 18c的错误以及处理方法,会不定期的进行更新。

1、dbca Fails With PRCR-1006 PRCR-1071 CRS-2566

这里的asm环境使用了Oracle ASM Filter Driver新特性。AFD设备的acl默认属主为grid:asmadmin,如下图红色箭头所指:
Troubleshooting for oracle 18c
当使用dbca建库时,报如下错误:

PRCR-1006 : Failed to add resource ora.orcl.db for orcl
PRCR-1071 : Failed to register or update resource ora.orcl.db
CRS-2566: User 'oracle' does not have sufficient permissions to operate on resource 'ora.driver.afd' which is part of the dependency specification.![](https://s1.51cto.com/images/blog/201904/17/b4bdb7dd6b1b39b446387512d1845f7e.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)

使用如下命令更改afd设备的acl属主为grid:oinstall即可。

[grid@db01 ~]$ crsctl modify resource ora.driver.afd -attr "ACL='owner:grid:rwx,pgrp:oinstall:r-x,other::r--,user:grid:r-x' " -init![](https://s1.51cto.com/images/blog/201904/17/f16a76ed933658ff4319f615a572f3c1.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)

Troubleshooting for oracle 18c

2、CRS-4995:The command 'Modify resource' is invalid in crsctl

在11g r2环境下,修改standalone模式下的数据库实例自启动,使用下面的命令即可:

[grid@db01 ~]$ crsctl modify resource ora.cdb.db -attr "AUTO_START=1" 

但是,在12c以后,使用上述命令会报错,如下:

[grid@db01 ~]$ crsctl modify resource ora.cdb.db -attr "AUTO_START=1"
CRS-4995:  The command 'Modify  resource' is invalid in crsctl. Use srvctl for this command.

这里就需要在后面加-unsupported参数,如下:

[grid@db01 ~]$ crsctl modify resource ora.cdb.db -attr "AUTO_START=1" -unsupported

3、重新安装ACFS驱动

在Oracle linux下,如果使用了acfs特性,只要安装新的内核,重启系统后,acfs驱动会失效,从而导致acfs相关功能失效。本环境就是因为安装了新内核导致失效,使用下面的命令查不到任何acfs模块信息:

[root@db01 ~]# lsmod |grep oracle
oracleafd             212992  1

使用下面的命令,重新安装驱动:

[root@db01 ~]# /u01/app/18.0.0/grid/bin/acfsroot install
ACFS-9300: ADVM/ACFS distribution files found.
ACFS-9314: Removing previous ADVM/ACFS installation.
The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl.
ACFS-9315: Previous ADVM/ACFS components successfully removed.
ACFS-9294: updating file /etc/sysconfig/oracledrivers.conf
ACFS-9307: Installing requested ADVM/ACFS software.
ACFS-9308: Loading installed ADVM/ACFS drivers.
ACFS-9321: Creating udev for ADVM/ACFS.
ACFS-9323: Creating module dependencies - this may take some time.
ACFS-9154: Loading 'oracleoks.ko' driver.
ACFS-9154: Loading 'oracleadvm.ko' driver.
ACFS-9154: Loading 'oracleacfs.ko' driver.
ACFS-9327: Verifying ADVM/ACFS devices.
ACFS-9156: Detecting control device '/dev/asm/.asm_ctl_spec'.
ACFS-9156: Detecting control device '/dev/ofsctl'.
ACFS-9309: ADVM/ACFS installation correctness verified.
ACFS-9294: updating file /etc/sysconfig/oracledrivers.conf
[root@db01 ~]# lsmod |grep oracle
oracleacfs           5431296  0
oracleadvm           1110016  0
oracleoks             716800  2 oracleacfs,oracleadvm
oracleafd             212992  1

4、CRS-6706: Oracle Clusterware Release patch level ('nnn') does not match Software patch level ('mmm')

今天在安装18c的补丁时,由于磁盘空间不足导致失败,从而引起grid启动报错,如下:

[root@db01 ~]# /u01/app/18.0.0/grid/bin/crsctl start has
CRS-6706: Oracle Clusterware Release patch level ('4197789622') does not match Software patch level ('3794151718'). Oracle Clusterware cannot be started.
CRS-4000: Command Start failed, or completed with errors.

使用下面的命令查看当前补丁信息:

扫描二维码关注公众号,回复: 5928607 查看本文章
[root@db01 ~]# /u01/app/18.0.0/grid/bin/kfod op=patches
---------------
List of Patches
===============
27908644
27923415
28090523
28090553
28090557
28256701
28435192
28547619
28822489
28864593
28864607
29230887
29263354
29302264
[root@db01 ~]# /u01/app/18.0.0/grid/bin/kfod op=patchlvl
-------------------
Current Patch level
===================
4197789622

12c以后,在这样的情况下,也不能进行回滚操作,只能进行补丁信息同步,如下:

[root@db01 ~]# /u01/app/18.0.0/grid/crs/install/roothas.sh -unlock
Using configuration parameter file: /u01/app/18.0.0/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/18.0.0/crsdata/db01/crsconfig/haunlock__2019-04-17_02-17-15PM.log
2019/04/17 14:17:26 CLSRSC-347: Successfully unlock /u01/app/18.0.0/grid
[root@db01 ~]# /u01/app/18.0.0/grid/crs/install/roothas.sh -postpatch
Using configuration parameter file: /u01/app/18.0.0/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/18.0.0/crsdata/db01/crsconfig/hapatch_2019-04-17_02-18-04PM.log
2019/04/17 14:18:07 CLSRSC-329: Replacing Clusterware entries in file 'oracle-ohasd.service'
2019/04/17 14:21:49 CLSRSC-672: Post-patch steps for patching GI home successfully completed.

12c和18c的roothas.sh参数有区别,具体以帮助文件为准。

猜你喜欢

转载自blog.51cto.com/candon123/2380155
今日推荐