Creating an Oracle patch package
BMC Database Automation (BDA) provides granular control over the application and rollback of Oracle molecule-based patches. Oracle patches that contain molecules can be installed as either a complete package (all molecules) or as a subset of molecules that can be defined in the Patch Package Attributes in the OPatch IDs section.
Before you begin
Download the appropriate Oracle patches and patch media. The patch file must be a ZIP file (.zip).
To create an Oracle patch package
- From the Management Console, select Patching > Patch Repository in the Context Frame.
- In the Patch Repository page, click Create New Package.
In the Package Configuration page, populate the following fields, and click Next.
Select the type of database for this patch package. For example, Oracle RDBMS.
Click Browse to locate the Oracle patch file that you want to include in this patch package.
In the Package Settings page, populate the following fields, and click Next.
Type a unique name for the patch package. This field cannot be edited after a patch package is created.
Type a description of the patch package.
Default Template Select the template to be used for the patch package.
Assign the patch package to a domain.
Important: The domain selected as the Container determines which users can modify the patch package. Users with capabilities for the Container domain can perform all tasks against the patch package, whereas users with capabilities in the Available To domains can only use the patch package.
(Optional) Select additional domains to which this patch package is available for use.
Selected Available Domains
Verify the domains in which this patch package is available to authorized users.
In the Package Attributes page, populate the following fields, and click Next.
Specify OPatch IDs for this patch package. An OPatch ID is a unique identifier of a patch or molecule as defined by Oracle. Any IDs that appear automatically in this section during package creation are discovered by BMC Database Automation from the uploaded patch. You can add and remove IDs associated with this patch as necessary.
Note: At least one OPatch ID must be specified.
Important: For both Install and Rollback activities, BMC Database Automation uses the Opatch IDs defined in Package Attributes to determine the appropriate candidates to display for a patch package. When evaluating a target, BMC Database Automation considers it an installation candidate until all of the IDs defined in this section are installed. For a target to be considered a candidate for rollback, all OPatch IDs defined in this section must already be installed on the target in question. OPatch IDs can be added, edited, or removed as follows:
- Click Add OPatch ID to enter an OPatch ID and add it to this list.
- Select multiple IDs and click Bulk Edit to bulk load and edit a group of OPatch IDs that you want to include in this patch package.
Click Re-scan Patch to replace the current list of patch IDs with the list scanned from the patch package.
The Re-scan Patch button is displayed only if BMC Database Automation discovers the OPatch ID automatically.
- Select an ID and click the Trash Can icon to remove that ID from this patch package.
(Optional for patches that are capable of a rolling installation) Select this field to apply the patch package in a rolling manner.
Install All IDs
- For the N-Apply install method: This setting determines which molecules are included in apply and rollback activities. Select this option to apply or roll back all of the OPatch IDs in the patch bundle, regardless of what is defined in the OPatch IDs section on the Package Attributes page.
To install only the patch IDs defined in the Opatch IDs section, do not select this option.
- For the Auto install method: This setting is applicable only to post-validation. Select this option to post-validate that all IDs included in the patch bundle were applied, regardless of what is defined in the OPatch IDs section on the Package Attributes page.
To post-validate only the IDs listed in the OPatch IDs section, do not select this option.
Set as Standard
(Optional) Select this field to identify this patch package as standard, and have BMC Database Automation display targets that require remediation. The Patch Standard tab displays the patch packages marked as standard, enabling you to easily track, report, and fix databases that are out of compliance with your organizational standards. See also Managing standard patch packages.
(Optional) Select this field to allow the patch package to be rolled back after it is applied. If Oracle provides the capability to roll back this patch package, selecting this option enables the rollback function.
Run Pre/Post Scripts As
Select this field to determine how pre- and post-patching scripts defined in this patch package can be run, either as Root or as Oracle Owner.
(Optional) Select this field to update OPatch as part of the patch package installation.
(Applicable for version 8.9.01 and later) Patch Attributes Important: Click Add Patch to add additional patches to the patch package that you are creating. For more than one patch, the Patch Base field appears.
Select one of the following preferences for this patch package:
- Auto: Apply Oracle Clusterware patches.
- Apply: Install an interim patch.
- N-Apply: Install n number of patches.
If you are creating more than one patch, select an option for Install Method for each patch.
Command Line Options
(Optional) Enter any Oracle commands to be run during patch package installation. For example: -force.
The default settings for PSU and CPU packages provided by BMC include the -force OPatch command line option. This option silently rolls back patches that are detected as conflicts before this latest patch is applied as part of one patch job. If you do not want this conflict rollback to occur, remove the -force option. Patch jobs where conflicts are detected will fail.
(Optional) The directory of a patch inside the archive that was uploaded on the Package Configuration page of the Create Package wizard (step 3 above). The value is the opatch <patch_location> parameter as documented by Oracle.
The Patch Base of patch #1 in Jan2017-18.104.22.168 PSU-OJVM is 24917069/24732082.
Note: The Patch Base field is displayed only if you are creating more than one patch.
If you want to upgrade OPatch as part of a patch job, make sure that the upgrade file is in the appropriate location. For Oracle on Linux/UNIX, see Oracle location for OPatch upgrades.
In the Package Targets page, populate the values by moving the items that you want to the Selected box for each field, and click Next.
Target Operating Systems
Define the valid OS list for this patch package. The list is used to generate the candidate selection list.
Define the list of valid processor types (architectures) for this patch package. This list is used to generate the candidate selection list.
Define the versions of Oracle that are valid for this patch package. This list is used to generate candidate selection list.
To add to the list of available choices for the Target Operating Systems and Target Applications fields, see Adding target OS and applications to a patch package.
In the Package Scripts page, populate the following fields, and click Next.
The default pre- and post-provisioning scripts for OPatch provided by BMC Database Automation must be run as root. Modifications to these scripts or other scripts uploaded in this step should run as the user to which they were designed to run.
(Optional) Specify the location of the install script to be run before the application shutdown is initiated.
(Optional) Specify the location of the install script to be run before the OPatch utility is called.
(Optional) Specify the location of the install script to be run after the OPatch utility is called.
(Optional) Specify the location of the install script to be run after the application startup is initiated.
(Optional) Specify the location of the rollback script to be run before the application shutdown is initiated.
(Optional) Specify the location of the rollback script to be run before the OPatch utility is called.
(Optional) Specify the location of the rollback script to be run after the OPatch utility is called.
(Optional) Specify the location of the rollback script to be run after the application startup is initiated.
Sample scripts are provided in pre- and post-installation steps to manage common pre- and post-provisioning procedures related to Oracle patches. For example, if they exist in the pre-installation step, run the prepatch.sh and prerootpatch.sh scripts, and then run the postpatch.sh and postrootpatch.sh scripts in the post-installation step. You can modify these scripts and upload custom scripts based on your specific patching requirements.
In the Package Additional Files page, specify any additional files as follows, and click Next.
Additional files can be added to a patch package. They can be added one at a time or as a prepackaged .zip file.
Click Add File to add files, one at a time, to this patch package.
Additional Zip File
Click Browse to locate and upload a .zip file containing files to include in this patch package.
- In the Summary page, review the information.
To make changes, do the following actions:
- Click Go to to return to the provisioning step that you want to edit.
- Make your changes.
- Click Save and Review to return to the Summary page.
- Click Create Package.