oracle rac 19.3安装补丁19.19

使用opatchauto apply DIR来进行安装
1.升级之前先备份一下GRID_HOME和ORACLE_HOME
2.现在新的opatch安装不需要先停止集群和数据库,在升级过程中,他会自动关闭和启动集群
3.先将OPatch(P6880880)包拷贝到$GRID_HOME和$ORACLE_HOME下,注意先把原来的OPatch备份,修改一下用户组分别为grid:oinstall和oracle_oinstall
4.opatchauto使用root用户执行安装,patch软件包用户组为grid:oinstall
5.RAC可以rolling进行升级

Oracle® Database Patch 35037840 - GI Release Update 19.19.0.0.230418
 
 

 

Oracle® Database

Patch 35037840 - GI Release Update 19.19.0.0.230418

In this document, Oracle Database home refers to Oracle Database Enterprise Edition and Oracle Database Standard Edition.

The GI Release Update 19.19.0.0.230418 includes updates for both the Oracle Grid Infrastructure home and Oracle Database home that can be applied in a rolling fashion.

This patch is Oracle Data Guard Standby-First Installable. See Installing Patch in Oracle Data Guard Standby-First Mode for more information.

The database subpatch includes the JDK fixes released in the prior cycle and will update the JDK in the Oracle home. For the most recent JDK fixes, a separate patch is available and needs to be installed in addition to this patch. Refer to My Oracle Support document 888.1 - Primary Note for Database Proactive Patch Program for the JDK patch number.

For the latest update with security fixes that should be used on client-only installations, refer to the Critical Patch Update (CPU) Program Patch Availability Document (PAD) section on the Oracle Database for the cycle in which you are interested.

This document is accurate at the time of release. For any changes and additional information regarding GI Release Update 19.19.0.0.230418, see this related document that is available at My Oracle Support (My Oracle Support):

  • Note 19202304.9 Oracle Database 19c RU/RUR Apr 2023 Known Issues
  • Document 555.1 Oracle Database 19c Important Recommended One-off Patches
  • Document 888.1 Primary Note for Database Proactive Patch Program
  • Document 1919.2 19c Database Self-Guided Upgrade with Best Practices

This document includes the following sections:

1.1 Patch Information

  • The Oracle Grid Infrastructure patches are cumulative and include the database CPU program security content.
  • Any new or changed database initialization parameters that might be included into a quarterly patch bundle would be documented in the Oracle Database Reference manual section on initialization parameters. For Oracle Database 19c refer to E96196-23.
  • This DBRU contains the following CORE DST patches:
    • 28852325 - DSTV33 UPDATE - TZDATA2018G
    • 29997937 - DSTV34 UPDATE - TZDATA2019B
    • 31335037 - DSTV35 UPDATE - TZDATA2020A
    • 32327201 - DSTV36 UPDATE - TZDATA2020E
    • 33613829 - DSTV37 UPDATE - TZDATA2021E
    • 34006614 - DSTV38 UPDATE - TZDATA2022A
    • 34533061 - DSTV39 UPDATE - TZDATA2022C
    • 34698179 - DSTV40 UPDATE - TZDATA2022E
    • 35099667 - DSTV41 UPDATE - TZDATA2022G

Table 1-1 lists the various configurations and the patch that should be used to patch that configuration.

Table 1-1 Configuration and Database Patch Mapping

ConfigurationGrid VersionDatabase VersionsPatchOPatch Command(1)Comments

Grid home in conjunction with Oracle RAC, Oracle RAC One Node, or single-instance home

19

19

Grid RU/RUR

opatchauto

Grid home and all Oracle homes are patched.

Grid home in conjunction with Oracle RAC, Oracle RAC One Node, or single-instance home

19

19 and prior versions

Grid RU/RUR

opatchauto

Grid home and Oracle home at version 19 are patched.

For Oracle home with a version other than 19, apply the appropriate database RU for that version. For example, apply 19.x RU to database version 19c.

Grid home in conjunction with Oracle RAC, Oracle RAC One Node, or single-instance home

19

Versions prior to 19

Grid RU/RUR

opatchauto

Grid home alone is patched.

For Oracle home, apply the appropriate database RU for that version. For example, apply 19.x RU to database version 19c.

Oracle Restart home

19

19

Grid RU/RUR

opatchauto

Grid home and all the Oracle homes are patched.

Database single-instance home

NA

19

Database RU/RUR

opatch apply

None.

Database client home

NA

19

Database RU/RUR

opatch apply

None.

Footnote 1 OPatchAuto does not support patching in Oracle Data Guard environments. See Installing patch in Oracle Data Guard Standby-First Mode for more information.

Table 1-2 lists the various patches by patch number that are installed as part of this bundle patch.

Table 1-2 Patch Numbers Installed as Part of this Bundle Patch

Patch NumberDescriptionApplicable Homes

35042068

Database Release Update 19.19.0.0.230418

Only Oracle home for non-Oracle RAC setup. Both Oracle home and Grid home for Oracle RAC setup.

35050331

OCW Release Update 19.19.0.0.230418

