0
点赞
收藏
分享

微信扫一扫

oracle 19.3升级至19.16

小北的爹 2022-11-12 阅读 146

oracle 19.3升级至19.16
系统:CentOS 7.9
环境:单实例
课题:oracle 19.3升级至19.16
说明:要升级19.16,OPatch版本需大于12.2.0.1.30
1、当前DB版本
SQL> select comp_id,status,version from dba_registry;

COMP_ID STATUS VERSION
------------------------------ ----------- ------------------------------
CATALOG VALID 19.0.0.0.0
CATPROC VALID 19.0.0.0.0
JAVAVM VALID 19.0.0.0.0
XML VALID 19.0.0.0.0
CATJAVA VALID 19.0.0.0.0
APS VALID 19.0.0.0.0
RAC OPTION OFF 19.0.0.0.0
OWM VALID 19.0.0.0.0
CONTEXT VALID 19.0.0.0.0
XDB VALID 19.0.0.0.0
ORDIM VALID 19.0.0.0.0

COMP_ID STATUS VERSION
------------------------------ ----------- ------------------------------
SDO VALID 19.0.0.0.0
XOQ VALID 19.0.0.0.0
AMD OPTION OFF 11.2.0.4.0
APEX VALID 3.2.1.00.12

15 rows selected.

SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
[oracle@oel ~]$ sqlplus -v

SQL*Plus: Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

