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

Oracle-19C-单实例-打版本升级补丁

原创 水羽 2022-09-08
3112

一、升级OPatch工具

Oracle19c的补丁升级需要使用最新版的OPatch工具,下载地址:https://updates.oracle.com/download/6880880.html
下载之后,文件名为:p6880880_190000_Linux-x86-64.zip。我将其重命名为OPatch-for19c-12.2.0.1.24-p6880880_190000_Linux-x86-64.zip

查询当前数据库环境下的OPatch版本信息:

[oracle@ora242 OPatch]$ pwd
/opt/oracle/product/19c/dbhome_1/OPatch

[oracle@ora242 OPatch]$ ./opatch version
OPatch Version: 12.2.0.1.17

OPatch succeeded.

升级OPatch前,先给当前版本做个备份:

[oracle@ora242 dbhome_1]$ pwd
/opt/oracle/product/19c/dbhome_1

[oracle@ora242 dbhome_1]$ zip -qr OPatch_old.zip ./OPatch

[oracle@ora242 dbhome_1]$ ls -lh
……
drwxr-x--- 14 oracle oinstall 4.0K Nov 1 2019 OPatch
-rw-r--r-- 1 oracle oinstall 107M Dec 4 10:00 OPatch_old.zip
……

然后删除原版OPatch目录:
[oracle@ora242 dbhome_1]$ mv OPatch OPatch_old
—— 我是直接重命名了原目录。

然后把新版的OPatch压缩包解压到该$ORACLE_HOME目录下:

[oracle@ora242 dbhome_1]$ unzip -qn /fra/software/OPatch-for19c-12.2.0.1.24-p6880880_190000_Linux-x86-64.zip -d $ORACLE_HOME

[oracle@ora242 dbhome_1]$ ls -lh
……
drwxr-x--- 15 oracle oinstall 4.0K Nov 6 03:52 OPatch
drwxr-x--- 14 oracle oinstall 4.0K Nov 1 2019 OPatch_old
-rw-r--r-- 1 oracle oinstall 107M Dec 4 10:00 OPatch_old.zip
……
[oracle@ora242 dbhome_1]$ cd OPatch
[oracle@ora242 OPatch]$ ./opatch version
OPatch Version: 12.2.0.1.24

OPatch succeeded.

—— 升级OPatch完成。

二、打DB补丁

补丁下载:
打开 https://support.oracle.com/portal/
左侧点击Knowledge, 右侧的搜索框内 输入关键字:2118136.2
可以下载到截止目前的Oracle所有版本的补丁,前提是有MOS账户。

RU:Oracle Database Updates (Versions 12.2 & higher)
RUR:Oracle Database Update Revisions (Versions 12.2 & higher)

环境变量:确保oracle账户的$PATH环境变量里包含以下路径:/usr/ccs/bin
export PATH=$PATH:/usr/ccs/bin
也可以把OPatch的路径也加入到$PATH环境变量里:$ORACLE_HOME/OPatch

[oracle@ora242 software]$ unzip -qn Oracle-RU-19.10-p32218454_190000_Linux-x86-64.zip
解压后,得到32218454目录。
[oracle@ora242 software]$ cd 32218454/
[oracle@oramod 32218454]$ ls -lh
total 84K
drwxr-x--- 3 oracle oinstall 21 Jan 15 00:24 custom
drwxr-x--- 3 oracle oinstall 20 Jan 15 00:24 etc
drwxr-x--- 38 oracle oinstall 4.0K Jan 15 00:24 files
-rw-r--r-- 1 oracle oinstall 74K Jan 15 00:24 README.html
-rw-r--r-- 1 oracle oinstall 21 Jan 15 00:24 README.txt

—— 可以把 README.html 拷出来,用浏览器打开,里面有打补丁的详细步骤命令。

检查补丁环境(结果应是:passed)

[oracle@oramod 32218454]$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./

Oracle Interim Patch Installer version 12.2.0.1.24
Copyright (c) 2021, Oracle Corporation. All rights reserved.

PREREQ session

Oracle Home : /opt/oracle/product/19c/dbhome_1
Central Inventory : /opt/oracle/oraInventory
from : /opt/oracle/product/19c/dbhome_1/oraInst.loc
OPatch version : 12.2.0.1.24
OUI version : 12.2.0.7.0
Log file location : /opt/oracle/product/19c/dbhome_1/cfgtoollogs/opatch/opatch2021-03-25_08-32-00AM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