Both Oracle home and Grid home.

35050325

ACFS Release Update 19.19.0.0.230418 Footnote 2

Only Grid home.

35107512

Tomcat Release Update 19.0.0.0.0Footnote 2

Only Grid home.

33575402

DBWLM Release Update 19.0.0.0.0Footnote 2

Only Grid home.

Footnote 2 Oracle Automatic Storage Management Cluster File System (Oracle ACFS), Apache Tomcat (TOMCAT), and Database Workload Management (DBWLM) subpatches are not applicable to the HP-UX Itanium and Linux on IBM System z platforms.

2.1.1 Patch Installation Prerequisites

It is highly recommended to take a backup of the Oracle home binaries, the Grid home binaries, and Central Inventory prior to applying patches. For further information, refer to Note 565017.1.

You must satisfy the conditions in the following sections before applying the patch:

2.1.1.1 OPatch Utility Information

You must use the OPatch utility version 12.2.0.1.36 or later to apply this patch. Oracle recommends that you use the latest released OPatch version for 12.2 which is available for download from My Oracle Support note 6880880 by selecting the ARU link for the 12.2.0.1.0 OPatch release. It is recommended that you download the OPatch utility and the patch to a shared location in order to access them from any node in the cluster for the patch application on each node.

When patching the Grid home, a shared location on Oracle ACFS only needs to be unmounted on the node where the Grid home is being patched.

The new OPatch utility should be updated in all of the Oracle RAC database homes and the Grid home that are being patched.

For each Oracle RAC database home and the Oracle Grid Infrastructure home that are being patched, as the respective home owner, extract the OPatch utility.

For exact instructions to install OPatch, follow the readme included with the tool download.

For information about OPatch documentation, including any known issues, see My Oracle Support note 293369.1 OPatch documentation list.

2.1.1.2 Validation of Oracle Inventory

Before beginning patch application, check the consistency of inventory information for Grid home and each Oracle home to be patched. Run this command as the respective Oracle home owner to check the consistency:

<span style="color:#000000"><span style="background-color:#ffffff">$ <ORACLE_HOME>/OPatch/opatch lsinventory -detail -oh <ORACLE_HOME>
</span></span>

If this command succeeds, it lists the Oracle components that are installed in the home. Save the output so that you have the status prior to the patch application.

If this command fails, contact Oracle Support Services for assistance.

2.1.1.3 Download and Unzip the Patch

To apply the patch, it must be accessible from all nodes in the Oracle cluster. Download the patch and unzip it to a shared location called the <UNZIPPED_PATCH_LOCATION>. This directory must be empty and cannot be /tmp. Additionally, the directory should have read permission for the ORA_INSTALL group:

<span style="color:#000000"><span style="background-color:#ffffff">$ cd <UNZIPPED_PATCH_LOCATION>
</span></span>

Ensure that the directory is empty:

<span style="color:#000000"><span style="background-color:#ffffff">$ ls
</span></span>

Unzip the patch as the Grid home owner except for installations that do not have any Grid homes. For installations where this patch is applied to the Oracle home only, the patch must be unzipped as the Oracle home owner:

<span style="color:#000000"><span style="background-color:#ffffff">$ unzip p35037840_190000_<platform>.zip
</span></span>
2.1.1.4 Run OPatch Conflict Check

Determine whether any currently installed one-off patches conflict with this patch 35037840 as follows:

  • As the Grid home user:     ###grid用户执行,检查patch的完整性

    <span style="color:#000000"><span style="background-color:#ffffff">% $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir <UNZIPPED_PATCH_LOCATION>/35037840/35042068
    
    % $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir <UNZIPPED_PATCH_LOCATION>/35037840/35050331
    
    % $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir <UNZIPPED_PATCH_LOCATION>/35037840/35050325
    
    % $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir <UNZIPPED_PATCH_LOCATION>/35037840/35107512
    
    % $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir <UNZIPPED_PATCH_LOCATION>/35037840/33575402
    
    				</span></span>

    Note:

    For HP-UX Itanium and Linux on IBM System z platforms, the last two checks in the previous example do not need to be done.

  • For Oracle home, as home user:
    <span style="color:#000000"><span style="background-color:#ffffff">% $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir <UNZIPPED_PATCH_LOCATION>/35037840/35042068
    % $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir <UNZIPPED_PATCH_LOCATION>/35037840/35050331
    </span></span>

The report will indicate the interim patches that conflict with the patch 35037840 and the interim patches for which patch 35037840 is a superset.

Note:

When OPatch starts, it validates the patch and ensures that there are no conflicts with the software already installed in the ORACLE_HOME. OPatch categorizes conflicts into the following types:

  • Conflicts with a patch already applied to the ORACLE_HOME.

    In this case, stop the patch installation and contact Oracle Support Services.

  • Conflicts with subset patch already applied to the ORACLE_HOME.

    In this case, continue with the patch installation because as the new patch contains all the fixes from the existing patch in the ORACLE_HOME. And, in any case, the subset patch will automatically be rolled back prior to the installation of the new patch.

