Oracle 19.22单机+ASM安装
环境说明:
OS:Oracle Linux 7.6DB:Oracle 19.22单机+ASMRU:35940989
安装:
配置YUM
[root@cjc-db-02 soft]# vi etc/yum.repos.d/yum.repo [cjcyum]name=cjcyumbaseurl=file:///mntgpgcheck=0enabled=1
挂载
mount V975367-01.iso mnt
yum
rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})n' binutils compat-libstdc++-33 compat-libcap1 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers ksh libaio libaio-devel libgcc libstdc++ libXext libXtst kde-l10n-Chinese.noarch libstdc++-devel make xclock sysstat man nfs-utils lsof expect unzip redhat-lsb openssh-clients smartmontools unixODBC perl telnet vsftpd ntsysv lsscsi libX11 libxcb libXau libXi strace sg3_utils kexec-tools net-tools nmap lrzsz tree dos2unix ncurses ncurses-devel iotop unixODBC-devel |grep "not installed" |awk '{print $2}' |xargs yum install -y
RPM
手动安装
rpm -ivh soft/compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm --forcerpm -ivh soft/cvuqdisk-1.0.10-1.rpm --force
配置所需用户、组
groupadd -g 5000 dbagroupadd -g 5001 oinstallgroupadd -g 5002 opergroupadd -g 5003 asmadmingroupadd -g 5004 asmopergroupadd -g 5005 asmdbagroupadd -g 5006 backupdbagroupadd -g 5007 dgdbagroupadd -g 5008 kmdbagroupadd -g 5009 racdbauseradd -g oinstall -G asmadmin,asmdba,asmoper,dba griduseradd -g oinstall -G dba,asmdba,backupdba,dgdba,kmdba,racdba,oper oracle
[root@cjc-db-02 soft]# passwd oracle[root@cjc-db-02 soft]# passwd grid
创建目录
mkdir -p oracle/{db,grid,crs}mkdir -p oracle/db/product/19.0.0
用户环境变量
vi home/oracle/.bash_profileexport ORACLE_BASE=/oracle/dbexport ORACLE_HOME=/oracle/db/product/19.0.0export PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:/oracle/crs/binexport LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/libexport ORACLE_SID=CJCalias cdo='cd $ORACLE_HOME'alias cdb='cd $ORACLE_HOME/dbs'alias cdn='cd $ORACLE_HOME/network/admin'alias cdal='cd $ORACLE_BASE/diag/rdbms/*/*/trace'alias sqp='sqlplus as sysdba'
vi home/grid/.bash_profileexport ORACLE_BASE=/oracle/gridexport ORACLE_HOME=/oracle/crsexport PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/OPatchexport ORACLE_SID=+ASMalias cdal='cd $ORACLE_BASE/diag/crs/`hostname`/crs/trace'alias cdam='cd $ORACLE_BASE/diag/asm/+asm/+*/trace'alias sqm='sqlplus as sysasm'
配置资源限制
mem=$(free -g | grep Mem | awk {'print $2'})shm=$((mem*1024*1024*819))mall=$((shm/4096))
vi etc/sysctl.conf##oracle parameterkernel.shmmni = 4096kernel.shmall = $mall kernel.shmmax = $shmfs.aio-max-nr = 3145728fs.file-max = 6815744kernel.shmmni = 4096kernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048586#vm.min_free_kbytes = 524288#vm.nr_hugepages = $hugemem
vi /etc/security/limits.confgrid soft nproc 16384grid hard nproc 16384grid soft nofile 65536grid hard nofile 65536grid soft stack 10240grid hard stack 32768grid hard memlock unlimitedgrid soft memlock unlimitedoracle soft nproc 16384oracle hard nproc 16384oracle soft nofile 65536oracle hard nofile 65536oracle soft stack 10240oracle hard stack 32768oracle hard memlock unlimitedoracle soft memlock unlimited
准备磁盘
lsblksdb 8:16 0 2G 0 disk sdc 8:32 0 2G 0 disk sdd 8:48 0 2G 0 disk sde 8:64 0 2G 0 disk sdf 8:80 0 2G 0 disk sdg 8:96 0 2G 0 disk sdh 8:112 0 2G 0 disk sdi 8:128 0 2G 0 disk sdj 8:144 0 2G 0 disk sdk 8:160 0 2G 0 disk
创建规则文件
for i in b c d e f g h i j k; do echo "KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d dev/%k", RESULT=="`/usr/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/sd$i`", SYMLINK+="asm-disk$i", OWNER="grid", GROUP="asmadmin", MODE="0660"" | grep -v 'RESULT==""'; done >> etc/udev/rules.d/99-oracleasm-disks.rules
查看
[root@cjc-db-02 rules.d]# cat 99-oracleasm-disks.rules KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d dev/%k", RESULT=="1ATA_VBOX_HARDDISK_VBcb863405-a76ed10f", SYMLINK+="asm-diskb", OWNER="grid", GROUP="asmadmin", MODE="0660"KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d dev/%k", RESULT=="1ATA_VBOX_HARDDISK_VB90e60f4f-a322e205", SYMLINK+="asm-diskc", OWNER="grid", GROUP="asmadmin", MODE="0660"KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d dev/%k", RESULT=="1ATA_VBOX_HARDDISK_VBa0798ef0-46a9482a", SYMLINK+="asm-diskd", OWNER="grid", GROUP="asmadmin", MODE="0660"KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d dev/%k", RESULT=="1ATA_VBOX_HARDDISK_VB5a0104a0-577777ff", SYMLINK+="asm-diske", OWNER="grid", GROUP="asmadmin", MODE="0660"KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d dev/%k", RESULT=="1ATA_VBOX_HARDDISK_VB195f21ce-0bf38a08", SYMLINK+="asm-diskf", OWNER="grid", GROUP="asmadmin", MODE="0660"KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d dev/%k", RESULT=="1ATA_VBOX_HARDDISK_VB2a33e667-f955b4f5", SYMLINK+="asm-diskg", OWNER="grid", GROUP="asmadmin", MODE="0660"KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d dev/%k", RESULT=="1ATA_VBOX_HARDDISK_VB0a74c095-493d4ec5", SYMLINK+="asm-diskh", OWNER="grid", GROUP="asmadmin", MODE="0660"KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d dev/%k", RESULT=="1ATA_VBOX_HARDDISK_VB4a17cc77-5ae64d39", SYMLINK+="asm-diski", OWNER="grid", GROUP="asmadmin", MODE="0660"KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d dev/%k", RESULT=="1ATA_VBOX_HARDDISK_VB2060d97a-3e8f14ba", SYMLINK+="asm-diskj", OWNER="grid", GROUP="asmadmin", MODE="0660"KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d dev/%k", RESULT=="1ATA_VBOX_HARDDISK_VB0bd66b43-3a66e70a", SYMLINK+="asm-diskk", OWNER="grid", GROUP="asmadmin", MODE="0660"
使生效
[root@cjc-db-02 rules.d]# sbin/udevadm control --reload-rules[root@cjc-db-02 rules.d]# sbin/udevadm trigger
查看
[root@cjc-db-02 rules.d]# ls -l dev/asm-disk*lrwxrwxrwx 1 root root 3 Apr 4 13:21 dev/asm-diskb -> sdblrwxrwxrwx 1 root root 3 Apr 4 13:21 dev/asm-diskc -> sdclrwxrwxrwx 1 root root 3 Apr 4 13:21 dev/asm-diskd -> sddlrwxrwxrwx 1 root root 3 Apr 4 13:21 dev/asm-diske -> sdelrwxrwxrwx 1 root root 3 Apr 4 13:21 dev/asm-diskf -> sdflrwxrwxrwx 1 root root 3 Apr 4 13:21 dev/asm-diskg -> sdglrwxrwxrwx 1 root root 3 Apr 4 13:21 dev/asm-diskh -> sdhlrwxrwxrwx 1 root root 3 Apr 4 13:21 dev/asm-diski -> sdilrwxrwxrwx 1 root root 3 Apr 4 13:21 dev/asm-diskj -> sdjlrwxrwxrwx 1 root root 3 Apr 4 13:21 dev/asm-diskk -> sdk
安装GI
解压
[root@cjc-db-02 gi]# mv LINUX.X64_193000_grid_home.zip oracle/crs/[root@cjc-db-02 gi]# chown grid:oinstall oracle/crs -R[root@cjc-db-02 gi]# su - grid [grid@cjc-db-02 ~]$ cd oracle/crs/[grid@cjc-db-02 crs]$ unzip LINUX.X64_193000_grid_home.zip
开始安装GI
[grid@cjc-db-02 crs]$ ./gridSetup.sh







