暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

docker环境下静默安装19c(含RU补丁)

784

1、上传软件包

\[root@p19jm orasoft\]# ll  
total 4449128  
\-rw-r--r-- 1 root root 195388 Aug 12 15:00 compat-libstdc++-33-3.2.3-72.el7.x86\_64.rpm  
\-rw-r--r-- 1 root root 3059705302 Aug 12 15:02 LINUX.X64\_193000\_db\_home.zip  
\-rw-r--r-- 1 root root 1373118192 Aug 12 15:05 p33515361\_190000\_Linux-x86-64.zip  
\-rw-r--r-- 1 root root 122883931 Aug 12 15:05 p6880880\_190000\_Linux-x86-64.zip 

2、安装依赖包

\[root@p19jm orasoft\]# rpm -ivh compat-libstdc++-33-3.2.3-72.el7.x86\_64.rpm  
Preparing... ################################# \[100%\]  
package compat-libstdc++-33-3.2.3-72.el7.x86\_64 is already installed  
  
  
yum -y install compat-libcap1 compat-libstdc++-33 gcc gcc-c++ glibc-devel ksh libaio-devel libaio-devel sysstat elfutils-libelf-devel fontconfig-devel libxcb smartmontools libX11 libXau libXtst libXrender libXrender-devel 

检查是否安装成功。

rpm --query --queryformat "%{NAME}-%{VERSION}.%{RELEASE} (%{ARCH})\\n" bc binutils compat-libcap1 compat-libstdc++-33 gcc gcc-c++ glibc glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel make sysstat elfutils-libelf elfutils-libelf-devel fontconfig-devel libxcb smartmontools libX11 libXau libXtst libXrender libXrender-devel  
  
  
\[root@p19jm orasoft\]# rpm --query --queryformat "%{NAME}-%{VERSION}.%{RELEASE} (%{ARCH})\\n" bc binutils compat-libcap1 compat-libstdc++-33 gcc gcc-c++ glibc glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel make sysstat elfutils-libelf elfutils-libelf-devel fontconfig-devel libxcb smartmontools libX11 libXau libXtst libXrender libXrender-devel  
bc-1.06.95.13.el7 (x86\_64)  
binutils-2.27.44.base.el7\_9.1 (x86\_64)  
compat-libcap1-1.10.7.el7 (x86\_64)  
compat-libstdc++-33-3.2.3.72.el7 (x86\_64)  
gcc-4.8.5.44.el7 (x86\_64)  
gcc-c++-4.8.5.44.el7 (x86\_64)  
glibc-2.17.326.el7\_9 (x86\_64)  
glibc-2.17.326.el7\_9 (i686)  
glibc-devel-2.17.326.el7\_9 (x86\_64)  
glibc-devel-2.17.326.el7\_9 (i686)  
ksh-20120801.143.el7\_9 (x86\_64)  
libaio-0.3.109.13.el7 (x86\_64)  
libaio-0.3.109.13.el7 (i686)  
libaio-devel-0.3.109.13.el7 (x86\_64)  
libaio-devel-0.3.109.13.el7 (i686)  
libgcc-4.8.5.44.el7 (x86\_64)  
libgcc-4.8.5.44.el7 (i686)  
libstdc++-4.8.5.44.el7 (x86\_64)  
libstdc++-devel-4.8.5.44.el7 (x86\_64)  
make-3.82.24.el7 (x86\_64)  
sysstat-10.1.5.19.el7 (x86\_64)  
elfutils-libelf-0.176.5.el7 (x86\_64)  
elfutils-libelf-devel-0.176.5.el7 (x86\_64)  
fontconfig-devel-2.13.0.4.3.el7 (x86\_64)  
libxcb-1.13.1.el7 (x86\_64)  
libxcb-1.13.1.el7 (i686)  
smartmontools-7.0.2.el7 (x86\_64)  
libX11-1.6.7.4.el7\_9 (x86\_64)  
libX11-1.6.7.4.el7\_9 (i686)  
libXau-1.0.8.2.1.el7 (x86\_64)  
libXau-1.0.8.2.1.el7 (i686)  
libXtst-1.2.3.1.el7 (x86\_64)  
libXtst-1.2.3.1.el7 (i686)  
libXrender-0.9.10.1.el7 (x86\_64)  
libXrender-devel-0.9.10.1.el7 (x86\_64)  