2.1.1.5 Run OPatch System Space Check

Check if enough free space is available on the ORACLE_HOME filesystem for the patches to be applied as given below:

  • For Grid Infrastructure home, as home user:
    1. Create file /tmp/patch_list_gihome.txt with the following content:
      <span style="color:#000000"><span style="background-color:#ffffff">% cat /tmp/patch_list_gihome.txt
      
      <UNZIPPED_PATCH_LOCATION>/35037840/35042068
      <UNZIPPED_PATCH_LOCATION>/35037840/35050331
      <UNZIPPED_PATCH_LOCATION>/35037840/35050325
      <UNZIPPED_PATCH_LOCATION>/35037840/35107512
      <UNZIPPED_PATCH_LOCATION>/35037840/33575402
      </span></span>

      Note:

      For HP-UX Itanium and Linux on IBM System z platforms, the last two rows in the previous example should not be added to the patch_list_gihome.txt file.

    2. Run the OPatch command to check if enough free space is available in the Grid Infrastructure home:
      <span style="color:#000000"><span style="background-color:#ffffff">% $ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_gihome.txt
      </span></span>
  • For Oracle home, as home user:
    1. Create file /tmp/patch_list_dbhome.txt with the following content:
      <span style="color:#000000"><span style="background-color:#ffffff">% cat /tmp/patch_list_dbhome.txt
      <UNZIPPED_PATCH_LOCATION>/35037840/35042068
      <UNZIPPED_PATCH_LOCATION>/35037840/35050331
      </span></span>
    2. Run OPatch command to check if enough free space is available in the Oracle home:
      <span style="color:#000000"><span style="background-color:#ffffff">% $ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_dbhome.txt
      </span></span>

The command output reports pass and fail messages as per the system space availability:

  • If OPatch reports Prereq "checkSystemSpace" failed., then cleanup the system space as the required amount of space is not available.
  • If OPatch reports Prereq "checkSystemSpace" passed., then no action is needed. Proceed with patch installation.

2.1.2 One-off Patch Conflict Detection and Resolution

The fastest and easiest way to determine whether you have one-off patches in the Oracle home that conflict with the patch, and to get the necessary conflict resolution patches, is to use the Patch Recommendations and Patch Plans features on the Patches & Updates tab in My Oracle Support. These features work in conjunction with the My Oracle Support Configuration Manager. Recorded training sessions on these features can be found in note 603505.1.

However, if you are not using My Oracle Support Patch Plans, the My Oracle Support Conflict Checker tool enables you to upload an OPatch inventory and check the patches that you want to apply to your environment for conflicts.

If no conflicts are found, you can download the patches. If conflicts are found, the tool finds an existing resolution to download. If no resolution is found, it will automatically request a resolution, which you can monitor in the Plans and Patch Requests region of the Patches & Updates tab.

For more information, see Knowledge Document 1091294.1How to use the My Oracle Support Conflict Checker Tool.

Or, manually determine whether any currently installed one-off patches conflict with the PSU patch as follows:

  • In the unzipped directory as described in Download and Unzip the Patch.
  • The following commands check for conflicts in both the 19c Grid home and the 19c DB homes.
    • In case you are applying the patch, run this command:   ##冲突检查,使用root用户执行
      <span style="color:#000000"><span style="background-color:#ffffff">#GRID_HOME/OPatch/opatchauto apply <UNZIPPED_PATCH_LOCATION>/35037840 -analyze
      </span></span>
    • In case you are rolling back the patch, run this command:
      <span style="color:#000000"><span style="background-color:#ffffff">#GRID_HOME/OPatch/opatchauto rollback <UNZIPPED_PATCH_LOCATION>/35037840 -analyze
      </span></span>

Note that Oracle proactively generates interim patches for common conflicts.

See My Oracle Support note 1061295.1 Patch Set Updates - One-off Patch Conflict Resolution to determine, for each conflicting patch, whether a conflict resolution patch is already available, and if you need to request a new conflict resolution patch or if the conflict may be ignored.

2.1.3 Patch Installation Checks

The Cluster Verification Utility (CVU) command line interface (CLUVFY) may be used to verify the readiness of the Grid_Home to apply the patch. The CLUVFY command may be issued from the configured Grid_Home or from the downloaded latest version of the CVU standalone release (preferred) from My Oracle Support Patch 30839369

Before applying the patch, the readiness of the Grid_Home can be verified by issuing the cluvfy stage -pre patch command from any one of the cluster nodes. This command reports issues, if any are detected, in the Grid_Home which may affect the patching process.

After applying the patch, the sanity of the patching operation can be verified by issuing the cluvfy stage -post patch command from any of the cluster nodes upon completion of the patch application process.

The CLUVFY command line for patching ensures that the Grid_Home can receive the new patch and also ensures that the patch application process completed successfully leaving the home in the correct state.

2.1.4 OPatchAuto Out-of-Place Patching

