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

oracle 19.25补丁安装

dm5250 2024-10-16
702

1、下载补丁包

image-20241016132736293image-20241016132751738

[root@db1 mnt]# chown -R oracle:oinstall 19_25/
[root@db1 mnt]# su - oracle
Last login: Wed Oct 16 13:17:44 CST 2024 on pts/0
[oracle@db1 ~]$ cd /mnt/19_25/
[oracle@db1 19_25]$ ll
total 1866192
-rwx------ 1 oracle oinstall 1776391552 Oct 16 13:24 p36912597_190000_Linux-x86-64.zip
-rwx------ 1 oracle oinstall  134583311 Oct 16 13:19 p6880880_190000_Linux-x86-64.zip

2、升级OPatch

[oracle@db1 19_25]$ opatch version
OPatch Version: 12.2.0.1.17

OPatch succeeded.

[oracle@db1 19_25]$ unzip -qo p6880880_190000_Linux-x86-64.zip -d $ORACLE_HOME
[oracle@db1 19_25]$ opatch version
OPatch Version: 12.2.0.1.44

OPatch succeeded.

3、检查冲突

[oracle@db1 19_25]$ unzip p36912597_190000_Linux-x86-64.zip 
[oracle@db1 19_25]$ cd 36912597/
[oracle@db1 36912597]$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 12.2.0.1.44
Copyright (c) 2024, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/oracle/product/19.3.0.0/db_1
Central Inventory : /home/oracle/oraInventory
   from           : /u01/app/oracle/product/19.3.0.0/db_1/oraInst.loc
OPatch version    : 12.2.0.1.44
OUI version       : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.3.0.0/db_1/cfgtoollogs/opatch/opatch2024-10-16_13-34-36PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

4、升级

[oracle@db1 36912597]$ lsnrctl stop

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 16-OCT-2024 13:35:49

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=db1)(PORT=1521)))
The command completed successfully
[oracle@db1 36912597]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Wed Oct 16 13:35:52 2024
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> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
[oracle@db1 36912597]$ opatch apply
Oracle Interim Patch Installer version 12.2.0.1.44
Copyright (c) 2024, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/19.3.0.0/db_1
Central Inventory : /home/oracle/oraInventory
   from           : /u01/app/oracle/product/19.3.0.0/db_1/oraInst.loc
OPatch version    : 12.2.0.1.44
OUI version       : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.3.0.0/db_1/cfgtoollogs/opatch/opatch2024-10-16_13-36-52PM_1.log

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

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


Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...

Applying interim patch '36912597' to OH '/u01/app/oracle/product/19.3.0.0/db_1'
ApplySession: Optional component(s) [ oracle.network.gsm, 19.0.0.0.0 ] , [ oracle.crypto.rsf, 19.0.0.0.0 ] , [ oracle.pg4appc, 19.0.0.0.0 ] , [ oracle.pg4mq, 19.0.0.0.0 ] , [ oracle.precomp.companion, 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.sdo.companion, 19.0.0.0.0 ] , [ oracle.net.cman, 19.0.0.0.0 ] , [ oracle.oid.client, 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.network.cman, 19.0.0.0.0 ] , [ oracle.rdbms.tg4tera, 19.0.0.0.0 ] , [ oracle.rdbms.tg4ifmx, 19.0.0.0.0 ] , [ oracle.rdbms.tg4sybs, 19.0.0.0.0 ] , [ oracle.ldap.ztk, 19.0.0.0.0 ] , [ oracle.ons.cclient, 19.0.0.0.0 ] , [ oracle.options.olap, 19.0.0.0.0 ] , [ oracle.jdk, 1.8.0.191.0 ] , [ oracle.jdk, 1.8.0.391.11 ]  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.util, 19.0.0.0.0...

Patching component oracle.rdbms.rsf, 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.blaslapack, 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.ons, 19.0.0.0.0...

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

Patching component oracle.oracore.rsf, 19.0.0.0.0...

Patching component oracle.perlint, 5.28.1.0.0...

Patching component oracle.precomp.common.core, 19.0.0.0.0...

Patching component oracle.precomp.rsf, 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.rdbms.rsf.ic, 19.0.0.0.0...

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

Patching component oracle.rhp.db, 19.0.0.0.0...

Patching component oracle.rsf, 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.xdk.rsf, 19.0.0.0.0...

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

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

Patching component oracle.ctx.rsf, 19.0.0.0.0...

Patching component oracle.ovm, 19.0.0.0.0...

Patching component oracle.oraolap, 19.0.0.0.0...

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

Patching component oracle.rdbms.rat, 19.0.0.0.0...

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

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

Patching component oracle.xdk, 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.install.deinstalltool, 19.0.0.0.0...

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

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

Patching component oracle.dbtoolslistener, 19.0.0.0.0...

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

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

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

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

Patching component oracle.rdbms.dm, 19.0.0.0.0...

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

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

Patching component oracle.odbc, 19.0.0.0.0...

Patching component oracle.network.listener, 19.0.0.0.0...

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

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

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

Patching component oracle.network.aso, 19.0.0.0.0...

Patching component oracle.rdbms.locator, 19.0.0.0.0...

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

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

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

Patching component oracle.nlsrtl.rsf.ic, 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.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 36912597 successfully applied.
Sub-set patch [29517242] has become inactive due to the application of a super-set patch [36912597].
Please refer to Doc ID 2161861.1 for any possible further required actions.
Log file location: /u01/app/oracle/product/19.3.0.0/db_1/cfgtoollogs/opatch/opatch2024-10-16_13-36-52PM_1.log

OPatch succeeded.

5、执行Datapatch