可以从【Log file location】打开相关的log文件查看详细信息。

可以从dba_registry_sqlpatch数据字典中查看补丁升级历史:
select * from dba_registry_sqlpatch;

如果此时系统上还没有建库,也没有建监听,则可以跳过以下关库关监听的操作,直接到【备份当前的$ORACLE_HOME】那一步开始,也由于系统环境本身还没有库,所以后续的【datapatch -verbose】操作也不需要做,只要打完补丁后,再按正常的方式netca建监听,然后dbca建库,就可以了。

如果打补丁之前,系统环境上已经有库和监听,则按以下方式操作:

关库(包括CDB和PDB):

[oracle@ora242 CLSQ242]$ sqlplus /nolog

SQL*Plus: Release 19.0.0.0.0 - Production on Wed Dec 16 16:08:45 2020
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle. All rights reserved.

SQL> conn /as sysdba
Connected.
SQL> select instance_name,status from v$instance;

INSTANCE_NAME STATUS
---------------- ------------
clsq OPEN

SQL> col name for a12
SQL> select name,open_mode from v$containers;

NAME OPEN_MODE
------------ ----------
CDB$ROOT READ WRITE
PDB$SEED READ ONLY
JSTLQ READ WRITE

SQL> show con_name;

CON_NAME
------------------------------
CDB$ROOT

SQL> alter pluggable database all close immediate;

Pluggable database altered.

SQL> select name,open_mode from v$containers;

NAME OPEN_MODE
------------ ----------
CDB$ROOT READ WRITE
PDB$SEED READ ONLY
JSTLQ MOUNTED

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit

关监听:

[oracle@ora242 CLSQ242]$ lsnrctl status

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 16-DEC-2020 16:20:55

Copyright (c) 1991, 2019, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.10.8.242)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date 28-SEP-2020 15:01:18
Uptime 79 days 1 hr. 19 min. 37 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/oracle/product/19c/dbhome_1/network/admin/listener.ora
Listener Log File /opt/oracle/diag/tnslsnr/ora242/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.10.8.242)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "clsq" has 1 instance(s).
Instance "clsq", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

[oracle@ora242 CLSQ242]$ lsnrctl stop

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 16-DEC-2020 16:20:59

Copyright (c) 1991, 2019, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.10.8.242)(PORT=1521)))
The command completed successfully

[oracle@ora242 CLSQ242]$ lsnrctl status

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 16-DEC-2020 16:21:27

Copyright (c) 1991, 2019, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.10.8.242)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 2: No such file or directory

然后备份当前的$ORACLE_HOME:

[oracle@ora242 19c]$ zip -qr dbhome_1_20201216.zip ./dbhome_1
[oracle@ora242 19c]$ du -sh *
7.4G dbhome_1
3.5G dbhome_1_20201216.zip

进入补丁程序目录:
[oracle@ora242 31771877]$ pwd
/fra/software/31771877

然后开始应用补丁包进行版本升级:

[oracle@oramod 32218454]$ opatch apply

Oracle Interim Patch Installer version 12.2.0.1.24
Copyright (c) 2021, Oracle Corporation. All rights reserved.

Oracle Home : /opt/oracle/product/19c/dbhome_1
Central Inventory : /opt/oracle/oraInventory
from : /opt/oracle/product/19c/dbhome_1/oraInst.loc
OPatch version : 12.2.0.1.24
OUI version : 12.2.0.7.0
Log file location : /opt/oracle/product/19c/dbhome_1/cfgtoollogs/opatch/opatch2021-03-25_08-33-48AM_1.log