Out-of-place patching is a mechanism where patching is done by creating a clone of the Oracle home, applying patches on the cloned home, and switching services to the newly created cloned home. This approach to patching reduces unavailability or downtime of the service by separating the step to create the patched clone home from the step of switching services when they must be restarted.

Out-of-place patching documentation can be found at this link:

Oracle OPatch User's Guide

Note: Users can check OPatchAuto help for syntax and examples to execute out-of-place patching.

2.1.5 OPatchAuto

The OPatch utility has automated the patch application for the Oracle Grid Infrastructure (Grid) home and the Oracle RAC database homes. It operates by querying existing configurations and automating the steps required for patching each Oracle RAC database home of same version and the Grid home.

The utility must be executed by an operating system (OS) user with root privileges, and it must be executed on each node in the cluster if the Grid home or Oracle RAC database home is in non-shared storage. The utility can be run in parallel on the cluster nodes except for the first (any) node.

Depending on command line options specified, one invocation of OPatchAuto can patch the Grid home, Oracle RAC database homes, or both Grid and Oracle RAC database homes of the same Oracle release version as the patch. You can also roll back the patch with the same selectivity.

Add the directory containing the OPatchAuto to the $PATH environment variable. For example:##设置环境变量,下面都是用root用户执行

<span style="color:#000000"><span style="background-color:#ffffff"># export PATH=$PATH:<GI_HOME>/OPatch
</span></span>

Or, when using -oh flag:

<span style="color:#000000"><span style="background-color:#ffffff"># export PATH=$PATH:<oracle_home_path>/OPatch
</span></span>

To patch the Grid home and all Oracle RAC database homes of the same version: ###升级GRID和DB,这一步比较慢,我这边4U服务器144核心512内存实测花了20分钟

<span style="color:#000000"><span style="background-color:#ffffff"># opatchauto apply <UNZIPPED_PATCH_LOCATION>/35037840
</span></span>

To patch only the Grid home:   ###只升级GRID

<span style="color:#000000"><span style="background-color:#ffffff"># opatchauto apply <UNZIPPED_PATCH_LOCATION>/35037840 -oh <GI_HOME>
</span></span>

To patch one or more Oracle RAC database homes:  ###只升级DB

<span style="color:#000000"><span style="background-color:#ffffff"># opatchauto apply <UNZIPPED_PATCH_LOCATION>/35037840 -oh <oracle_home1_path>,<oracle_home2_path>
</span></span>

To roll back the patch from the Grid home and each Oracle RAC database home:

<span style="color:#000000"><span style="background-color:#ffffff"># opatchauto rollback <UNZIPPED_PATCH_LOCATION>/35037840 
</span></span>

To roll back the patch from the Grid home:

<span style="color:#000000"><span style="background-color:#ffffff"># opatchauto rollback <UNZIPPED_PATCH_LOCATION>/35037840 -oh <path to GI home>  
</span></span>

To roll back the patch from the Oracle RAC database home:

<span style="color:#000000"><span style="background-color:#ffffff"># opatchauto rollback <UNZIPPED_PATCH_LOCATION>/35037840 -oh <oracle_home1_path>,<oracle_home2_path> 
</span></span>

For more information about opatchauto, see Oracle® OPatch User's Guide.

For detailed patch installation instructions, see Patch Installation.

2.1.6 Patch Installation

The patch instructions will differ based on the configuration of the Grid infrastructure and the Oracle RAC database homes. Patching instructions for Oracle RAC database homes and Grid together are listed below.

The most common configurations are listed as follows:

For other configurations listed below, see My Oracle Support note 2246888.1:

  • Grid home is not shared, the Oracle home is not shared, Oracle ACFS may be used.
  • Patching Oracle RAC database homes.
  • Patching Grid home alone.
  • Patching Grid home together with Oracle RAC One Node and clusterware-managed single-instance databases.
  • Patching Oracle Restart home.
  • Patching a software only Grid home installation or before the Grid home is configured.
Case 1: Oracle RAC, where the Grid home and the Oracle homes are not shared and Oracle ACFS file system is not configured

As root user, execute the following command on each node of the cluster:

<span style="color:#000000"><span style="background-color:#ffffff"># <GI_HOME>/OPatch/opatchauto apply <UNZIPPED_PATCH_LOCATION>/35037840</span></span>
Case 2: Oracle RAC, where the Grid home is not shared, Oracle home is shared, and Oracle ACFS may be used

