Uploading Patches to Oracle Software Library

When patching targets with Enterprise Manager in offline mode you must first manually download from My Oracle Support, the patches and their metadata files. Once downloaded, add them manually into the Software Library so that they can be searched, selected, and added to the Gold Images for patching.

Downloading a Patch from My Oracle Support

To download a patch and its metadata file from My Oracle Support, follow these steps:

  1. Log in to My Oracle Support (https://support.oracle.com/), then click the Patches & Updates tab.
  2. On the Patches & Updates page, in the Patch Search section, enter the patch number you want to search for as shown in Figure 17-5, then click Search.

    Figure 17-5 Searching for Patches


    Searching for Patches

  3. On the Patch Simple Search Results page, select the row that has the patch that you want to download. Click Download. In the File Download dialog, click the name of the patch zip file to download it to your local host. Click Download Patch Metadata, and then in the Download Patch Metadata dialog, click Download to download the patch metadata file. This step is described in Figure 17-6.

    Note:

    Oracle recommends that you transfer the patch ZIP file and the metadata XML file to the Management Agent host, where the Management Agent could be an agent on an OMS machine, or on the target host. Upload these files from the Management Agent host to Software Library.

    Figure 17-6 Downloading Patches from My Oracle Support


    Downloading Patches from My Oracle Support

Uploading Patches to Software Library Using the Cloud Control Console

Using this method, you can upload only a single patch at a time. Therefore, use this method only when you want to upload a few patches. Also, use this method when the sizes of the patches that you want to upload are small.

To upload a patch to Software Library using the Cloud Control console, follow these steps:

  1. From the Enterprise menu, select Provisioning and Patching, then select Saved Patches.
  2. Click Upload.
  3. For Patch Zip File, specify the location of the patch zip file you downloaded onto your local host. If the patch zip file you downloaded contains the PatchSearch.xml file (a file containing patch metadata information such as patch ID, product, platform, language etc.), you do not need to specify a value for Patch Metadata. However, if the patch zip file you downloaded does not contain the PatchSearch.xml file, and you downloaded the patch metadata file onto your local host separately, for Patch Metadata, specify the location of the patch metadata file.

    On a Unix based operating system, run the following command to verify whether the PatchSearch.xml file is contained within a patch zip file:

    unzip -l <patch zip file path> | grep PatchSearch.xml

    For information on how to download the patch metadata file of a patch, see Uploading Patches to Oracle Software Library.

  4. Click Upload to upload the patch to Software Library.

Note:

If you encounter an error mentioning that the patch could not be uploaded as it is too large, either use EM CLI to upload the patch (as described in Uploading Patches to Oracle Software Library), or run the following command, restart the OMS, then retry the patch upload:

emctl set property -name "oracle.sysman.emSDK.ui.trinidad.uploadedfilemaxdiskspace" -sysman_pwd sysman -value 2589934592

Ensure that the value you specify for -value is in bytes, and is larger than the size of the patch that you want to upload.

Uploading Patches to Software Library Using EM CLI

Using this method, you can perform a batch upload of multiple patches. Also, this method is faster than using the Cloud Control console to upload patches. Hence, use this method when you want to upload multiple patches at one time, or the sizes of the patches that you want to upload are large.

To upload patches to Software Library using EM CLI, follow these steps:

  1. Set up EM CLI on the host on which the downloaded patch files that you want to upload are located.

    EM CLI is set up by default on every OMS host. For information on how to set up EM CLI on a host that is not running the OMS, refer the Command Line Interface Concepts and Installation chapter of Oracle Enterprise Manager Command Line Interface.

  2. From the EM CLI install location, log in to EM CLI:
    <emcli_install_location>/emcli login -username=<username> -password=<password>
    
    For example,

    <emcli_install_location>/emcli login -username=sysman -password=2benot2be

    Note:

    Ensure that the EM CLI log in user has the ADD_TARGET privilege.
  3. Synchronize EM CLI:
    <emcli_install_location>/emcli sync
    
  4. Run the upload_patches verb to upload the required patches to Software Library:
    <emcli_install_location>/emcli upload_patches 
                                   -location=<patch_location> | -patch_files=<metadata_file_path;ZIP_file path;second_part_of_ZIP_file_path;>
                                   -from_host=<host_name> 
                                   [-cred_name=<credential_name> [-cred_owner=<credential_owner>]] 
    

    The parameters mentioned in [ ] are optional.

    Use the -from_host option to specify the host on which the downloaded patch zip files and metadata files are present. You can use the -location option to specify the location of the downloaded patch files on the host you specified using -from_host. When you specify -location, all the patch zip files and metadata files present at the specified location are uploaded to Software Library. Hence you can use this option to perform a batch upload of multiple patches to Software Library. For example:

    ./emcli upload_patches -location=/scratch/aime/patches -from_host=h1.example.com 
    

    This example uploads all the patch zip files and patch metadata files present at /scratch/aime/patches on the h1.example.com host to Software Library.

    Use the -patch_files option to provide the absolute path of a patch zip file and its patch metadata file. If you use this option, you can specify only one patch zip file. Hence, you can use this option to upload only a single patch at a time. Also, use the -cred_name option to specify the named credentials that must be used to access the specified host, and the -cred_owner option to specify the owner of the specified named credential. If you do not specify the -cred_name option, the preferred normal credentials are used to access the host. If you do not specify the -cred_owner option, the credential owner is assumed to be the current user. For example:

    ./emcli upload_patches -patch_files="/scratch/p13741363_112310_Linux-x86-64_M.xml;/scratch/p13741363_112310_Linux-x86-64.zip" -from_host=h1.example.com -cred_name=AIMECRED -cred_owner=SYSMAN
    

    This example uploads the p13741363_112310_Linux-x86-64.zip patch zip file and the p13741363_112310_Linux-x86-64_M.xml metadata file present on the h1.example.com host to Software Library, using the AIMECRED named credential which is owned by SYSMAN.

    Note:

    Ensure that you specify either the -location option or the -patch_files option with the upload_patches verb, but not both. Specifying the -location option enables you to perform a batch upload of multiple patches, and is hence the recommended option.

    To view more information on the syntax and the usage of the upload_patches verb, run the following command:

    $<OMS_HOME>/bin/emcli help upload_patches