本文总结与归纳了平常遇到的一些关于Oracle 18c的错误以及处理方法,会不定期的进行更新。
1、dbca Fails With PRCR-1006 PRCR-1071 CRS-2566
这里的asm环境使用了Oracle ASM Filter Driver新特性。AFD设备的acl默认属主为grid:asmadmin,如下图红色箭头所指:
当使用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.
使用如下命令更改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
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.
使用下面的命令查看当前补丁信息:
[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参数有区别,具体以帮助文件为准。
5、DiagSetup-00010: Diag Setup Usage error: unable to perform create directory operation
如果在安装之前,使用root用户配置了afd设备,那么它会在grid用户的$ORACLE_BASE目录下产生一个属主为root用户的diag目录,所以会报错,如下图所示:
将其删除后,重新运行即可解决。
6、CRS-2101:The OLR was formatted using version 3
当在rhel 7或者ol7上安装完oracle 11g rac,执行root.sh脚本时,会出现的一个报错。如下:
[root@odb09 ~]# /u01/app/11.2.0/grid/root.sh
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/11.2.0/grid
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of “dbhome” have not changed. No need to overwrite.
The contents of “oraenv” have not changed. No need to overwrite.
The contents of “coraenv” have not changed. No need to overwrite.
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: /u01/app/11.2.0/grid/crs/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
......
pa user cert
Adding Clusterware entries to inittab
ohasd failed to start
Failed to start the Clusterware. Last 20 lines of the alert log follow:
2019-07-31 12:31:24.188:
[client(17856)]CRS-2101:The OLR was formatted using version 3.
经查,此为11G的BUG,官方已给出补丁:18370031(文档 ID 1959008.1)。在执行root.sh脚本之前,在各个节点先应用此补丁,root.sh脚本才能成功执行。应用补丁过程如下:
[grid@odb09 tmp]$ unzip /u02/oracle/11g/p18370031_112040_Linux-x86-64.zip
[grid@odb09 ~]$ opatch napply -local /tmp/18370031
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/11.2.0/grid
Central Inventory : /u01/app/oraInventory
from : /u01/app/11.2.0/grid/oraInst.loc
OPatch version : 11.2.0.3.4
OUI version : 11.2.0.4.0
Log file location : /u01/app/11.2.0/grid/cfgtoollogs/opatch/opatch2019-07-31_15-04-55PM_1.log
Verifying environment and performing prerequisite checks...
OPatch continues with these patches: 18370031
Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/11.2.0/grid')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '18370031' to OH '/u01/app/11.2.0/grid'
Patching component oracle.crs, 11.2.0.4.0...
Verifying the update...
Patch 18370031 successfully applied.
Log file location: /u01/app/11.2.0/grid/cfgtoollogs/opatch/opatch2019-07-31_15-04-55PM_1.log
OPatch succeeded.