Patching instructions:

  1. From the Oracle home, make sure to stop the Oracle RAC databases running on all nodes. As the Oracle home owner execute:
    <span style="color:#000000"><span style="background-color:#ffffff">$ <ORACLE_HOME>/bin/srvctl stop database –d <db-unique-name>
    </span></span>
  2. On the first node, unmount the Oracle ACFS file systems. See My Oracle Support note 1494652.1 for unmounting Oracle ACFS file systems.
  3. On the first node, apply the patch to the Grid home using the opatchauto command. As root user, execute the following command:
    <span style="color:#000000"><span style="background-color:#ffffff"># <GI_HOME>/OPatch/opatchauto apply <UNZIPPED_PATCH_LOCATION>/35037840 -oh <GI_HOME>
    </span></span>
  4. If the message, "A system reboot is recommended before using ACFS" is shown, then a reboot must be issued before continuing. Failure to do so will result in running with an unpatched ACFS\ADVM\OKS driver.
  5. On the first node, remount Oracle ACFS file systems. See My Oracle Support note 1494652.1 for mounting Oracle ACFS file systems.
  6. On the first node, apply the patch to the Oracle home using the opatchauto command. Since the Oracle home is shared, this operation will patch the Oracle home across the cluster. Note that a USM only patch cannot be applied to a Oracle home. As root user, execute the following command:
    <span style="color:#000000"><span style="background-color:#ffffff"># <GI_HOME>/OPatch/opatchauto apply <UNZIPPED_PATCH_LOCATION>/35037840 -oh <ORACLE_HOME>
    </span></span>
  7. On the first node only, restart the Oracle instance, which you have previously stopped in Step 1. As the Oracle home owner execute:
    <span style="color:#000000"><span style="background-color:#ffffff">$ <ORACLE_HOME>/bin/srvctl start instance –d <db-unique-name> -n <nodename>
    </span></span>
  8. On the second (next) node, unmount the Oracle ACFS file systems. See My Oracle Support note 1494652.1 for unmounting Oracle ACFS file systems.
  9. On the second node, apply the patch to Grid home using the opatchauto command. As root user, execute the following command:
    <span style="color:#000000"><span style="background-color:#ffffff"># <GI_HOME>/OPatch/opatchauto apply <UNZIPPED_PATCH_LOCATION>/35037840 -oh <GI_HOME>
    </span></span>
  10. If the message, "A system reboot is recommended before using ACFS" is shown, then a reboot must be issued before continuing. Failure to do so will result in running with an unpatched ACFS\ADVM\OKS driver.
  11. On the second node, running the opatchauto command in Step 9 will restart the stack.
  12. On the second node, remount Oracle ACFS file systems. See My Oracle Support note 1494652.1 for mounting Oracle ACFS file systems.
  13. On the second node only, restart the Oracle instance, which you have previously stopped in Step 1. As the Oracle home owner execute:
    <span style="color:#000000"><span style="background-color:#ffffff">$ <ORACLE_HOME>/bin/srvctl start instance –d <db-unique-name> -n <nodename>
    </span></span>
  14. Repeat steps 8 through 13 for all remaining nodes of the cluster.
Case 3: Single-instance homes not managed by Oracle Grid Infrastructure  

Follow these steps:

  1. If you are using a Data Guard Physical Standby database, you must install this patch on both the primary database and the physical standby database, as described by My Oracle Support note 278641.1.
  2. Shut down all instances and listeners associated with the Oracle home that you are updating. For more information, see Oracle Database Administrator's Guide.
  3. Set your current directory to the directory where the patch is located and then run the OPatch utility by entering the following commands:
  4. ####单实例打补丁,只需要打35042068,用oracle用户执行
    <span style="color:#000000"><span style="background-color:#ffffff">cd <UNZIPPED_PATCH_LOCATION>/35037840/35042068
    opatch apply
    </span></span>
  5. If there are errors, refer to Conflict Issues.

2.1.7 Installing Patch in Oracle Data Guard Standby-First Mode

For Data Guard Standby-First patching, see My Oracle Support note 1265700.1. For Standby-First patching for Oracle database RU 12.2 and higher, the following points need to be considered:

  1. The database RU subpatch 35042068 must be applied to the Data Guard standby using OPatch.
  2. Datapatch must not be invoked on the Data Guard standby environment to apply post patch SQL actions for the database RU. If datapatch is run on a standby, it will error while trying to call the SYS.DBMS_QOPATCH interface. For more details about this error, see My Oracle Support note 1599479.1.
  3. Datapatch must be invoked on the primary database after all the databases, that is primary and Data Guard, are patched and patch deployment of the database RU is complete for the setup.

2.1.8 Patch Post Installation Instructions

After installing the patch, perform the following actions:

  1. Apply conflict resolution patches as explained in Section 2.1.8.1 .
  2. If you are not using OPatchAuto, then load modified SQL files into the database, as explained in Section 2.1.8.2 .
  3. Upgrade Oracle Recovery Manager Catalog, as explained in Section 2.1.8.3.
  4. Bug fixes that may change an existing optimizer execution plan, as explained in Section 2.1.8.4 .
2.1.8.1 Applying Conflict Resolution Patches

Apply the patch conflict resolution interim patches that were determined to be needed when you performed the steps in One-off Patch Conflict Detection and Resolution.

2.1.8.2 Loading Modified SQL Files into the Database

The following steps load modified SQL files into the database. For an Oracle RAC environment, perform these steps on only one node.