Verifying environment and performing prerequisite checks...
OPatch continues with these patches: 32218454

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 = '/opt/oracle/product/19c/dbhome_1')

Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '32218454' to OH '/opt/oracle/product/19c/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.net.cman, 19.0.0.0.0 ] , [ oracle.network.cman, 19.0.0.0.0 ] , [ oracle.oid.client, 19.0.0.0.0 ] , [ oracle.options.olap.api, 19.0.0.0.0 ] , [ oracle.options.olap, 19.0.0.0.0 ] , [ oracle.xdk.companion, 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.rdbms, 19.0.0.0.0...
Patching component oracle.rdbms.rsf, 19.0.0.0.0...
Patching component oracle.rdbms.util, 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.dbtoolslistener, 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.network.rsf, 19.0.0.0.0...
Patching component oracle.oracore.rsf, 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.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.xdk, 19.0.0.0.0...
Patching component oracle.marvel, 19.0.0.0.0...
Patching component oracle.xdk.rsf, 19.0.0.0.0...
Patching component oracle.ctx.atg, 19.0.0.0.0...
Patching component oracle.rdbms.scheduler, 19.0.0.0.0...
Patching component oracle.rdbms.lbac, 19.0.0.0.0...
Patching component oracle.duma, 19.0.0.0.0...
Patching component oracle.ldap.rsf.ic, 19.0.0.0.0...
Patching component oracle.odbc, 19.0.0.0.0...
Patching component oracle.ctx.rsf, 19.0.0.0.0...
Patching component oracle.oraolap.api, 19.0.0.0.0...
Patching component oracle.xdk.parser.java, 19.0.0.0.0...
Patching component oracle.oraolap, 19.0.0.0.0...
Patching component oracle.sdo.locator, 19.0.0.0.0...
Patching component oracle.sqlplus.ic, 19.0.0.0.0...
Patching component oracle.mgw.common, 19.0.0.0.0...
Patching component oracle.ons, 19.0.0.0.0...
Patching component oracle.dbdev, 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.ovm, 19.0.0.0.0...
Patching component oracle.oraolap.dbscripts, 19.0.0.0.0...
Patching component oracle.xdk.xquery, 19.0.0.0.0...
Patching component oracle.precomp.rsf, 19.0.0.0.0...
Patching component oracle.javavm.client, 19.0.0.0.0...
Patching component oracle.precomp.common.core, 19.0.0.0.0...
Patching component oracle.ldap.security.osdt, 19.0.0.0.0...
Patching component oracle.rdbms.oci, 19.0.0.0.0...
Patching component oracle.rdbms.rman, 19.0.0.0.0...
Patching component oracle.rdbms.crs, 19.0.0.0.0...
Patching component oracle.rdbms.install.common, 19.0.0.0.0...
Patching component oracle.javavm.server, 19.0.0.0.0...
Patching component oracle.rdbms.drdaas, 19.0.0.0.0...
Patching component oracle.rdbms.install.plugins, 19.0.0.0.0...
Patching component oracle.rdbms.dv, 19.0.0.0.0...
Patching component oracle.ldap.client, 19.0.0.0.0...
Patching component oracle.network.client, 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 32218454 successfully applied.
Sub-set patch [29517242] has become inactive due to the application of a super-set patch [32218454].
Please refer to Doc ID 2161861.1 for any possible further required actions.
Log file location: /opt/oracle/product/19c/dbhome_1/cfgtoollogs/opatch/opatch2021-03-25_08-33-48AM_1.log

OPatch succeeded.

[oracle@ora242 19c]$ du -sh *
8.9G dbhome_1
3.5G dbhome_1_20201216.zip

启动数据库(CDB和PDB):

[oracle@ora242 19c]$ sqlplus /nolog

SQL*Plus: Release 19.0.0.0.0 - Production on Wed Dec 16 17:00:31 2020
Version 19.9.0.0.0

Copyright (c) 1982, 2020, Oracle. All rights reserved.

SQL> conn /as sysdba
Connected to an idle instance.

SQL> startup mount;
ORACLE instance started.

Total System Global Area 3221223192 bytes
Fixed Size 9139992 bytes
Variable Size 2449473536 bytes
Database Buffers 754974720 bytes
Redo Buffers 7634944 bytes
Database mounted.

SQL> alter database open;

Database altered.

SQL> col name for a12
SQL> select name,open_mode from v$containers;

NAME OPEN_MODE
------------ ----------
CDB$ROOT READ WRITE
PDB$SEED READ ONLY
JSTLQ MOUNTED

SQL> alter pluggable database all open;

Pluggable database altered.

SQL> select name,open_mode from v$containers;

NAME OPEN_MODE
------------ ----------
CDB$ROOT READ WRITE
PDB$SEED READ ONLY
JSTLQ READ WRITE

SQL> quit

进入$ORACLE_HOME的OPatch目录:

[oracle@ora242 OPatch]$ pwd
/opt/oracle/product/19c/dbhome_1/OPatch

[oracle@ora242 OPatch]$ ./datapatch -verbose

SQL Patching tool version 19.9.0.0.0 Production on Wed Dec 16 17:06:21 2020
Copyright (c) 2012, 2020, Oracle. All rights reserved.