### 3、创建Oracle用户组

groupadd oinstall  
groupadd dba  
groupadd asmdba  
groupadd backupdba  
groupadd dgdba  
groupadd kmdba  
groupadd racdba  
groupadd oper  
useradd -g oinstall -G dba,asmdba,backupdba,dgdba,kmdba,racdba,oper -m oracle  
  
passwd oracle  
  
Changing password for user oracle.  
New password:  
BAD PASSWORD: The password is shorter than 8 characters  
Retype new password:  
passwd: all authentication tokens updated successfully.  
 

4、修改主机名和hosts

hostnamectl set-hostname p19jm  
  
vim /etc/hosts  
172.17.0.3 p19jm  

5、修改内核参数

mount -o remount,size=6g /dev/shm  
  
vim /etc/fstab  
...  
tmpfs /dev/shm tmpfs defaults,size=6g 0 0  
...  
  
vim /etc/sysctl.conf  
  
fs.aio-max-nr = 1048576  
fs.file-max = 6815744  
kernel.shmall = 1572864  
kernel.shmmax = 6442450944  
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 = 1048576  
  
sysctl -p  
  
  
\# vim /etc/security/limits.conf  
  
\# For oracle  
oracle soft nproc 2047  
oracle hard nproc 16384  
oracle soft nofile 1024  
oracle hard nofile 65536  
oracle soft stack 10240  
  

6、关闭selinux和firewall

# 关闭selinux 重启生效

sed -i '/^SELINUX=.\*/ s//SELINUX=disabled/' /etc/selinux/config  
setenforce 0  

# 关闭防火墙
systemctl disable firewalld
systemctl stop firewalld