[oracle@oel ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Thu Aug 18 09:08:24 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

2、软件包处理
说明:19.16 DB的RU编号是:34133642,GI的RU编号是:34130714
安装OPatch:
sftp> lcd F:\installmedium\19c\19.15
sftp> cd /soft
sftp> put p6880880_190000_Linux-x86-64.zip
[root@oel soft]# mkdir /patch
sftp> lcd F:\installmedium\19c\19.16
sftp> cd /patch
sftp> put p34133642_190000_Linux-x86-64.zip
[root@oel soft]# chown -R oracle:oinstall /patch

[oracle@oel OPatch]$ pwd
/u01/app/oracle/product/19.3.0/db_1/OPatch
[oracle@oel OPatch]$ ./opatch version
OPatch Version: 12.2.0.1.17

OPatch succeeded.
[oracle@oel soft]$ echo $ORACLE_HOME
/u01/app/oracle/product/19.3.0/db_1
[oracle@oel soft]$ unzip -q -o p6880880_190000_Linux-x86-64.zip -d $ORACLE_HOME
[oracle@oel OPatch]$ ./opatch version
OPatch Version: 12.2.0.1.30

OPatch succeeded.

[oracle@oel patch]$ unzip -q p34133642_190000_Linux-x86-64.zip
[oracle@oel patch]$ pwd
/patch

3、检查补丁冲突
[oracle@oel patch]$ cd 34133642
[oracle@oel 34133642]$ pwd
/patch/34133642
[oracle@oel 34133642]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 12.2.0.1.30
Copyright (c) 2022, Oracle Corporation. All rights reserved.

PREREQ session

Oracle Home : /u01/app/oracle/product/19.3.0/db_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/19.3.0/db_1/oraInst.loc
OPatch version : 12.2.0.1.30
OUI version : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.3.0/db_1/cfgtoollogs/opatch/opatch2022-08-18_13-08-55PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

4、自动补丁安装
说明:apply前关闭数据库、监听、以及oracle相关进程
[oracle@oel 34133642]$ pwd
/patch/34133642
[oracle@oel 34133642]$ echo $ORACLE_HOME
/u01/app/oracle/product/19.3.0/db_1
[oracle@oel 34133642]$ $ORACLE_HOME/OPatch/opatch apply (时间:13:13—13:39)

Oracle Interim Patch Installer version 12.2.0.1.30
Copyright (c) 2022, Oracle Corporation. All rights reserved.


Oracle Home : /u01/app/oracle/product/19.3.0/db_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/19.3.0/db_1/oraInst.loc
OPatch version : 12.2.0.1.30
OUI version : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.3.0/db_1/cfgtoollogs/opatch/opatch2022-08-18_13-10-33PM_1.log

Verifying environment and performing prerequisite checks...
Prerequisite check "CheckActiveFilesAndExecutables" failed.
The details are:


Following active files/executables/libs are used by ORACLE_HOME :/u01/app/oracle/product/19.3.0/db_1
/u01/app/oracle/product/19.3.0/db_1/lib/libclntsh.so.19.1


/u01/app/oracle/product/19.3.0/db_1/bin/oracle


/u01/app/oracle/product/19.3.0/db_1/lib/libsqlplus.so
/u01/app/oracle/product/19.3.0/db_1/lib/libasmclntsh19.so

/u01/app/oracle/product/19.3.0/db_1/bin/tnslsnr
UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed.
Log file location: /u01/app/oracle/product/19.3.0/db_1/cfgtoollogs/opatch/opatch2022-08-18_13-10-33PM_1.log

OPatch failed with error code 73
[oracle@oel 34133642]$ $ORACLE_HOME/OPatch/opatch apply
Oracle Interim Patch Installer version 12.2.0.1.30
Copyright (c) 2022, Oracle Corporation. All rights reserved.


Oracle Home : /u01/app/oracle/product/19.3.0/db_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/19.3.0/db_1/oraInst.loc
OPatch version : 12.2.0.1.30
OUI version : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.3.0/db_1/cfgtoollogs/opatch/opatch2022-08-18_13-33-24PM_1.log

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

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/db_1')


Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '34133642' to OH '/u01/app/oracle/product/19.3.0/db_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.rdbms.tg4ifmx, 19.0.0.0.0 ] , [ oracle.options.olap, 19.0.0.0.0 ] , [ oracle.ons.cclient, 19.0.0.0.0 ] , [ oracle.rdbms.tg4tera, 19.0.0.0.0 ] , [ oracle.sdo.companion, 19.0.0.0.0 ] , [ oracle.xdk.companion, 19.0.0.0.0 ] , [ oracle.options.olap.api, 19.0.0.0.0 ] , [ oracle.ons.eons.bwcompat, 19.0.0.0.0 ] , [ oracle.rdbms.tg4msql, 19.0.0.0.0 ] , [ oracle.oid.client, 19.0.0.0.0 ] , [ oracle.rdbms.tg4sybs, 19.0.0.0.0 ] , [ oracle.net.cman, 19.0.0.0.0 ] , [ oracle.network.cman, 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.bali.jewt, 11.1.1.6.0...

Patching component oracle.bali.ewt, 11.1.1.6.0...

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, 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.dbdev, 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.crs, 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.ctx.rsf, 19.0.0.0.0...

Patching component oracle.ons, 19.0.0.0.0...

Patching component oracle.rdbms.rman, 19.0.0.0.0...

Patching component oracle.rdbms.install.plugins, 19.0.0.0.0...

Patching component oracle.rdbms.scheduler, 19.0.0.0.0...

Patching component oracle.dbtoolslistener, 19.0.0.0.0...

Patching component oracle.nlsrtl.rsf, 19.0.0.0.0...

Patching component oracle.rdbms.install.common, 19.0.0.0.0...

Patching component oracle.ons.ic, 19.0.0.0.0...

Patching component oracle.install.deinstalltool, 19.0.0.0.0...

Patching component oracle.oraolap, 19.0.0.0.0...

Patching component oracle.javavm.server, 19.0.0.0.0...

Patching component oracle.rdbms.hsodbc, 19.0.0.0.0...

Patching component oracle.rdbms.hs_common, 19.0.0.0.0...

Patching component oracle.precomp.rsf, 19.0.0.0.0...

Patching component oracle.xdk.rsf, 19.0.0.0.0...

Patching component oracle.ldap.client, 19.0.0.0.0...

Patching component oracle.odbc, 19.0.0.0.0...

Patching component oracle.oraolap.api, 19.0.0.0.0...

Patching component oracle.ldap.rsf.ic, 19.0.0.0.0...

Patching component oracle.ctx.atg, 19.0.0.0.0...

Patching component oracle.rdbms.drdaas, 19.0.0.0.0...

Patching component oracle.mgw.common, 19.0.0.0.0...

Patching component oracle.xdk.xquery, 19.0.0.0.0...

Patching component oracle.rdbms.dv, 19.0.0.0.0...

Patching component oracle.xdk.parser.java, 19.0.0.0.0...

Patching component oracle.ovm, 19.0.0.0.0...

Patching component oracle.xdk, 19.0.0.0.0...

Patching component oracle.oraolap.dbscripts, 19.0.0.0.0...

Patching component oracle.network.client, 19.0.0.0.0...

Patching component oracle.rdbms.lbac, 19.0.0.0.0...

Patching component oracle.ldap.ssl, 19.0.0.0.0...

Patching component oracle.sdo.locator, 19.0.0.0.0...

Patching component oracle.network.listener, 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 34133642 successfully applied.
Sub-set patch [29517242] has become inactive due to the application of a super-set patch [34133642].
Please refer to Doc ID 2161861.1 for any possible further required actions.
Log file location: /u01/app/oracle/product/19.3.0/db_1/cfgtoollogs/opatch/opatch2022-08-18_13-33-24PM_1.log

OPatch succeeded.

5、检查补丁
[oracle@oel 34133642]$ $ORACLE_HOME/OPatch/opatch lspatches
34133642;Database Release Update : 19.16.0.0.220719 (34133642)
29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)