Log file for this invocation: /opt/oracle/cfgtoollogs/sqlpatch/sqlpatch_19076_2020_12_16_17_06_21/sqlpatch_invocation.log

Connecting to database...OK
Gathering database info...done

Note: Datapatch will only apply or rollback SQL fixes for PDBs
that are in an open state, no patches will be applied to closed PDBs.
Please refer to Note: Datapatch: Database 12c Post Patch SQL Automation
(Doc ID 1585822.1)

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.9.0.0.0 Release_Update 200930183249: Installed
PDB CDB$ROOT:
Applied 19.3.0.0.0 Release_Update 190410122720 successfully on 15-NOV-19 09.32.56.941731 AM
PDB JSTLQ:
Applied 19.3.0.0.0 Release_Update 190410122720 successfully on 15-NOV-19 09.43.28.338613 AM
PDB PDB$SEED:
Applied 19.3.0.0.0 Release_Update 190410122720 successfully on 15-NOV-19 09.43.28.338613 AM

Adding patches to installation queue and performing prereq checks...done
Installation queue:
For the following PDBs: CDB$ROOT PDB$SEED JSTLQ
No interim patches need to be rolled back
Patch 31771877 (Database Release Update : 19.9.0.0.201020 (31771877)):
Apply from 19.3.0.0.0 Release_Update 190410122720 to 19.9.0.0.0 Release_Update 200930183249
No interim patches need to be applied

Installing patches...
Patch installation complete. Total patches installed: 3

Validating logfiles...done
Patch 31771877 apply (pdb CDB$ROOT): SUCCESS
logfile: /opt/oracle/cfgtoollogs/sqlpatch/31771877/23869227/31771877_apply_CLSQ_CDBROOT_2020Dec16_17_07_09.log (no errors)
Patch 31771877 apply (pdb PDB$SEED): SUCCESS
logfile: /opt/oracle/cfgtoollogs/sqlpatch/31771877/23869227/31771877_apply_CLSQ_PDBSEED_2020Dec16_17_16_32.log (no errors)
Patch 31771877 apply (pdb JSTLQ): SUCCESS
logfile: /opt/oracle/cfgtoollogs/sqlpatch/31771877/23869227/31771877_apply_CLSQ_JSTLQ_2020Dec16_17_16_32.log (no errors)
SQL Patching tool complete on Wed Dec 16 17:25:00 2020
[oracle@ora242 OPatch]$

重编译全库失效对象:

[oracle@ora242 OPatch]$ sqlplus /nolog

SQL*Plus: Release 19.0.0.0.0 - Production on Thu Dec 17 09:16:49 2020
Version 19.9.0.0.0

Copyright (c) 1982, 2020, Oracle. All rights reserved.

SQL> conn /as sysdba
Connected.

SQL> select instance_name,status,archiver,version_full,startup_time from v$instance;

INSTANCE_NAME STATUS ARCHIVE VERSION_FULL STARTUP_TIME
---------------- ------------ ------- ----------------- -----------------------
clsq OPEN STARTED 19.9.0.0.0 2020-dec-16 17:01:13

SQL> show con_name;

CON_NAME
------------------------------
CDB$ROOT

SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql

Session altered.
……

SQL> alter session set container=jstlq;

Session altered.

SQL> show con_name;

CON_NAME
------------------------------
JSTLQ

SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql

Session altered.
……

PS:如果有使用RMAN的catalog功能,记得升级一下catalog:注意【UPGRADE CATALOG】命令要运行两次:

$ rman catalog username/password@alias
RMAN> UPGRADE CATALOG;
RMAN> UPGRADE CATALOG;
RMAN> EXIT;

如果没有使用RMAN的catalog功能,就可以开启监听:

[oracle@ora242 OPatch]$ lsnrctl status

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 17-DEC-2020 10:31:47

Copyright (c) 1991, 2020, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.10.8.242)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 2: No such file or directory

[oracle@ora242 OPatch]$ lsnrctl start

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 17-DEC-2020 10:31:52

Copyright (c) 1991, 2020, Oracle. All rights reserved.

Starting /opt/oracle/product/19c/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 19.0.0.0.0 - Production
System parameter file is /opt/oracle/product/19c/dbhome_1/network/admin/listener.ora
Log messages written to /opt/oracle/diag/tnslsnr/ora242/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.10.8.242)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.10.8.242)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date 17-DEC-2020 10:31:52
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/oracle/product/19c/dbhome_1/network/admin/listener.ora
Listener Log File /opt/oracle/diag/tnslsnr/ora242/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.10.8.242)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "clsq" has 1 instance(s).
Instance "clsq", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