执行脚本,其中执行第二个脚本root.sh时间较长,需要几分钟
[root@cjc-db-02 ~]# oracle/crs/root.shPerforming root user operation.The following environment variables are set as: ORACLE_OWNER= grid ORACLE_HOME= oracle/crsEnter 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 byDatabase Configuration Assistant when a database is createdFinished running generic part of root script.Now product-specific root actions will be performed.Using configuration parameter file: oracle/crs/crs/install/crsconfig_paramsThe log of current session can be found at: oracle/grid/crsdata/cjc-db-02/crsconfig/roothas_2024-04-04_02-45-38PM.log2024/04/04 14:45:58 CLSRSC-363: User ignored prerequisites during installationLOCAL ADD MODE Creating OCR keys for user 'grid', privgrp 'oinstall'..Operation successful.LOCAL ONLY MODE Successfully accumulated necessary OCR keys.Creating OCR keys for user 'root', privgrp 'root'..Operation successful.CRS-4664: Node cjc-db-02 successfully pinned.2024/04/04 14:46:19 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'cjc-db-02 2024/04/04 14:49:55 oracle/grid/crsdata/cjc-db-02/olr/backup_20240404_144955.olr 724960844 2024/04/04 14:49:57 CLSRSC-327: Successfully configured Oracle Restart for a standalone server[root@cjc-db-02 ~]#

