本文總結與概括了日常遇到的一些關於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.