Datapatch is run to complete the post-install SQL deployment for the PSU. For further details about Datapatch, including Known/Conflict Issues and workarounds to common problems, see: Database 12c Post Patch SQL Automation (Doc ID 1585822.1).

  1. For each separate database running on the same shared Oracle home being patched, run the datapatch utility as described in Table 1-3.
  2. Table 1-3 Steps to Run the Datapatch Utility for Standalone Oracle Database Versus Single/Multitenant (CDB/PDB) Oracle Database#####将补丁的变更写到数据库中,这一步一定要做,如果是CDB需要将PDB都打开

    StepsStandalone Oracle DatabaseStepsSingle/Multitenant (CDB/PDB) Oracle Database

    1

    % sqlplus /nolog

    1

    % sqlplus /nolog

    2

    SQL> Connect / as sysdba

    2

    SQL> Connect / as sysdba

    3

    SQL> startup

    3

    SQL> startup

    4

    SQL> quit

    4

    SQL> alter pluggable database all open;Foot 1

    5

    % cd $ORACLE_HOME/OPatch

    5

    SQL> quit

    6

    % ./datapatch -verbose

    6

    % cd $ORACLE_HOME/OPatch

    7

    % ./datapatch -verbose

     

    Footnote 1 It is recommended the Post Install step be run on all pluggable databases; however, the following command (SQL> alter pluggable database PDB_NAME open) could be substituted to only open certain PDBs in the single/multitenant database. Doing so will result in the Post Install step only being run on the CDB and opened PDB's. To update a pluggable database at a later date (skipped or newly plugged in), open the database using the alter pluggable database command mentioned previously and rerun the datapatch utility. See My Oracle Support note 1935365.1 Multitenant Unplug/Plug Best Practices for more information about the procedure for unplugging/plugging with different patch releases (in both directions).

    The datapatch utility will then run the necessary apply scripts to load the modified SQL files into the database. An entry will be added to the dba_registry_sqlpatch view reflecting the patch application. In the dba_registry_sqlpatch view, verify the Status for the APPLY is "SUCCESS". For any other status, refer to the following My Oracle Support note for additional information and actions: note 2335899.2 Troubleshooting Assistant: 12c Datapatch Issues.

  3. Check the following log files in $ORACLE_BASE/cfgtoollogs/sqlpatch/35042068/<unique patch ID> for errors:
    <span style="color:#000000"><span style="background-color:#ffffff">35042068_apply_<database SID>_<CDB name>_<timestamp>.log
    </span></span>

    where database SID is the database SID, CDB name is the name of the multitenant container database, and timestamp is of the form YYYYMMMDD_HH_MM_SS.

  4. Any (pluggable) database that has invalid objects after the execution of datapatch should have utlrp.sql run to revalidate those objects.##编译对象
    <span style="color:#000000"><span style="background-color:#ffffff">For example:
    cd $ORACLE_HOME/rdbms/admin
    sqlplus /nolog
    SQL> CONNECT / AS SYSDBA
    SQL> @utlrp.sql
    </span></span>

2.1.8.3 Upgrade Oracle Recovery Manager Catalog

If you are using the Oracle Recovery Manager, the catalog needs to be upgraded. Enter the following command to upgrade it. The UPGRADE CATALOG command must be entered twice to confirm the upgrade.

<span style="color:#000000"><span style="background-color:#ffffff">$ rman catalog username/password@alias
RMAN> UPGRADE CATALOG;
RMAN> UPGRADE CATALOG;
RMAN> EXIT;
</span></span>
2.1.8.4 Bug Fixes That May Change an Existing Optimizer Execution Plan

At the successful conclusion of the patching event, none of the database bug fixes that may change an existing optimizer execution plan are delivered with the bug fix disabled by default. The status of any module bug fixes (which cause an execution plan change) that were in an enabled state prior to starting the patching event are preserved, but no new module bug fixes (which cause an execution plan change) are activated automatically.

Details on this, including the commands to explicitly enable such bug fixes are present in My Oracle Support Document 2147007.1.

2.1.9 Patch Post Installation Instructions for Databases Created or Upgraded After Installation of Patch in the Oracle Home

You must execute the steps in Loading Modified SQL Files into the Database for any new or upgraded database.

2.1.10 Patch Deinstallation

Datapatch is run to complete the post-deinstall SQL deployment for the database subpatch. For further details about Datapatch, including Known/Conflict Issues and workarounds to common problems, see: Database 12c Post Patch SQL Automation (Doc ID 1585822.1).

The patch rollback instructions will differ based on the configuration of the Grid infrastructure and the Oracle RAC database homes. Roll Back instructions for Oracle RAC database homes and Grid are listed below.

The most common configurations are listed as follows:

  • Case 1: Oracle RAC, where the Grid home and Oracle homes are not shared and Oracle ACFS file system is not configured
  • Case 2: Oracle RAC, where the Grid home is not shared, Oracle home is shared and Oracle ACFS may be used
  • Case 3: Single-instance homes not managed by Oracle Grid Infrastructure

For other configurations listed below, see My Oracle Support note 2246888.1:

  • Grid home is not shared, the Oracle home is not shared, Oracle ACFS may be used.
  • Rolling back from Oracle RAC database homes.
  • Rolling back from Grid home alone.
  • Rolling back from Grid home together with Oracle RAC One Node and clusterware-managed single-instance databases.
  • Rolling back the patch from Oracle Restart home.
  • Rolling back the patch from a software only Grid home installation or before the Grid home is configured.