安装完GI,查看状态
[grid@cjc-db-02 ~]$ crsctl stat res -t--------------------------------------------------------------------------------Name Target State Server State details --------------------------------------------------------------------------------Local Resources--------------------------------------------------------------------------------ora.DATA.dg ONLINE ONLINE cjc-db-02 STABLEora.LISTENER.lsnr ONLINE ONLINE cjc-db-02 STABLEora.asm ONLINE ONLINE cjc-db-02 Started,STABLEora.ons OFFLINE OFFLINE cjc-db-02 STABLE--------------------------------------------------------------------------------Cluster Resources--------------------------------------------------------------------------------ora.cssd 1 ONLINE ONLINE cjc-db-02 STABLEora.diskmon 1 OFFLINE OFFLINE STABLEora.evmd 1 ONLINE ONLINE cjc-db-02 STABLE
查看磁盘组
SQL> select name,total_mb,free_mb from v$asm_diskgroup;NAME TOTAL_MB FREE_MB------------------------------ ---------- ----------DATA 12288 12128
查看进程
[root@cjc-db-02 bin]# ps -ef|grep d.bingrid 17648 1 2 14:49 ? 00:00:15 oracle/crs/bin/ohasd.bin rebootgrid 17824 1 0 14:49 ? 00:00:02 oracle/crs/bin/evmd.bingrid 21403 1 0 14:53 ? 00:00:02 oracle/crs/bin/ocssd.bin
查看监听
[grid@cjc-db-02 ~]$ lsnrctl statusLSNRCTL for Linux: Version 19.0.0.0.0 - Production on 04-APR-2024 15:01:46Copyright (c) 1991, 2019, Oracle. All rights reserved.Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=cjc-db-02)(PORT=1521)))STATUS of the LISTENER------------------------Alias LISTENERVersion TNSLSNR for Linux: Version 19.0.0.0.0 - ProductionStart Date 04-APR-2024 14:52:23Uptime 0 days 0 hr. 9 min. 23 secTrace Level offSecurity ON: Local OS AuthenticationSNMP OFFListener Parameter File oracle/crs/network/admin/listener.oraListener Log File oracle/grid/diag/tnslsnr/cjc-db-02/listener/alert/log.xmlListening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=cjc-db-02)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))Services Summary...Service "+ASM" has 1 instance(s). Instance "+ASM", status READY, has 1 handler(s) for this service...Service "+ASM_DATA" has 1 instance(s). Instance "+ASM", status READY, has 1 handler(s) for this service...The command completed successfully
安装Oracle软件
[root@cjc-db-02 db]# mv LINUX.X64_193000_db_home.zip oracle/db/product/19.0.0/[root@cjc-db-02 db]# chown oracle:oinstall oracle/db -R[oracle@cjc-db-02 19.0.0]$ unzip LINUX.X64_193000_db_home.zip [oracle@cjc-db-02 19.0.0]$ sh runInstaller









