DBCA is the recommended patch maintenance for single-instance Oracle Database.

To simplify the patching process, Oracle recommends that you use DBCA for most single-instance Oracle Database deployments. DBCA is a preferred database maintenance utility to use for all On Premises database patch maintenance.

Note:

As a best practice to simplify maintenance and avoid potential issues, Oracle strongly recommends that you perform database maintenance using a new Oracle home and out-of-place patching. This is the preferred deployment choice for patching operations.

When Do You Need to Patch Your Database

To support the security of your database, and to maintain that security over time, Oracle recommends that you perform database maintenance using the quarterly Release Updates (RUs).

Be aware of these guidelines as a best practice before you begin:

  • Record the version numbers, patches, and other configuration information for your database
  • Review the README for the Release Update before beginning.

About Oracle Database Release Update Patches

Oracle provides quarterly updates in the form of Release Updates (RUs) to release new features, upgrade existing features, enhance security, or fix problems with supported software.

Starting with Oracle Database 23ai, RUs are delivered in two formats:

  • As a gold image that you can install out-of-place like a new software release.
  • As a binary patch that you can apply in-place using OPatch or OPatchAuto.

You can apply out-of-place Oracle Database patches using the following steps:

  1. Download the RU as a gold image.
  2. Create a new Oracle home (target) identical to the old Oracle home (source) in the same Oracle base as the source Oracle home, using runInstaller -setupDBHomeAs.
  3. Move Oracle Database from the old Oracle home to the new Oracle home.

After you move the database to the new Oracle home, all database services will start from the new home.

Load SSH Keys Into Memory Before Starting DBCA

Load SSH keys into memory for the terminal session where you start Oracle DBCA, to avoid user equivalency errors while starting Oracle DBCA.

If you use a pass phrase on your system for SSH, then you must provide the pass phrase to load the SSH keys.
  1. Use the following commands to load SSH keys:
    $ exec /usr/bin/ssh-agent $SHELL
    $ /usr/bin/ssh-add
    

    If needed, provide the pass phrase when prompted. You can then start Oracle Database Configuration Assistant (Oracle DBCA).

Start Release Update Maintenance Using DBCA

Beginning with Oracle Database 23ai, you can use Database Configuration Assistant (DBCA) to perform software maintenance.

The recommended procedure for software maintenance is to deploy Release Updates (RUs) into a new Oracle home. This process requires minimal downtime, because the patch process is an out-of-place update. Oracle provides a variety of patching technologies. However, for ease of use, Oracle recommends that you perform database patch maintenance using either DBCA or Oracle Fleet Patching and Provisioning.

For single-iunstance databases, DBCA is the recommended utility to use. For clustered environments, if you do not use Oracle Fleet Patching and Provisioning, then DBCA is commonly the easiest choice to assist you with patch maintenance.

For more information about patch deployment options, see Oracle Database Patch Maintenance Guidelines

  1. Determine if you need to update Oracle Database software.
    Update software if the last software update was performed before your Apply Frequency policy permits. Apply Frequency policy defines how often you apply proactive software updates: quarterly, semiannually, or annually. Oracle recommends quarterly Apply Frequency.

    To determine the last software update, run oraversion -compositeVersion. For example:

    $ORACLE_HOME/bin/oraversion -compositeVersion
    23.04.0.0.0
  2. If the patch update is out of date, then download the latest Oracle Database software RU image into a temporary file location, such as /tmp.

    Note:

    The most recent Oracle Database release updates for all database releases in support are available from Primary Note for Database Proactive Patch Program (Doc ID 888.1)
  3. Deploy the new RU image into a new Oracle Database Oracle home using the runInstaller -deployDBGoldImage command.

    For example, where the RU image is p123456, and the new Oracle Database Oracle home is /u01/app/oracle/product/23.0.0.0/dbhome_2:

    $ sudo runInstaller -deployDBGoldImage -imagePath /tmp/p123456.zip -targetHome /u01/app/oracle/product/23.0.0.0/dbhome_2
  4. Run DBCA Precheck for Apply Software Update to check for any issues before you move the database.

    For example, where the target home is /u01/app/oracle/product/23.0.0.0/dbhome_2 and the database unique name that you want to move is sales:

    $ cd $ORACLE_HOME/bin
    $ /u01/app/oracle/product/23.0.0.0/dbhome_2/bin/dbca -silent -moveDatabase -sourceDB sales -executePrereqs
    If DBCA reports that the target database home is missing patches that are already present in the source database home, then it means that one or more interim (one-off) patches were previously installed in the source database home, and these patches are not yet included in the Release Update used for the target database home. In that case, follow these steps:
    1. Build a gold image using the steps documented in My Oracle Support Creating Gold Image for Oracle Database and Grid Infrastructure Installations (Doc ID 2915366.2). To create the image, supply the following information:
      • The source database home (opatch lsinventory).
      • The target database home Release Update patch number in the candidate patch input text box.
    2. When the new gold image is available, run DBCA Precheck for Apply Software Update again using the new gold image.
  5. Run DBCA to move the database to the new Oracle Database Oracle home. .

    To start a noninteractive (silent) session of DBCA, start DBCA using the following command, where source_DB_name is the Oracle system identifier (SID) for the single-instance database. For example, where the new Oracle Database home is /u01/app/oracle/product/23.0.0.0/dbhome_2/ and the database unique name is sales:

    $ /u01/app/oracle/product/23.0.0.0/dbhome_2/bin/dbca -silent -moveDatabase -sourceDB sales

    DBCA is run from the target RU version Oracle Home to perform the move. DBCA provides both Noninteractive (silent) and graphic user interface (UI) modes to move the database. In silent mode, DBCA provides advanced options to control the behavior of the move operation. You can access the help for these commands in the following path:

    /u01/app/oracle/product/23.0.0.0/dbhome_2/bin/dbca -silent -moveDatabase -help

    See Also:

    The Database Configuration Assistant Command Reference in Oracle Multitenant Administrator’s Guide Oracle Multitenant Administrator's Guide for information about creating a configuration file, and for additional DBCA commands and options.

  6. After the database move operation is completed successfully, and you have verified the database functionality in the new target Oracle home, consider deleting the source Oracle Database Oracle home using the deinstall command.

    Caution:

    Only remove the source Oracle home after you verify the functionality of the relocated database in the target new Oracle home.

Documentation Accessibility

Access to Oracle Support