Roll Back the Oracle RAC Database Homes and Grid Together

  • Case 1: Oracle RAC, where the Grid home and Oracle homes are not shared and Oracle ACFS file system is not configured.

    As root user, execute the following command on each node of the cluster.

    <span style="color:#000000"><span style="background-color:#ffffff"># <GI_HOME>/OPatch/opatchauto rollback <UNZIPPED_PATCH_LOCATION>/35037840
    </span></span>

    If the message, "A system reboot is recommended before using ACFS" is shown, then a reboot must be issued before continuing. Failure to do so will result in running with an unpatched ACFS\ADVM\OKS driver.

  • Case 2: Oracle RAC, where the Grid home is not shared, Oracle home is shared and Oracle ACFS may be used.
    1. From the Oracle Oracle home, make sure to stop the Oracle RAC databases running on all nodes. As the Oracle home owner execute:
      <span style="color:#000000"><span style="background-color:#ffffff">$ <ORACLE_HOME>/bin/srvctl stop database –d <db-unique-name>
      </span></span>
    2. On the first node, unmount the Oracle ACFS file systems. See My Oracle Support note 1494652.1 for unmounting Oracle ACFS file systems.
    3. On the first node, roll back the patch from the Grid home using the opatchauto command. As root user, execute the following command:
      <span style="color:#000000"><span style="background-color:#ffffff"># <GI_HOME>/OPatch/opatchauto rollback <UNZIPPED_PATCH_LOCATION>/35037840 -oh <GI_HOME>
      </span></span>
    4. If the message, "A system reboot is recommended before using ACFS" is shown, then a reboot must be issued before continuing. Failure to do so will result in running with an unpatched ACFS\ADVM\OKS driver.
    5. On the first node, remount Oracle ACFS file systems. See My Oracle Support note 1494652.1 for mounting Oracle ACFS file systems.
    6. On the first node, roll back the patch to the Oracle home using the opatchauto command. This operation will rollback the patch to the Oracle home across the cluster given that it is a shared Oracle ACFS home. Note that a USM only patch cannot be applied to a Oracle home. As root user, execute the following command:
      <span style="color:#000000"><span style="background-color:#ffffff"># <GI_HOME>/OPatch/opatchauto rollback <UNZIPPED_PATCH_LOCATION>/35037840
      </span></span>
    7. On the first node only, restart the Oracle instance, which you have previously stopped in Step 1. As the Oracle home owner execute:
      <span style="color:#000000"><span style="background-color:#ffffff">$ <ORACLE_HOME>/bin/srvctl start instance –d <db-unique-name> -n <nodename>
      </span></span>
    8. On the second (next) node, unmount the Oracle ACFS file systems. See My Oracle Support note 1494652.1 for unmounting Oracle ACFS file systems.
    9. On the second node, roll back the patch to Grid home using the opatchauto command. As root user, execute the following command:
      <span style="color:#000000"><span style="background-color:#ffffff"># <GI_HOME>/OPatch/opatchauto rollback <UNZIPPED_PATCH_LOCATION>/35037840
      </span></span>
    10. If the message, "A system reboot is recommended before using ACFS" is shown, then a reboot must be issued before continuing. Failure to do so will result in running with an unpatched ACFS\ADVM\OKS driver.
    11. On the second node, running the opatchauto command in Step 9 will restart the stack.
    12. On the second node, remount Oracle ACFS file systems. See My Oracle Support note 1494652.1 for mounting Oracle ACFS file systems.
    13. On the second node only, restart the Oracle instance, which you have previously stopped in Step 1. As the Oracle home owner execute:
      <span style="color:#000000"><span style="background-color:#ffffff">$ <ORACLE_HOME>/bin/srvctl start instance –d <db-unique-name> -n <nodename>
      </span></span>
    14. Repeat Steps 8 through 13 for all remaining nodes of the cluster.
  • Case 3: Single-instance homes not managed by Oracle Grid Infrastructure

    Follow these steps:

    1. Shut down all instances and listeners associated with the Oracle home that you are updating. For more information, see Oracle Database Administrator's Guide.
    2. Run the OPatch utility specifying the rollback argument as follows.
      <span style="color:#000000"><span style="background-color:#ffffff">opatch rollback -id 35042068
      </span></span>
    3. If there are errors, refer to Conflict Issues.

2.1.11 Patch Post Deinstallation Instructions

After deinstalling the patch, perform the following actions.

2.1.11.1 Run the Datapatch Utility