DBCA建库










查看数据库信息
SQL> SELECT BANNER_FULL FROM V$VERSION;BANNER_FULL--------------------------------------------------------------------------------Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - ProductionVersion 19.3.0.0.0col PRODUCT for a50col VERSION for a20col VERSION_FULL for a20col STATUS for a20SELECT * FROM PRODUCT_COMPONENT_VERSION; PRODUCT VERSION VERSION_FULL STATUS-------------------------------------------------- -------------------- -------------------- --------------------Oracle Database 19c Enterprise Edition 19.0.0.0.0 19.3.0.0.0 Production查看RU_APPLYcol action for a25col COMMENTS for a80SELECT ACTION,COMMENTS FROM REGISTRY$HISTORY;ACTION COMMENTS------------------------- --------------------------------------------------------------------------------BOOTSTRAP RDBMS_19.3.0.0.0DBRU_LINUX.X64_190417RU_APPLY Patch applied on 19.3.0.0.0: Release_Update - 190410122720查看组件和版本SET PAGESIZE 100COL COMP_NAME FOR A35COL COMP_ID FOR A15COL VERSION FOR A15SELECT COMP_ID,COMP_NAME,VERSION FROM DBA_REGISTRY ORDER BY 1;COMP_ID COMP_NAME VERSION--------------- ----------------------------------- ---------------APS OLAP Analytic Workspace 19.0.0.0.0CATALOG Oracle Database Catalog Views 19.0.0.0.0CATJAVA Oracle Database Java Packages 19.0.0.0.0CATPROC Oracle Database Packages and Types 19.0.0.0.0CONTEXT Oracle Text 19.0.0.0.0DV Oracle Database Vault 19.0.0.0.0JAVAVM JServer JAVA Virtual Machine 19.0.0.0.0OLS Oracle Label Security 19.0.0.0.0ORDIM Oracle Multimedia 19.0.0.0.0OWM Oracle Workspace Manager 19.0.0.0.0RAC Oracle Real Application Clusters 19.0.0.0.0SDO Spatial 19.0.0.0.0XDB Oracle XML Database 19.0.0.0.0XML Oracle XDK 19.0.0.0.0XOQ Oracle OLAP API 19.0.0.0.015 rows selected.[grid@cjc-db-02 ~]$ opatch lspatches29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)29517247;ACFS RELEASE UPDATE 19.3.0.0.0 (29517247)29517242;Database Release Update : 19.3.0.0.190416 (29517242)29401763;TOMCAT RELEASE UPDATE 19.0.0.0.0 (29401763)OPatch succeeded.[oracle@cjc-db-02 ~]$ opatch lspatches29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)29517242;Database Release Update : 19.3.0.0.190416 (29517242)OPatch succeeded.
更新RU
准备补丁工具
原版本,12.2.0.1.17,低于补丁readme.html文件中要求的最低版本
[grid@cjc-db-02 OPatch_bak]$ ./opatch versionOPatch Version: 12.2.0.1.17OPatch succeeded.
下载最新版本补丁工具
https://updates.oracle.com/ARULink/PatchDetails/process_form?patch_num=6880880