```

7、创建安装目录

mkdir -p /u01/app/oracle/product/19.3.0/dbhome\_1  
mkdir -p /u01/app/oraInventory  
chown -R oracle:oinstall /u01/  
chmod -R 755 /u01  

8、修改环境变量

vim /home/oracle/.bash\_profile  
  
export ORACLE\_SID=orcl  
export ORACLE\_BASE=/u01/app/oracle  
export ORACLE\_HOME=$ORACLE\_BASE/product/19.3.0/dbhome\_1  
export LD\_LIBRARY\_PATH=$ORACLE\_HOME/lib:/lib:/usr/lib  
export NLS\_DATE\_FORMAT="YYYY-MM-DD HH24:MI:SS"  
export TMP=/tmp  
export TMPDIR=$TMP  
export PATH=$ORACLE\_HOME/bin:$ORACLE\_HOME/OPatch:$PATH  
export EDITOR=vi  
export TNS\_ADMIN=$ORACLE\_HOME/network/admin  
export ORACLE\_PATH=.:$ORACLE\_BASE/dba\_scripts/sql:$ORACLE\_HOME/rdbms/admin  
export SQLPATH=$ORACLE\_HOME/sqlplus/admin  
export NLS\_LANG="AMERICAN\_AMERICA.ZHS16GBK"  
  
source /home/oracle/.bash\_profile  

9、解压并修改安装引导文件

chown oracle:oinstall -R /orasoft  
  
su - oracle  
cd /orasoft  
unzip LINUX.X64\_193000\_db\_home.zip -d $ORACLE\_HOME  
  
  
cd $ORACLE\_HOME/install/response  
cp db\_install.rsp db\_install.rsp.bak  
vim db\_install.rsp  
  

:set nu 显示行号

\-------------主要修改以下参数----------------------------------  
  
oracle.install.option=INSTALL\_DB\_SWONLY // 29行  
UNIX\_GROUP\_NAME=oinstall // 34行  
INVENTORY\_LOCATION=/u01/app/oraInventory // 41行  
ORACLE\_HOME=/u01/app/oracle/product/19.3.0/dbhome\_1 // 45行  
ORACLE\_BASE=/u01/app/oracle // 50行  
oracle.install.db.InstallEdition=EE // 62行  
oracle.install.db.OSDBA\_GROUP=dba // 79行  
oracle.install.db.OSOPER\_GROUP=oper // 85行  
oracle.install.db.OSBACKUPDBA\_GROUP=backupdba // 90行  
oracle.install.db.OSDGDBA\_GROUP=dgdba // 95行  
oracle.install.db.OSKMDBA\_GROUP=kmdba // 100行  
oracle.install.db.OSRACDBA\_GROUP=racdba // 105行  
oracle.install.db.rootconfig.executeRootScript=false // 120行 

10、执行安装

su - oracle  
cd $ORACLE\_HOME  
./runInstaller -silent -responseFile /u01/app/oracle/product/19.3.0/dbhome\_1/install/response/db\_install.rsp  
  
  
\[oracle@p19jm dbhome\_1\]$ ./runInstaller -silent -responseFile /u01/app/oracle/product/19.3.0/dbhome\_1/install/response/db\_install.rsp  
Launching Oracle Database Setup Wizard...  
  
\[WARNING\] \[INS-32047\] The location (/u01/app/oraInventory) specified for the central inventory is not empty.  
ACTION: It is recommended to provide an empty location for the inventory.  
\[WARNING\] \[INS-13014\] Target environment does not meet some optional requirements.  
CAUSE: Some of the optional prerequisites are not met. See logs for details. installActions2022-08-12\_03-46-28PM.log  
ACTION: Identify the list of failed prerequisite checks from the log: installActions2022-08-12\_03-46-28PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.  
The response file for this session can be found at:  
/u01/app/oracle/product/19.3.0/dbhome\_1/install/response/db\_2022-08-12\_03-46-28PM.rsp  
  
You can find the log of this install session at:  
/tmp/InstallActions2022-08-12\_03-46-28PM/installActions2022-08-12\_03-46-28PM.log  
  
As a root user, execute the following script(s):  
1\. /u01/app/oraInventory/orainstRoot.sh  
2\. /u01/app/oracle/product/19.3.0/dbhome\_1/root.sh  
  
Execute /u01/app/oraInventory/orainstRoot.sh on the following nodes:  
\[p19jm\]  
Execute /u01/app/oracle/product/19.3.0/dbhome\_1/root.sh on the following nodes:  
\[p19jm\]  
  
  
Successfully Setup Software with warning(s).  
Moved the install session logs to:  
/u01/app/oraInventory/logs/InstallActions2022-08-12\_03-46-28PM  
 

11、另外打开窗口root执行脚本

su -  
  
/u01/app/oraInventory/orainstRoot.sh  
  
/u01/app/oracle/product/19.3.0/dbhome\_1/root.sh  

12、创建监听

su - oracle  
cd $ORACLE\_HOME  
cd assistants/netca  
cp netca.rsp netca.rsp.bak  
netca -silent -responseFile /u01/app/oracle/product/19.3.0/dbhome\_1/assistants/netca/netca.rsp  
  
  
\[oracle@p19jm netca\]$ netca -silent -responseFile /u01/app/oracle/product/19.3.0/dbhome\_1/assistants/netca/netca.rsp  
Parsing command line arguments:  
Parameter "silent" = true  
Parameter "responsefile" = /u01/app/oracle/product/19.3.0/dbhome\_1/assistan ts/netca/netca.rsp  
Done parsing command line arguments.  
Oracle Net Services Configuration:  
Profile configuration complete.  
Oracle Net Listener Startup:  
Running Listener Control:  
/u01/app/oracle/product/19.3.0/dbhome\_1/bin/lsnrctl start LISTENER  
Listener Control complete.  
Listener started successfully.  
Listener configuration complete.  
Oracle Net Services configuration successful. The exit code is 0  
 

13、修改dbca文件

su - oracle  
cd $ORACLE\_HOME/assistants/dbca  
cp dbca.rsp dbca.rsp.bak  
vim dbca.rsp  

:set nu 显示行号

\-------------主要修改以下参数----------------------------------  
  
gdbName=orcl //32行  
sid=orcl //42行  
databaseConfigType=SI //52行  
templateName=General\_Purpose.dbc //223行  
sysPassword=oracle123 //233行  
systemPassword=oracle123 //243行  
emConfiguration=NONE //262行  
dbsnmpPassword=oracle123 //295行  
datafileDestination=/u01/app/oracle/oradata //411行  
recoveryAreaDestination=/u01/app/oracle/flash\_recovery\_area //421行  
storageType=FS //431行  
characterSet=ZHS16GBK //468行  
nationalCharacterSet=AL16UTF16 //478行  
  
totalMemory=2048 //604行  
  
\# 如果要创建容器数据库,则还需要配置以下参数,如果是多个pdb则以pdbname为前缀  
  
createAsContainerDatabase=true //162行  
numberOfPDBs=1 //172行  
pdbName=yhggi //182行  
pdbAdminPassword=password //203行  

14、建库

dbca -silent -createDatabase -responseFile /u01/app/oracle/product/19.3.0/dbhome\_1/assistants/dbca/dbca.rsp  
  
\[oracle@p19jm dbca\]$ dbca -silent -createDatabase -responseFile /u01/app/oracle/product/19.3.0/dbhome\_1/assistants/dbca/dbca.rsp  
  
\[WARNING\] \[DBT-06208\] The 'SYS' password entered does not conform to the Oracle recommended standards.  
CAUSE:  
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit \[0-9\].  
b.The password entered is a keyword that Oracle does not recommend to be used as password  
ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.  
\[WARNING\] \[DBT-06208\] The 'SYSTEM' password entered does not conform to the Oracle recommended standards.  
CAUSE:  
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit \[0-9\].  
b.The password entered is a keyword that Oracle does not recommend to be used as password  
ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.  
Prepare for db operation  
10% complete  
Copying database files  
40% complete  
Creating and starting Oracle instance  
42% complete  
46% complete  
50% complete  
54% complete  
60% complete  
Completing Database Creation  
66% complete  
69% complete  
70% complete  
Executing Post Configuration Actions  
100% complete  
Database creation complete. For details check the logfiles at:  
/u01/app/oracle/cfgtoollogs/dbca/orcl.  
Database Information:  
Global Database Name:orcl  
System Identifier(SID):orcl  
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/orcl/orcl.log" for further details.  
  

15、验证监听

\[oracle@p19jm dbca\]$ lsnrctl status  
  
LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 12-AUG-2022 16:24:03  
  
Copyright (c) 1991, 2019, Oracle. All rights reserved.  
  
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=p19jm)(PORT=1521)))  
STATUS of the LISTENER  
\------------------------  
Alias LISTENER  
Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production  
Start Date 12-AUG-2022 15:57:21  
Uptime 0 days 0 hr. 26 min. 41 sec  
Trace Level off  
Security ON: Local OS Authentication  
SNMP OFF  
Listener Parameter File /u01/app/oracle/product/19.3.0/dbhome\_1/network/admin/listener.ora  
Listener Log File /u01/app/oracle/diag/tnslsnr/p19jm/listener/alert/log.xml  
Listening Endpoints Summary...  
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=p19jm)(PORT=1521)))  
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))  
Services Summary...  
Service "orcl" has 1 instance(s).  
Instance "orcl", status READY, has 1 handler(s) for this service...  
Service "orclXDB" has 1 instance(s).  
Instance "orcl", status READY, has 1 handler(s) for this service...  
The command completed successfully  
  
如果异常尝试重启监听  
lsnrctl stop  
lsnrctl start  

16、验证SQL plus

\[oracle@p19jm dbca\]$ sqlplus sys/oracle123@//172.17.0.3:1521/orcl as sysdba  
  
SQL\*Plus: Release 19.0.0.0.0 - Production on Fri Aug 12 16:25:57 2022  
Version 19.3.0.0.0  
  
Copyright (c) 1982, 2019, Oracle. All rights reserved.  
  
  
Connected to:  
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production  
Version 19.3.0.0.0  
  
SQL>  
 

17、修改默认参数

\# 默认采用asmm如下,可手动再次调整  
SQL> show parameter target  
  
NAME TYPE VALUE  
\------------------------------------ ----------- ------------------------------  
archive\_lag\_target integer 0  
db\_big\_table\_cache\_percent\_target string 0  
db\_flashback\_retention\_target integer 1440  
fast\_start\_io\_target integer 0  
fast\_start\_mttr\_target integer 0  
memory\_max\_target big integer 0  
memory\_target big integer 0  
parallel\_servers\_target integer 64  
pga\_aggregate\_target big integer 1589M  
sga\_target big integer 4768M  
target\_pdbs integer 0  
  
  
ALTER SYSTEM SET SGA\_TARGET = nM SCOPE=SPFILE SID='\*';  
ALTER SYSTEM SET PGA\_AGGREGATE\_TARGET = nM SCOPE=SPFILE SID='\*';  
  
\# 修改process  
alter system set processes=1000 scope = spfile;  
  
\# 重启  
shutdown immediate  
startup  

18、打RU补丁

(1)替换OPatch。

su - oracle  
cd $ORACLE\_HOME  
mv OPatch OPatch.bak  
cd /orasoft  
unzip p6880880\_190000\_Linux-x86-64.zip -d $ORACLE\_HOME  
  
\[oracle@p19jm orasoft\]$ opatch version  
OPatch Version: 12.2.0.1.29  
  
OPatch succeeded.  

(2)解压验证补丁可行性。

unzip p33515361\_190000\_Linux-x86-64.zip  
cd 33515361  
opatch prereq CheckConflictAgainstOHWithDetail -ph ./  
  
  
\[oracle@p19jm 33515361\]$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./  
Oracle Interim Patch Installer version 12.2.0.1.29  
Copyright (c) 2022, Oracle Corporation. All rights reserved.  
  
PREREQ session  
  
Oracle Home : /u01/app/oracle/product/19.3.0/dbhome\_1  
Central Inventory : /u01/app/oraInventory  
from : /u01/app/oracle/product/19.3.0/dbhome\_1/oraInst.loc  
OPatch version : 12.2.0.1.29  
OUI version : 12.2.0.7.0  
Log file location : /u01/app/oracle/product/19.3.0/dbhome\_1/cfgtoollogs/opatch/opatch2022-08-12\_16-42-59PM\_1.log  
  
Invoking prereq "checkconflictagainstohwithdetail"  
  
Prereq "checkConflictAgainstOHWithDetail" passed.  
  
OPatch succeeded.  
 

(3)关库关监听。

lsnrctl stop  
lsnrctl status  
  
shutdown immediate 

(4)开始打补丁。

unzip p33515361\_190000\_Linux-x86-64.zip  
cd 33515361  
opatch apply  
  
  
\[oracle@p19jm 33515361\]$ opatch apply  
Oracle Interim Patch Installer version 12.2.0.1.29  
Copyright (c) 2022, Oracle Corporation. All rights reserved.  
  
  
Oracle Home : /u01/app/oracle/product/19.3.0/dbhome\_1  
Central Inventory : /u01/app/oraInventory  
from : /u01/app/oracle/product/19.3.0/dbhome\_1/oraInst.loc  
OPatch version : 12.2.0.1.29  
OUI version : 12.2.0.7.0  
Log file location : /u01/app/oracle/product/19.3.0/dbhome\_1/cfgtoollogs/opatch/opatch2022-08-12\_16-46-40PM\_1.log  
  
Verifying environment and performing prerequisite checks...  
OPatch continues with these patches: 33515361  
  
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/oracle/product/19.3.0/dbhome\_1')  
  
  
Is the local system ready for patching? \[y|n\]  
y  
User Responded with: Y  
Backing up files...  
Applying interim patch '33515361' to OH '/u01/app/oracle/product/19.3.0/dbhome\_1'  
ApplySession: Optional component(s) \[ oracle.network.gsm, 19.0.0.0.0 \] , \[ oracle.rdbms.ic, 19.0.0.0.0 \] , \[ oracle.rdbms.tg4db2, 19.0.0.0.0 \] , \[ oracle.tfa, 19.0.0.0.0 \] , \[ oracle.options.olap.api, 19.0.0.0.0 \] , \[ oracle.ons.cclient, 19.0.0.0.0 \] , \[ oracle.network.cman, 19.0.0.0.0 \] , \[ oracle.rdbms.tg4sybs, 19.0.0.0.0 \] , \[ oracle.rdbms.tg4msql, 19.0.0.0.0 \] , \[ oracle.rdbms.tg4ifmx, 19.0.0.0.0 \] , \[ oracle.oid.client, 19.0.0.0.0 \] , \[ oracle.rdbms.tg4tera, 19.0.0.0.0 \] , \[ oracle.net.cman, 19.0.0.0.0 \] , \[ oracle.xdk.companion, 19.0.0.0.0 \] , \[ oracle.ons.eons.bwcompat, 19.0.0.0.0 \] , \[ oracle.options.olap, 19.0.0.0.0 \] , \[ oracle.jdk, 1.8.0.191.0 \] not present in the Oracle Home or a higher version is found.  
  
Patching component oracle.help.ohj, 11.1.1.7.0...  
  
Patching component oracle.perlint, 5.28.1.0.0...  
  
Patching component oracle.rdbms.locator, 19.0.0.0.0...  
  
Patching component oracle.perlint.expat, 2.0.1.0.4...  
  
Patching component oracle.rdbms.rsf, 19.0.0.0.0...  
  
Patching component oracle.rdbms.util, 19.0.0.0.0...  
  
Patching component oracle.rdbms, 19.0.0.0.0...  
  
Patching component oracle.assistants.acf, 19.0.0.0.0...  
  
Patching component oracle.assistants.deconfig, 19.0.0.0.0...  
  
Patching component oracle.assistants.server, 19.0.0.0.0...  
  
Patching component oracle.buildtools.rsf, 19.0.0.0.0...  
  
Patching component oracle.ctx, 19.0.0.0.0...  
  
Patching component oracle.dbjava.ic, 19.0.0.0.0...  
  
Patching component oracle.dbjava.jdbc, 19.0.0.0.0...  
  
Patching component oracle.dbjava.ucp, 19.0.0.0.0...  
  
Patching component oracle.duma, 19.0.0.0.0...  
  
Patching component oracle.javavm.client, 19.0.0.0.0...  
  
Patching component oracle.ldap.owm, 19.0.0.0.0...  
  
Patching component oracle.ldap.rsf, 19.0.0.0.0...  
  
Patching component oracle.ldap.security.osdt, 19.0.0.0.0...  
  
Patching component oracle.marvel, 19.0.0.0.0...  
  
Patching component oracle.network.rsf, 19.0.0.0.0...  
  
Patching component oracle.odbc.ic, 19.0.0.0.0...  
  
Patching component oracle.oracore.rsf, 19.0.0.0.0...  
  
Patching component oracle.precomp.common.core, 19.0.0.0.0...  
  
Patching component oracle.rdbms.dbscripts, 19.0.0.0.0...  
  
Patching component oracle.rdbms.deconfig, 19.0.0.0.0...  
  
Patching component oracle.rdbms.oci, 19.0.0.0.0...  
  
Patching component oracle.rhp.db, 19.0.0.0.0...  
  
Patching component oracle.sdo, 19.0.0.0.0...  
  
Patching component oracle.sdo.locator.jrf, 19.0.0.0.0...  
  
Patching component oracle.sqlplus, 19.0.0.0.0...  
  
Patching component oracle.sqlplus.ic, 19.0.0.0.0...  
  
Patching component oracle.wwg.plsql, 19.0.0.0.0...  
  
Patching component oracle.rdbms.crs, 19.0.0.0.0...  
  
Patching component oracle.rdbms.drdaas, 19.0.0.0.0...  
  
Patching component oracle.xdk.xquery, 19.0.0.0.0...  
  
Patching component oracle.network.client, 19.0.0.0.0...  
  
Patching component oracle.javavm.server, 19.0.0.0.0...  
  
Patching component oracle.rdbms.rman, 19.0.0.0.0...  
  
Patching component oracle.xdk.rsf, 19.0.0.0.0...  
  
Patching component oracle.rdbms.hsodbc, 19.0.0.0.0...  
  
Patching component oracle.odbc, 19.0.0.0.0...  
  
Patching component oracle.precomp.rsf, 19.0.0.0.0...  
  
Patching component oracle.rdbms.lbac, 19.0.0.0.0...  
  
Patching component oracle.oraolap.api, 19.0.0.0.0...  
  
Patching component oracle.rdbms.dv, 19.0.0.0.0...  
  
Patching component oracle.ldap.ssl, 19.0.0.0.0...  
  
Patching component oracle.ons, 19.0.0.0.0...  
  
Patching component oracle.ovm, 19.0.0.0.0...  
  
Patching component oracle.ctx.atg, 19.0.0.0.0...  
  
Patching component oracle.dbdev, 19.0.0.0.0...  
  
Patching component oracle.mgw.common, 19.0.0.0.0...  
  
Patching component oracle.ldap.client, 19.0.0.0.0...  
  
Patching component oracle.ons.ic, 19.0.0.0.0...  
  
Patching component oracle.oraolap, 19.0.0.0.0...  
  
Patching component oracle.oraolap.dbscripts, 19.0.0.0.0...  
  
Patching component oracle.ctx.rsf, 19.0.0.0.0...  
  
Patching component oracle.sdo.locator, 19.0.0.0.0...  
  
Patching component oracle.rdbms.install.common, 19.0.0.0.0...  
  
Patching component oracle.xdk, 19.0.0.0.0...  
  
Patching component oracle.rdbms.install.plugins, 19.0.0.0.0...  
  
Patching component oracle.xdk.parser.java, 19.0.0.0.0...  
  
Patching component oracle.rdbms.scheduler, 19.0.0.0.0...  
  
Patching component oracle.rdbms.hs\_common, 19.0.0.0.0...  
  
Patching component oracle.dbtoolslistener, 19.0.0.0.0...  
  
Patching component oracle.ldap.rsf.ic, 19.0.0.0.0...  
  
Patching component oracle.network.listener, 19.0.0.0.0...  
  
Patching component oracle.nlsrtl.rsf, 19.0.0.0.0...  
  
Patching component oracle.rdbms.rsf.ic, 19.0.0.0.0...  
  
Patching component oracle.precomp.common, 19.0.0.0.0...  
  
Patching component oracle.precomp.lang, 19.0.0.0.0...  
  
Patching component oracle.jdk, 1.8.0.201.0...  
Patch 33515361 successfully applied.  
Sub-set patch \[29517242\] has become inactive due to the application of a super-set patch \[33515361\].  
Please refer to Doc ID 2161861.1 for any possible further required actions.  
Log file location: /u01/app/oracle/product/19.3.0/dbhome\_1/cfgtoollogs/opatch/opatch2022-08-12\_16-46-40PM\_1.log  
  
OPatch succeeded.  

(5)将修改后的SQL文件加载到数据库中。

sqlplus / as sysdba  
startup  
quit  
cd $ORACLE\_HOME/OPatch  
./datapatch -verbose  
  
  
  
\[oracle@p19jm OPatch\]$ ./datapatch -verbose  
SQL Patching tool version 19.14.0.0.0 Production on Fri Aug 12 16:58:05 2022  
Copyright (c) 2012, 2021, Oracle. All rights reserved.  
  
Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch\_25086\_2022\_08\_12\_16\_58\_05/sqlpatch\_invocation.log  
  
Connecting to database...OK  
Gathering database info...done  
Bootstrapping registry and package to current versions...done  
Determining current state...done  
  
Current state of interim SQL patches:  
No interim patches found  
  
Current state of release update SQL patches:  
Binary registry:  
19.14.0.0.0 Release\_Update 211225122123: Installed  
SQL registry:  
Applied 19.3.0.0.0 Release\_Update 190410122720 successfully on 12-AUG-22 04.17.39.372038 PM  
  
Adding patches to installation queue and performing prereq checks...done  
Installation queue:  
No interim patches need to be rolled back  
Patch 33515361 (Database Release Update : 19.14.0.0.220118 (33515361)):  
Apply from 19.3.0.0.0 Release\_Update 190410122720 to 19.14.0.0.0 Release\_Update 211225122123  
No interim patches need to be applied  
  
Installing patches...  
  
  
Patch installation complete. Total patches installed: 1  
  
Validating logfiles...done  
Patch 33515361 apply: SUCCESS  
logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/33515361/24589353/33515361\_apply\_ORCL\_2022Aug12\_16\_58\_58.log (no errors)  
 

(6)打开监听。

lsnrctl start  
lsnrctl status  

(7)验证补丁。

\# 验证补丁是否生效  
opatch lspatches  
  
\# 验证补丁是否已更新至数据库。  
select \* from dba\_registry\_history;  
  
#验证组件状态  
select comp\_name,version,status from sys.dba\_registry;  
  
  
\[oracle@p19jm OPatch\]$ opatch lspatches  
33515361;Database Release Update : 19.14.0.0.220118 (33515361)  
29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)  
  
OPatch succeeded.  
\[oracle@p19jm OPatch\]$ sqlplus / as sysdba  
  
SQL\*Plus: Release 19.0.0.0.0 - Production on Fri Aug 12 17:08:36 2022  
Version 19.14.0.0.0  
  
Copyright (c) 1982, 2021, Oracle. All rights reserved.  
  
  
Connected to:  
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production  
Version 19.14.0.0.0  
  
SQL> select \* from dba\_registry\_history;  
  
ACTION\_TIME  
\---------------------------------------------------------------------------  
ACTION NAMESPACE  
\------------------------------ ------------------------------  
VERSION ID  
\------------------------------ ----------  
COMMENTS  
\--------------------------------------------------------------------------------  
BUNDLE\_SERIES  
\------------------------------  
  
BOOTSTRAP DATAPATCH  
19  
  
ACTION\_TIME  
\---------------------------------------------------------------------------  
ACTION NAMESPACE  
\------------------------------ ------------------------------  
VERSION ID  
\------------------------------ ----------  
COMMENTS  
\--------------------------------------------------------------------------------  
BUNDLE\_SERIES  
\------------------------------  
RDBMS\_19.14.0.0.0DBRU\_LINUX.X64\_211224.3  
  
  
  
ACTION\_TIME  
\---------------------------------------------------------------------------  
ACTION NAMESPACE  
\------------------------------ ------------------------------  
VERSION ID  
\------------------------------ ----------  
COMMENTS  
\--------------------------------------------------------------------------------  
BUNDLE\_SERIES  
\------------------------------  
12-AUG-22 04.17.33.398483 PM  
RU\_APPLY SERVER  
19.0.0.0.0  
  
ACTION\_TIME  
\---------------------------------------------------------------------------  
ACTION NAMESPACE  
\------------------------------ ------------------------------  
VERSION ID  
\------------------------------ ----------  
COMMENTS  
\--------------------------------------------------------------------------------  
BUNDLE\_SERIES  
\------------------------------  
Patch applied on 19.3.0.0.0: Release\_Update - 190410122720  
  
  
  
ACTION\_TIME  
\---------------------------------------------------------------------------  
ACTION NAMESPACE  
\------------------------------ ------------------------------  
VERSION ID  
\------------------------------ ----------  
COMMENTS  
\--------------------------------------------------------------------------------  
BUNDLE\_SERIES  
\------------------------------  
12-AUG-22 05.06.12.242055 PM  
RU\_APPLY SERVER  
19.0.0.0.0  
  
ACTION\_TIME  
\---------------------------------------------------------------------------  
ACTION NAMESPACE  
\------------------------------ ------------------------------  
VERSION ID  
\------------------------------ ----------  
COMMENTS  
\--------------------------------------------------------------------------------  
BUNDLE\_SERIES  
\------------------------------  
Patch applied from 19.3.0.0.0 to 19.14.0.0.0: Release\_Update - 211225122123  
  
  
  
SQL> select comp\_name,version,status from sys.dba\_registry;  
  
COMP\_NAME  
\--------------------------------------------------------------------------------  
VERSION STATUS  
\------------------------------ ----------------------  
Oracle Database Catalog Views  
19.0.0.0.0 VALID  
  
Oracle Database Packages and Types  
19.0.0.0.0 VALID  
  
Oracle Real Application Clusters  
19.0.0.0.0 OPTION OFF  
  
  
COMP\_NAME  
\--------------------------------------------------------------------------------  
VERSION STATUS  
\------------------------------ ----------------------  
JServer JAVA Virtual Machine  
19.0.0.0.0 VALID  
  
Oracle XDK  
19.0.0.0.0 VALID  
  
Oracle Database Java Packages  
19.0.0.0.0 VALID  
  
  
COMP\_NAME  
\--------------------------------------------------------------------------------  
VERSION STATUS  
\------------------------------ ----------------------  
OLAP Analytic Workspace  
19.0.0.0.0 VALID  
  
Oracle XML Database  
19.0.0.0.0 VALID  
  
Oracle Workspace Manager  
19.0.0.0.0 VALID  
  
  
COMP\_NAME  
\--------------------------------------------------------------------------------  
VERSION STATUS  
\------------------------------ ----------------------  
Oracle Text  
19.0.0.0.0 VALID  
  
Oracle Multimedia  
19.0.0.0.0 VALID  
  
Spatial  
19.0.0.0.0 LOADING  
  
  
COMP\_NAME  
\--------------------------------------------------------------------------------  
VERSION STATUS  
\------------------------------ ----------------------  
Oracle OLAP API  
19.0.0.0.0 VALID  
  
Oracle Label Security  
19.0.0.0.0 VALID  
  
Oracle Database Vault  
19.0.0.0.0 VALID  
  
  
15 rows selected.  
  

最后修改时间:2022-08-15 10:25:26
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论