Perform the following steps:

  1. For each separate Oracle running on the Oracle home being patched, run the datapatch utility as described in Table 1-4. If this is Oracle RAC, run datapatch on only one instance.

    Table 1-4 Steps to Run the datapatch Utility for Standalone Oracle Database Versus Single/Multitenant (CDB/PDB) Oracle Database

    StepsStandalone Oracle DatabaseStepsSingle/Multitenant (CDB/PDB) Oracle Database

    1

    % sqlplus /nolog

    1

    % sqlplus /nolog

    2

    SQL> Connect / as sysdba

    2

    SQL> Connect / as sysdba

    3

    SQL> startup

    3

    SQL> startup

    4

    SQL> quit

    4

    SQL> alter pluggable database all open;Foot 1

    5

    % cd $ORACLE_HOME/OPatch

    5

    SQL> quit

    6

    % ./datapatch -verbose

    6

    % cd $ORACLE_HOME/OPatch

    7

    % ./datapatch -verbose

    Footnote 1 It is recommended the Post Install step be run on all pluggable databases; however, the following command (SQL> alter pluggable database PDB_NAME open ) could be substituted to only open certain PDBs in the single/multitenant database. Doing so will result in the Post Install step only being run on the CDB and opened PDB's. To update a pluggable database at a later date (skipped or newly plugged in), open the database using the alter pluggable database command mentioned previously and rerun the datapatch utility. See My Oracle Support note 1935365.1 Multitenant Unplug/Plug Best Practices for more information about the procedure for unplugging/plugging with different patch releases (in both directions).

    The datapatch utility runs the necessary rollback scripts. An entry is added to the dba_registry_sqlpatch view reflecting the patch application. In the dba_registry_sqlpatch view, verify the Status for the ROLLBACK is "SUCCESS". For any other status, refer to the following My Oracle Support note for additional information and actions: Document 2335899.2 Troubleshooting Assistant: 12c Datapatch Issues.

  2. Check the following log files in $ORACLE_HOME/sqlpatch/35042068/ for errors:
    <span style="color:#000000"><span style="background-color:#ffffff">35042068_rollback_<database SID>_<CDB name>_<timestamp>.log
    </span></span>

    where database SID is the database SID, CDB name is the name of the multitenant container database, and timestamp is of the form YYYYMMMDD_HH_MM_SS.

  3. Any (pluggable) database that has invalid objects after the execution of datapatch should have utlrp.sql run to revalidate those objects.
    <span style="color:#000000"><span style="background-color:#ffffff">For example:
    cd $ORACLE_HOME/rdbms/admin
    sqlplus /nolog
    SQL> CONNECT / AS SYSDBA
    SQL> @utlrp.sql</span></span>
2.1.11.2 Upgrade Oracle Recovery Manager Catalog

If you are using the Oracle Recovery Manager, the catalog needs to be upgraded. Enter the following command to upgrade it. The UPGRADE CATALOG command must be entered twice to confirm the upgrade.

<span style="color:#000000"><span style="background-color:#ffffff">$ rman catalog username/password@alias
RMAN> UPGRADE CATALOG;
RMAN> UPGRADE CATALOG;
RMAN> EXIT;
</span></span>

3.1 Known Issues

For issues documented after the release of this patch, see My Oracle Support note 19202304.9 Oracle Database 19c RU/RUR Apr 2023 Known Issues.

4.1 References

The following documents are references for this patch:

Note 19202304.9 Oracle Database 19c RU/RUR Apr 2023 Known Issues

Note 2690728.2 Best Practices for Oracle Database Upgrade to 19c (Doc ID 2690728.2) - The 19c Upgrade Bible with Best Practices, Recommendations, and Links

Note 2246888.1 Supplemental Readme - Grid Infrastructure Release Update 12.2.0.1.x / 18c / 19c

Note 1494652.1 How to Mount or Unmount Oracle Automatic Storage Management Cluster File System (Oracle ACFS) While Applying Grid Patches?

Note 1585822.1 Datapatch: Database 12c or later Post Patch SQL Automation

Note 360870.1 Impact of Java SE Security Vulnerabilities on Oracle Database and Fusion Middleware Products

Note 2523221.1 Grid Infrastructure 19 Release Updates and Revisions Bugs Fixed Lists

Note 340978.1 genclntsh: Could not locate $ORACLE_HOME/network/admin/shrept.lst

Note 468959.1 Enterprise Manager Grid Control 10.1 and 10.2 Known/Conflict Issues

Oracle® OPatch User's Guide

5.1 Manual Steps for Applying or Rolling Back the Patch

See My Oracle Support note 2246888.1 for cases where opatchauto cannot be used.

6.1 Bugs Fixed by This Patch

See My Oracle Support note 2523221.1 for the list of bugs fixed in this patch.

7.1 Documentation Accessibility

For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at http://www.oracle.com/pls/topic/lookup?ctx=acc&id-docacc.

Access to Oracle Support

Oracle customers that have purchased support have access to electronic support through My Oracle Support. For information, visit My Oracle Support or visit Learning and Support if you are hearing impaired.


Oracle Database Patch 35037840 - GI Release Update 19.19.0.0.230418

Copyright © 2023, Oracle and/or its affiliates.

This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable:

U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government.

This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.

This software or hardware and documentation may provide access to or information about content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services unless otherwise set forth in an applicable agreement between you and Oracle. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services, except as set forth in an applicable agreement between you and Oracle.


Copyright © 2023, Oracle and/or its affiliates.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值