升级补丁工具,升级到12.2.0.1.41
[root@cjc-db-02 gi]# ls -lrth p6880880_190000_Linux-x86-64.zip -rw-r--r-- 1 root root 122M Apr 5 17:58 p6880880_190000_Linux-x86-64.zip[root@cjc-db-02 gi]# mv /oracle/crs/OPatch /oracle/crs/OPatch_bak[root@cjc-db-02 gi]# chown grid:oinstall p6880880_190000_Linux-x86-64.zip [root@cjc-db-02 gi]# unzip p6880880_190000_Linux-x86-64.zip [root@cjc-db-02 gi]# mv OPatch /oracle/crs/[root@cjc-db-02 gi]# chown grid:oinstall /oracle/crs/OPatch -R[grid@cjc-db-02 OPatch]$ ./opatch versionOPatch Version: 12.2.0.1.41OPatch succeeded.同理,更新Oracle home下的补丁工具。
检查
[grid@cjc-db-02 OPatch]$ $ORACLE_HOME/OPatch/opatch lsinventory -detail -oh $ORACLE_HOMEOracle Interim Patch Installer version 12.2.0.1.41Copyright (c) 2024, Oracle Corporation. All rights reserved.Oracle Home : /oracle/crsCentral Inventory : /oracle/oraInventory from : /oracle/crs/oraInst.locOPatch version : 12.2.0.1.41OUI version : 12.2.0.7.0Log file location : /oracle/crs/cfgtoollogs/opatch/opatch2024-04-05_18-07-31PM_1.logLsinventory Output file location : /oracle/crs/cfgtoollogs/opatch/lsinv/lsinventory2024-04-05_18-07-31PM.txt--------------------------------------------------------------------------------Local Machine Information::Hostname: cjc-db-02ARU platform id: 226......--------------------------------------------------------------------------------OPatch succeeded.
检查补丁冲突
[grid@cjc-db-02 gi]$ unzip p35940989_190000_Linux-x86-64.zip [root@cjc-db-02 gi]# chown grid:oinstall 35940989 -R[grid@cjc-db-02 35940989]$ pwd/soft/oracle/gi/35940989[grid@cjc-db-02 35940989]$ ls33575402 35943157 35956421 35967489 36115038 automation bundle.xml README.html README.txt先检查33575402,其他目录也按照相同方法检查[grid@cjc-db-02 35940989]$ cd 33575402/[grid@cjc-db-02 33575402]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./Oracle Interim Patch Installer version 12.2.0.1.41Copyright (c) 2024, Oracle Corporation. All rights reserved.PREREQ sessionOracle Home : /oracle/crsCentral Inventory : /oracle/oraInventory from : /oracle/crs/oraInst.locOPatch version : 12.2.0.1.41OUI version : 12.2.0.7.0Log file location : /oracle/crs/cfgtoollogs/opatch/opatch2024-04-05_18-14-39PM_1.logInvoking prereq "checkconflictagainstohwithdetail"Prereq "checkConflictAgainstOHWithDetail" passed.OPatch succeeded.
打补丁前备份
停服务后,备份oracle,grid家目录等。
打补丁
补丁文件解压后5G多,更新时间46分18秒,非常慢。
[root@cjc-db-02 35940989]# /oracle/crs/OPatch/opatchauto apply /soft/oracle/gi/35940989OPatchauto session is initiated at Fri Apr 5 20:25:27 2024System initialization log file is /oracle/crs/cfgtoollogs/opatchautodb/systemconfig2024-04-05_08-25-42PM.log.Session log file is /oracle/crs/cfgtoollogs/opatchauto/opatchauto2024-04-05_08-25-58PM.logThe id for this session is 7WJFExecuting OPatch prereq operations to verify patch applicability on home /oracle/db/product/19.0.0Patch applicability verified successfully on home /oracle/db/product/19.0.0Executing OPatch prereq operations to verify patch applicability on home /oracle/crsPatch applicability verified successfully on home /oracle/crsExecuting patch validation checks on home /oracle/crsPatch validation checks successfully completed on home /oracle/crsPerforming prepatch operations on CRS - bringing down CRS service on home /oracle/crsPrepatch operation log file location: /oracle/grid/crsdata/cjc-db-02/crsconfig/hapatch_2024-04-05_08-34-48PM.logCRS service brought down successfully on home /oracle/crsStart applying binary patch on home /oracle/crsBinary patch applied successfully on home /oracle/crsRunning rootadd_rdbms.sh on home /oracle/crsSuccessfully executed rootadd_rdbms.sh on home /oracle/crsPerforming postpatch operations on CRS - starting CRS service on home /oracle/crsPostpatch operation log file location: /oracle/grid/crsdata/cjc-db-02/crsconfig/hapatch_2024-04-05_09-10-19PM.logCRS service started successfully on home /oracle/crsOPatchAuto successful.--------------------------------Summary--------------------------------Patching is completed successfully. Please find the summary as follows:Host:cjc-db-02SIDB Home:/oracle/db/product/19.0.0Version:19.0.0.0.0Summary:==Following patches were SKIPPED:Patch: /soft/oracle/gi/35940989/35956421Reason: This patch is not applicable to this specified target type - "oracle_database"Patch: /soft/oracle/gi/35940989/33575402Reason: This patch is not applicable to this specified target type - "oracle_database"Patch: /soft/oracle/gi/35940989/36115038Reason: This patch is not applicable to this specified target type - "oracle_database"Patch: /soft/oracle/gi/35940989/35967489Log: /oracle/db/product/19.0.0/cfgtoollogs/opatchauto/core/opatch/opatch2024-04-05_20-27-00PM_1.logReason: /soft/oracle/gi/35940989/35967489 is not required to be applied to oracle home /oracle/db/product/19.0.0Patch: /soft/oracle/gi/35940989/35943157Log: /oracle/db/product/19.0.0/cfgtoollogs/opatchauto/core/opatch/opatch2024-04-05_20-27-00PM_1.logReason: /soft/oracle/gi/35940989/35943157 is not required to be applied to oracle home /oracle/db/product/19.0.0Host:cjc-db-02SIHA Home:/oracle/crsVersion:19.0.0.0.0Summary:==Following patches were SUCCESSFULLY applied:Patch: /soft/oracle/gi/35940989/33575402Log: /oracle/crs/cfgtoollogs/opatchauto/core/opatch/opatch2024-04-05_20-35-28PM_1.logPatch: /soft/oracle/gi/35940989/35943157Log: /oracle/crs/cfgtoollogs/opatchauto/core/opatch/opatch2024-04-05_20-35-28PM_1.logPatch: /soft/oracle/gi/35940989/35956421Log: /oracle/crs/cfgtoollogs/opatchauto/core/opatch/opatch2024-04-05_20-35-28PM_1.logPatch: /soft/oracle/gi/35940989/35967489Log: /oracle/crs/cfgtoollogs/opatchauto/core/opatch/opatch2024-04-05_20-35-28PM_1.logPatch: /soft/oracle/gi/35940989/36115038Log: /oracle/crs/cfgtoollogs/opatchauto/core/opatch/opatch2024-04-05_20-35-28PM_1.logOPatchauto session completed at Fri Apr 5 21:11:59 2024Time taken to complete the session 46 minutes, 18 seconds
打补丁遇到的问题
问题1:需要启动GI,不能停GI
Clusterware is either not running or not configured. You have the following 2 options: 1. Configure and start the Clusterware on this node and re-run the tool 2. Run the tool with '-oh ' to first patch the Grid Home, then invoke tool with '-database ' or '-oh ' to patch the RAC home
问题2:GI_HOME目录权限
需要将root:oinstall权限改成grid:oinstall权限。
Caused by: java.io.FileNotFoundException: /oracle/crs/opatchautocfg/db/dbtmp/patchinginfo_cjc-db-02.properties (No such file or directory)
问题3:执行用户
需要使用root用户执行
OPATCHAUTO-72046: Wallet option is required during patching as non-root user.OPATCHAUTO-72046: Please provide a wallet option or execute as root user.
问题4:磁盘空间
打补丁期间,需要预留足够的磁盘空间,否则会出现如下错误,导致更新失败,至少预留12GB。
Required amount of space(8777.758MB) is not available.Required amount of space(11045.28MB) is not available.
更新RU后检查版本
SQL> SELECT BANNER_FULL FROM V$VERSION;BANNER_FULL--------------------------------------------------------------------------------Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - ProductionVersion 19.22.0.0.0set line 300col PRODUCT for a50col VERSION for a20col VERSION_FULL for a20col STATUS for a20SELECT * FROM PRODUCT_COMPONENT_VERSION; PRODUCT VERSION VERSION_FULL STATUS-------------------------------------------------- -------------------- -------------------- --------------------Oracle Database 19c Enterprise Edition 19.0.0.0.0 19.22.0.0.0 Production[oracle@cjc-db-02 ~]$ opatch lspatches35967489;OCW RELEASE UPDATE 19.22.0.0.0 (35967489)35943157;Database Release Update : 19.22.0.0.240116 (35943157)OPatch succeeded.[grid@cjc-db-02 ~]$ opatch lspatches36115038;TOMCAT RELEASE UPDATE 19.0.0.0.0 (36115038)35967489;OCW RELEASE UPDATE 19.22.0.0.0 (35967489)35956421;ACFS RELEASE UPDATE 19.22.0.0.0 (35956421)35943157;Database Release Update : 19.22.0.0.240116 (35943157)33575402;DBWLM RELEASE UPDATE 19.0.0.0.0 (33575402)OPatch succeeded.
###chenjuchao 20240405###