Oracle 19.22单机+ASM安装
环境说明:
OS:Oracle Linux 7.6
DB:Oracle 19.22单机+ASM
RU:35940989
安装:
配置YUM
[root@cjc-db-02 soft]# vi etc/yum.repos.d/yum.repo
[cjcyum]
name=cjcyum
baseurl=file:///mnt
gpgcheck=0
enabled=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 --force
rpm -ivh soft/cvuqdisk-1.0.10-1.rpm --force
配置所需用户、组
groupadd -g 5000 dba
groupadd -g 5001 oinstall
groupadd -g 5002 oper
groupadd -g 5003 asmadmin
groupadd -g 5004 asmoper
groupadd -g 5005 asmdba
groupadd -g 5006 backupdba
groupadd -g 5007 dgdba
groupadd -g 5008 kmdba
groupadd -g 5009 racdba
useradd -g oinstall -G asmadmin,asmdba,asmoper,dba grid
useradd -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_profile
export ORACLE_BASE=/oracle/db
export ORACLE_HOME=/oracle/db/product/19.0.0
export PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:/oracle/crs/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export ORACLE_SID=CJC
alias 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_profile
export ORACLE_BASE=/oracle/grid
export ORACLE_HOME=/oracle/crs
export PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch
export ORACLE_SID=+ASM
alias 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 parameter
kernel.shmmni = 4096
kernel.shmall = $mall
kernel.shmmax = $shm
fs.aio-max-nr = 3145728
fs.file-max = 6815744
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
#vm.min_free_kbytes = 524288
#vm.nr_hugepages = $hugemem
vi /etc/security/limits.conf
grid soft nproc 16384
grid hard nproc 16384
grid soft nofile 65536
grid hard nofile 65536
grid soft stack 10240
grid hard stack 32768
grid hard memlock unlimited
grid soft memlock unlimited
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft nofile 65536
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 32768
oracle hard memlock unlimited
oracle soft memlock unlimited
准备磁盘
lsblk
sdb 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 -> sdb
lrwxrwxrwx 1 root root 3 Apr 4 13:21 dev/asm-diskc -> sdc
lrwxrwxrwx 1 root root 3 Apr 4 13:21 dev/asm-diskd -> sdd
lrwxrwxrwx 1 root root 3 Apr 4 13:21 dev/asm-diske -> sde
lrwxrwxrwx 1 root root 3 Apr 4 13:21 dev/asm-diskf -> sdf
lrwxrwxrwx 1 root root 3 Apr 4 13:21 dev/asm-diskg -> sdg
lrwxrwxrwx 1 root root 3 Apr 4 13:21 dev/asm-diskh -> sdh
lrwxrwxrwx 1 root root 3 Apr 4 13:21 dev/asm-diski -> sdi
lrwxrwxrwx 1 root root 3 Apr 4 13:21 dev/asm-diskj -> sdj
lrwxrwxrwx 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.sh
Performing root user operation.
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= oracle/crs
Enter 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 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: oracle/crs/crs/install/crsconfig_params
The log of current session can be found at:
oracle/grid/crsdata/cjc-db-02/crsconfig/roothas_2024-04-04_02-45-38PM.log
2024/04/04 14:45:58 CLSRSC-363: User ignored prerequisites during installation
LOCAL 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 STABLE
ora.LISTENER.lsnr
ONLINE ONLINE cjc-db-02 STABLE
ora.asm
ONLINE ONLINE cjc-db-02 Started,STABLE
ora.ons
OFFLINE OFFLINE cjc-db-02 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 ONLINE ONLINE cjc-db-02 STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.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.bin
grid 17648 1 2 14:49 ? 00:00:15 oracle/crs/bin/ohasd.bin reboot
grid 17824 1 0 14:49 ? 00:00:02 oracle/crs/bin/evmd.bin
grid 21403 1 0 14:53 ? 00:00:02 oracle/crs/bin/ocssd.bin
查看监听
[grid@cjc-db-02 ~]$ lsnrctl status
LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 04-APR-2024 15:01:46
Copyright (c) 1991, 2019, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=cjc-db-02)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date 04-APR-2024 14:52:23
Uptime 0 days 0 hr. 9 min. 23 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File oracle/crs/network/admin/listener.ora
Listener Log File oracle/grid/diag/tnslsnr/cjc-db-02/listener/alert/log.xml
Listening 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 - Production
Version 19.3.0.0.0
col PRODUCT for a50
col VERSION for a20
col VERSION_FULL for a20
col STATUS for a20
SELECT * 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_APPLY
col action for a25
col COMMENTS for a80
SELECT ACTION,COMMENTS FROM REGISTRY$HISTORY;
ACTION COMMENTS
------------------------- --------------------------------------------------------------------------------
BOOTSTRAP RDBMS_19.3.0.0.0DBRU_LINUX.X64_190417
RU_APPLY Patch applied on 19.3.0.0.0: Release_Update - 190410122720
查看组件和版本
SET PAGESIZE 100
COL COMP_NAME FOR A35
COL COMP_ID FOR A15
COL VERSION FOR A15
SELECT COMP_ID,COMP_NAME,VERSION FROM DBA_REGISTRY ORDER BY 1;
COMP_ID COMP_NAME VERSION
--------------- ----------------------------------- ---------------
APS OLAP Analytic Workspace 19.0.0.0.0
CATALOG Oracle Database Catalog Views 19.0.0.0.0
CATJAVA Oracle Database Java Packages 19.0.0.0.0
CATPROC Oracle Database Packages and Types 19.0.0.0.0
CONTEXT Oracle Text 19.0.0.0.0
DV Oracle Database Vault 19.0.0.0.0
JAVAVM JServer JAVA Virtual Machine 19.0.0.0.0
OLS Oracle Label Security 19.0.0.0.0
ORDIM Oracle Multimedia 19.0.0.0.0
OWM Oracle Workspace Manager 19.0.0.0.0
RAC Oracle Real Application Clusters 19.0.0.0.0
SDO Spatial 19.0.0.0.0
XDB Oracle XML Database 19.0.0.0.0
XML Oracle XDK 19.0.0.0.0
XOQ Oracle OLAP API 19.0.0.0.0
15 rows selected.
[grid@cjc-db-02 ~]$ opatch lspatches
29585399;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 lspatches
29585399;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 version
OPatch Version: 12.2.0.1.17
OPatch 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 version
OPatch Version: 12.2.0.1.41
OPatch succeeded.
同理,更新Oracle home下的补丁工具。
检查
[grid@cjc-db-02 OPatch]$ $ORACLE_HOME/OPatch/opatch lsinventory -detail -oh $ORACLE_HOME
Oracle Interim Patch Installer version 12.2.0.1.41
Copyright (c) 2024, Oracle Corporation. All rights reserved.
Oracle Home : /oracle/crs
Central Inventory : /oracle/oraInventory
from : /oracle/crs/oraInst.loc
OPatch version : 12.2.0.1.41
OUI version : 12.2.0.7.0
Log file location : /oracle/crs/cfgtoollogs/opatch/opatch2024-04-05_18-07-31PM_1.log
Lsinventory Output file location : /oracle/crs/cfgtoollogs/opatch/lsinv/lsinventory2024-04-05_18-07-31PM.txt
--------------------------------------------------------------------------------
Local Machine Information::
Hostname: cjc-db-02
ARU 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]$ ls
33575402 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.41
Copyright (c) 2024, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /oracle/crs
Central Inventory : /oracle/oraInventory
from : /oracle/crs/oraInst.loc
OPatch version : 12.2.0.1.41
OUI version : 12.2.0.7.0
Log file location : /oracle/crs/cfgtoollogs/opatch/opatch2024-04-05_18-14-39PM_1.log
Invoking 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/35940989
OPatchauto session is initiated at Fri Apr 5 20:25:27 2024
System 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.log
The id for this session is 7WJF
Executing OPatch prereq operations to verify patch applicability on home /oracle/db/product/19.0.0
Patch applicability verified successfully on home /oracle/db/product/19.0.0
Executing OPatch prereq operations to verify patch applicability on home /oracle/crs
Patch applicability verified successfully on home /oracle/crs
Executing patch validation checks on home /oracle/crs
Patch validation checks successfully completed on home /oracle/crs
Performing prepatch operations on CRS - bringing down CRS service on home /oracle/crs
Prepatch operation log file location: /oracle/grid/crsdata/cjc-db-02/crsconfig/hapatch_2024-04-05_08-34-48PM.log
CRS service brought down successfully on home /oracle/crs
Start applying binary patch on home /oracle/crs
Binary patch applied successfully on home /oracle/crs
Running rootadd_rdbms.sh on home /oracle/crs
Successfully executed rootadd_rdbms.sh on home /oracle/crs
Performing postpatch operations on CRS - starting CRS service on home /oracle/crs
Postpatch operation log file location: /oracle/grid/crsdata/cjc-db-02/crsconfig/hapatch_2024-04-05_09-10-19PM.log
CRS service started successfully on home /oracle/crs
OPatchAuto successful.
--------------------------------Summary--------------------------------
Patching is completed successfully. Please find the summary as follows:
Host:cjc-db-02
SIDB Home:/oracle/db/product/19.0.0
Version:19.0.0.0.0
Summary:
==Following patches were SKIPPED:
Patch: /soft/oracle/gi/35940989/35956421
Reason: This patch is not applicable to this specified target type - "oracle_database"
Patch: /soft/oracle/gi/35940989/33575402
Reason: This patch is not applicable to this specified target type - "oracle_database"
Patch: /soft/oracle/gi/35940989/36115038
Reason: This patch is not applicable to this specified target type - "oracle_database"
Patch: /soft/oracle/gi/35940989/35967489
Log: /oracle/db/product/19.0.0/cfgtoollogs/opatchauto/core/opatch/opatch2024-04-05_20-27-00PM_1.log
Reason: /soft/oracle/gi/35940989/35967489 is not required to be applied to oracle home /oracle/db/product/19.0.0
Patch: /soft/oracle/gi/35940989/35943157
Log: /oracle/db/product/19.0.0/cfgtoollogs/opatchauto/core/opatch/opatch2024-04-05_20-27-00PM_1.log
Reason: /soft/oracle/gi/35940989/35943157 is not required to be applied to oracle home /oracle/db/product/19.0.0
Host:cjc-db-02
SIHA Home:/oracle/crs
Version:19.0.0.0.0
Summary:
==Following patches were SUCCESSFULLY applied:
Patch: /soft/oracle/gi/35940989/33575402
Log: /oracle/crs/cfgtoollogs/opatchauto/core/opatch/opatch2024-04-05_20-35-28PM_1.log
Patch: /soft/oracle/gi/35940989/35943157
Log: /oracle/crs/cfgtoollogs/opatchauto/core/opatch/opatch2024-04-05_20-35-28PM_1.log
Patch: /soft/oracle/gi/35940989/35956421
Log: /oracle/crs/cfgtoollogs/opatchauto/core/opatch/opatch2024-04-05_20-35-28PM_1.log
Patch: /soft/oracle/gi/35940989/35967489
Log: /oracle/crs/cfgtoollogs/opatchauto/core/opatch/opatch2024-04-05_20-35-28PM_1.log
Patch: /soft/oracle/gi/35940989/36115038
Log: /oracle/crs/cfgtoollogs/opatchauto/core/opatch/opatch2024-04-05_20-35-28PM_1.log
OPatchauto session completed at Fri Apr 5 21:11:59 2024
Time 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 - Production
Version 19.22.0.0.0
set line 300
col PRODUCT for a50
col VERSION for a20
col VERSION_FULL for a20
col STATUS for a20
SELECT * 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 lspatches
35967489;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 lspatches
36115038;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###