[oracle@db1 36912597]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Wed Oct 16 13:49:18 2024
Version 19.25.0.0.0

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

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 1593834768 bytes
Fixed Size                  9178384 bytes
Variable Size            1023410176 bytes
Database Buffers          553648128 bytes
Redo Buffers                7598080 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.25.0.0.0
[oracle@db1 36912597]$ lsnrctl  start

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 16-OCT-2024 13:49:43

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

Starting /u01/app/oracle/product/19.3.0.0/db_1/bin/tnslsnr: please wait...

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=db1)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date                16-OCT-2024 13:49:43
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/19.3.0.0/db_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/db1/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=db1)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully


[oracle@db1 36912597]$ datapatch -sanity_checks
SQL Patching sanity checks version 19.25.0.0.0 on Wed 16 Oct 2024 01:50:07 PM CST
Copyright (c) 2021, 2024, Oracle.  All rights reserved.

Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sanity_checks_20241016_135007_20403/sanity_checks_20241016_135007_20403.log

Running checks
JSON report generated in /u01/app/oracle/cfgtoollogs/sqlpatch/sanity_checks_20241016_135007_20403/sqlpatch_sanity_checks_summary.json file
Checks completed. Printing report:

Check: Database component status - OK
Check: PDB Violations - OK
Check: Invalid System Objects - OK
Check: Tablespace Status - OK
Check: Backup jobs - OK
Check: Temp file exists - OK
Check: Temp file online - OK
Check: Data Pump running - OK
Check: Container status - WARNING
  Datapatch will only run in containers with READ WRITE, MIGRATE (upgrade) or READ ONLY mode.
  Specified containers are not READ WRITE, MIGRATE or READ ONLY mode. When not opened, containers will not be a part of patching.
  Open containers if they should take part of patching activities. Refer to the section "Modifying a PDB with the ALTER PLUGGABLE DATABASE Statement" in the Multitenant Administrator's Guide for details.
  CDB$ROOT:
    |  NAME   | OPEN_MODE |
    |---------+-----------|
    | ORCLPDB |  MOUNTED  |
    |---------+-----------|
Check: Oracle Database Keystore - OK
Check: Dictionary statistics gathering - WARNING
  Patching the database while dictionary statistics are being collected may lead to performance issues.
  Dictionary statistics are currently being collected in the database.
  Consider patching the database when dictionary statistics are not being collected. To check if such operations are currently running, run this query:
    SELECT sofar, totalwork, units, start_time, time_remaining, message
    FROM sys.v$session_longops
    WHERE opname = 'Gather Dictionary Schema Statistics'
    AND time_remaining > 0;
  PDB$SEED:
    |     LATEST      |        OPERATION        |
    |-----------------+-------------------------|
    | 17-APR-19 02:03 | gather_dictionary_stats |
    |-----------------+-------------------------|
Check: Scheduled Jobs - OK
Check: GoldenGate triggers - OK
Check: Logminer DDL triggers - OK
Check: Check sys public grants - OK
Check: Statistics gathering running - OK
Check: Optim dictionary upgrade parameter - OK
Check: Symlinks on oracle home path - OK
Check: Central Inventory - OK
Check: Queryable Inventory dba directories - OK
Check: Queryable Inventory locks - OK
Check: Queryable Inventory package - ERROR
  Datapatch uses Queryable Inventory to get OPatch Inventory information and create a patching installation plan.
  The Queryable Inventory package is not able to retrieve OPatch Inventory information.
  Refer to MOS Note 1602089.1 for details on verifying the Queryable Inventory package before patching.
  CDB$ROOT:
    | RESULT  |
    |---------|
    | Failure |
    |---------|
Check: Queryable Inventory external table - SKIPPED (ERROR)
  Message: Skipped as previous check wasn't executed successfully.
Check: Imperva processes - OK
Check: Guardium processes - OK
Check: Locale - OK

Refer to MOS Note 2680521.1 and debug log
/u01/app/oracle/cfgtoollogs/sqlpatch/sanity_checks_20241016_135007_20403/sanity_checks_debug_20241016_135007_20403.log

SQL Patching sanity checks completed on Wed 16 Oct 2024 01:50:15 PM CST


[oracle@db1 36912597]$ datapatch -verbose
SQL Patching tool version 19.25.0.0.0 Production on Wed Oct 16 13:50:39 2024
Copyright (c) 2012, 2024, Oracle.  All rights reserved.

Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_20620_2024_10_16_13_50_39/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)

Warning: PDB ORCLPDB is in mode MOUNTED and will be skipped.
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.25.0.0.0 Release_Update 241010184253: Installed
  PDB CDB$ROOT:
    Applied 19.3.0.0.0 Release_Update 190410122720 successfully on 26-MAY-23 11.42.03.716318 AM
  PDB PDB$SEED:
    Applied 19.3.0.0.0 Release_Update 190410122720 successfully on 26-MAY-23 11.49.12.218005 AM

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

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

Validating logfiles...done
Patch 36912597 apply (pdb CDB$ROOT): SUCCESS
  logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/36912597/25871884/36912597_apply_DB01_CDBROOT_2024Oct16_13_51_20.log (no errors)
Patch 36912597 apply (pdb PDB$SEED): SUCCESS
  logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/36912597/25871884/36912597_apply_DB01_PDBSEED_2024Oct16_13_58_20.log (no errors)

Automatic recompilation incomplete; run utlrp.sql to revalidate.
  PDBs: PDB$SEED

SQL Patching tool complete on Wed Oct 16 14:03:06 2024

6、完成

[oracle@db1 36912597]$ opatch lspatches
36912597;Database Release Update : 19.25.0.0.241015 (36912597)
29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)

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

评论