本文总结与概括了日常遇到的一些关于Oracle 18c的错误以及处理方法,会不按期的进行更新。linux
这里的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便可。session
[grid@db01 ~]$ crsctl modify resource ora.driver.afd -attr "ACL='owner:grid:rwx,pgrp:oinstall:r-x,other::r--,user:grid:r-x' " -init
在11g r2环境下,修改standalone模式下的数据库实例自启动,使用下面的命令便可:oracle
[grid@db01 ~]$ crsctl modify resource ora.cdb.db -attr "AUTO_START=1"
可是,在12c之后,使用上述命令会报错,以下:app
[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参数,以下:ide
[grid@db01 ~]$ crsctl modify resource ora.cdb.db -attr "AUTO_START=1" -unsupported
在Oracle linux下,若是使用了acfs特性,只要安装新的内核,重启系统后,acfs驱动会失效,从而致使acfs相关功能失效。本环境就是由于安装了新内核致使失效,使用下面的命令查不到任何acfs模块信息:post
[root@db01 ~]# lsmod |grep oracle oracleafd 212992 1
使用下面的命令,从新安装驱动:ui
[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
今天在安装18c的补丁时,因为磁盘空间不足致使失败,从而引发grid启动报错,以下:this
[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.
使用下面的命令查看当前补丁信息:rest
[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参数有区别,具体以帮助文件为准。
若是在安装以前,使用root用户配置了afd设备,那么它会在grid用户的$ORACLE_BASE目录下产生一个属主为root用户的diag目录,因此会报错,以下图所示:
将其删除后,从新运行便可解决。
当在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.