[oracle@ora242 OPatch]$ lsnrctl status

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 17-DEC-2020 10:34:13

Copyright (c) 1991, 2020, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.10.8.242)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date 17-DEC-2020 10:31:52
Uptime 0 days 0 hr. 2 min. 20 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/oracle/product/19c/dbhome_1/network/admin/listener.ora
Listener Log File /opt/oracle/diag/tnslsnr/ora242/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.10.8.242)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=ora242)(PORT=5500))(Security=(my_wallet_directory=/opt/oracle/admin/clsq242/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "86b637b62fdf7a65e053f706e80a27ca" has 1 instance(s).
Instance "clsq", status READY, has 1 handler(s) for this service...
Service "9759cee954411c31e053f1080a0a834c" has 1 instance(s).
Instance "clsq", status READY, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "clsq" has 1 instance(s).
Instance "clsq", status UNKNOWN, has 1 handler(s) for this service...
Service "clsq242" has 1 instance(s).
Instance "clsq", status READY, has 1 handler(s) for this service...
Service "clsqXDB" has 1 instance(s).
Instance "clsq", status READY, has 1 handler(s) for this service...
Service "jstlq" has 1 instance(s).
Instance "clsq", status READY, has 1 handler(s) for this service...
The command completed successfully

到数据库里查询一下版本信息:

[oracle@ora242 OPatch]$ sqlplus /nolog

SQL*Plus: Release 19.0.0.0.0 - Production on Thu Dec 17 10:41:14 2020
Version 19.9.0.0.0

Copyright (c) 1982, 2020, Oracle. All rights reserved.

SQL> conn /as sysdba
Connected.

SQL> select instance_name,host_name,version_full,startup_time,status,archiver from v$instance;

INSTANCE_NAME HOST_NAME VERSION_FULL STARTUP_TIME STATUS ARCHIVE
---------------- --------- ----------------- ----------------------- ------------ -------
clsq ora242 19.9.0.0.0 2020-dec-16 17:01:13 OPEN STARTED

col banner_full for a72
SQL> select banner_full from v$version;

BANNER_FULL
------------------------------------------------------------------------
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.9.0.0.0

col comp_id for a8
col comp_name for a35
col version_full for a12
col status for a10
SQL> select comp_id,comp_name,version_full,status from dba_registry;

COMP_ID COMP_NAME VERSION_FULL STATUS
-------- ----------------------------------- ------------ ----------
CATALOG Oracle Database Catalog Views 19.9.0.0.0 VALID
CATPROC Oracle Database Packages and Types 19.9.0.0.0 VALID
RAC Oracle Real Application Clusters 19.9.0.0.0 OPTION OFF
JAVAVM JServer JAVA Virtual Machine 19.9.0.0.0 VALID
XML Oracle XDK 19.9.0.0.0 VALID
CATJAVA Oracle Database Java Packages 19.9.0.0.0 VALID
APS OLAP Analytic Workspace 19.9.0.0.0 VALID
XDB Oracle XML Database 19.9.0.0.0 VALID
OWM Oracle Workspace Manager 19.9.0.0.0 VALID
CONTEXT Oracle Text 19.9.0.0.0 VALID
ORDIM Oracle Multimedia 19.9.0.0.0 VALID
SDO Spatial 19.9.0.0.0 VALID
XOQ Oracle OLAP API 19.9.0.0.0 VALID
OLS Oracle Label Security 19.9.0.0.0 VALID
DV Oracle Database Vault 19.9.0.0.0 VALID

15 rows selected.

SQL> select patch_id,patch_type,action,status,source_version,target_version from dba_registry_sqlpatch;

PATCH_ID PATCH_TYPE ACTION STATUS SOURCE_VERSION TARGET_VERSION
---------- ---------- --------------- ---------- --------------- ---------------
29517242 RU APPLY SUCCESS 19.1.0.0.0 19.3.0.0.0
31771877 RU APPLY SUCCESS 19.3.0.0.0 19.9.0.0.0

col version for a12
SQL> select VERSION,VERSION_FULL,STATUS from product_component_version;

VERSION VERSION_FULL STATUS
------------ ------------ ----------
19.0.0.0.0 19.9.0.0.0 Production

=============== 19C 打升级补丁 完成 ==================

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

评论