OPatch succeeded.
[oracle@oel 34133642]$ sqlplus -version

SQL*Plus: Release 19.0.0.0.0 - Production
Version 19.16.0.0.0

6、加载SQL
说明:此步骤为加载变化的SQL到数据库,RAC环境只需在节点1执行。
[oracle@oel 34133642]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Thu Aug 18 13:54:48 2022
Version 19.16.0.0.0

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

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 2466249672 bytes
Fixed Size 8899528 bytes
Variable Size 536870912 bytes
Database Buffers 1912602624 bytes
Redo Buffers 7876608 bytes
Database mounted.
Database opened.
[oracle@oel OPatch]$ cd $ORACLE_HOME/OPatch
[oracle@oel OPatch]$ pwd
/u01/app/oracle/product/19.3.0/db_1/OPatch
[oracle@oel OPatch]$ ./datapatch -verbose (时间:13:56—14:05)
SQL Patching tool version 19.16.0.0.0 Production on Thu Aug 18 13:56:57 2022
Copyright (c) 2012, 2022, Oracle. All rights reserved.

Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_100881_2022_08_18_13_56_57/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.16.0.0.0 Release_Update 220703022223: Installed
SQL registry:
Applied 19.3.0.0.0 Release_Update 190410122720 successfully on 17-AUG-22 08.43.14.494912 PM

Adding patches to installation queue and performing prereq checks...done
Installation queue:
No interim patches need to be rolled back
Patch 34133642 (Database Release Update : 19.16.0.0.220719 (34133642)):
Apply from 19.3.0.0.0 Release_Update 190410122720 to 19.16.0.0.0 Release_Update 220703022223
No interim patches need to be applied

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

Validating logfiles...done
Patch 34133642 apply: SUCCESS
logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/34133642/24865470/34133642_apply_ORCL150_2022Aug18_13_57_28.log (no errors)
SQL Patching tool complete on Thu Aug 18 14:05:01 2022

7、查看版本变化
SQL> col status for a10
SQL> col action for a10
SQL> col action_time for a30
SQL> col desctiption for a60
SQL> set line 200
SQL> select patch_id,patch_type,action,status,action_time,description from dba_registry_sqlpatch;

PATCH_ID PATCH_TYPE ACTION STATUS ACTION_TIME DESCRIPTION
---------- ---------- ---------- ---------- ------------------------------ ----------------------------------------------------------------------------------------------------
29517242 RU APPLY SUCCESS 17-AUG-22 08.43.14.494912 PM Database Release Update : 19.3.0.0.190416 (29517242)
34133642 RU APPLY SUCCESS 18-AUG-22 02.05.01.413978 PM Database Release Update : 19.16.0.0.220719 (34133642)
SQL> col version for a25
SQL> col comments for a80
SQL> select action_time,version,comments from dba_registry_history;

ACTION_TIME VERSION COMMENTS
------------------------------ ------------------------- --------------------------------------------------------------------------------
24-AUG-13 12.03.45.119862 PM 11.2.0.4 Patchset 11.2.0.2.0
13-APR-22 11.15.49.782861 PM 11.2.0.4 Patchset 11.2.0.2.0
19 RDBMS_19.16.0.0.0DBRU_LINUX.X64_220701
17-AUG-22 08.43.10.619660 PM 19.0.0.0.0 Patch applied on 19.3.0.0.0: Release_Update - 190410122720
17-AUG-22 08.44.42.703002 PM 19.0.0.0.0 Upgraded from 11.2.0.4.0 to 19.3.0.0.0
18-AUG-22 02.04.16.202056 PM 19.0.0.0.0 Patch applied from 19.3.0.0.0 to 19.16.0.0.0: Release_Update - 220703022223

6 rows selected.
SQL> select comp_id,status,version from dba_registry;

COMP_ID STATUS VERSION
------------------------------ ---------- -------------------------
CATALOG VALID 19.0.0.0.0
CATPROC VALID 19.0.0.0.0
JAVAVM VALID 19.0.0.0.0
XML VALID 19.0.0.0.0
CATJAVA VALID 19.0.0.0.0
APS VALID 19.0.0.0.0
RAC OPTION OFF 19.0.0.0.0
OWM VALID 19.0.0.0.0
CONTEXT VALID 19.0.0.0.0
XDB VALID 19.0.0.0.0
ORDIM VALID 19.0.0.0.0

COMP_ID STATUS VERSION
------------------------------ ---------- -------------------------
SDO LOADING 19.0.0.0.0
XOQ VALID 19.0.0.0.0
AMD OPTION OFF 11.2.0.4.0
APEX VALID 3.2.1.00.12

15 rows selected.

举报

相关推荐

0 条评论