Updating the Cloud Tooling by Using the dbpatchm Subcommand

You use the dbpatchm subcommand of the dbaascli utility to update the cloud tooling on database deployments hosting a single-instance database or an Oracle Data Guard configuration.

Note:

When updating the cloud tooling on database deployments hosting a Data Guard configuration, you must perform the following steps on both nodes; that is, on the one hosting the primary database and on the one hosting the standby database.
  1. Connect as the opc user to the compute node.

    See Connecting to a Compute Node Through Secure Shell (SSH).

  2. Start a root-user command shell:

    $ sudo -s
    #
  3. Check whether any cloud tooling updates are available:

    # dbaascli dbpatchm --run -list_tools

    If you receive an error message stating that the -list_tools option is not supported, the cloud tooling on the compute node is too old to support this method of updating cloud tooling. In this case, follow the instructions in I can’t use dbaascli to update my cloud tooling.

    Otherwise, if the command response includes the message "INFO: tools images available for patching", a cloud tooling update is available and you continue at the next step.

    If this message does not appear, the compute node already has the latest cloud tooling installed, and you can exit the root-user command shell and disconnect from the compute node.

  4. In the command response, locate the patch ID of the cloud tooling update.

    The patch ID is listed in the "patches" group as the "patchid" value. If multiple patches are listed in the "patches" group, choose the latest one.

  5. Check your current version of cloud tooling:

    # rpm -qa|grep -i dbaastools
    dbaastools-version_number-release_number
  6. If you are applying the 16.4.1.1 patch and your current version of cloud tooling is 16.2.x or 16.3.x, create a zip file containing your current ORDS environment:

    (You perform this step to save any files you may have modified or added in your ORDS 3.0.4 environment. The 16.4.1.1 patch upgrades ORDS to version 3.0.5 and so deletes any such modified or added files.)

    # su - oracle
    $ set -u
    $ _dbcs_date="$( date +'%Y%m%d.%H%M%S' )"
    $ zip -r9v "/var/opt/oracle/rpms/dbtools/ords_assistant_${_dbcs_date}.zip" \
    "/u01/app/oracle/product/java/jdk1.8.0_74/" \
    "/u01/app/oracle/product/ords/" \
    "$ORACLE_HOME/apex/p21201922_500_GENERIC/" \
    "$ORACLE_HOME/apex/dbtools_"*".sql"
    $ chmod 755 "/var/opt/oracle/rpms/dbtools/ords_assistant_${_dbcs_date}.zip"
    $ chown oracle:oinstall "/var/opt/oracle/rpms/dbtools/ords_assistant_${_dbcs_date}.zip"
    $ unset _dbcs_date
    $ set +u
    $ exit
    #
  7. Download and apply the patch containing the cloud tooling update:

    # dbaascli dbpatchm --run -toolsinst -rpmversion=patch-id

    where patch-id is the patch ID you located in the previous step.

    Note: if you get a warning message indicating that the toolsinst parameter is invalid, you can ignore the message.

  8. If you are applying the 16.4.1.1 patch and your current tooling version is lower than 16.4.1, run the patch.sh script:

    # /var/opt/oracle/misc/patch.sh
  9. If you saved a copy of your ORDS 3.0.4 environment earlier in this procedure and you had modified or added files in that environment, restore these files by extracting them from the zip file /var/opt/oracle/rpms/dbtools/ords_assistant_datetime.zip and placing them in the new configuration.

  10. Reset the backup configuration:

    # /var/opt/oracle/ocde/assistants/bkup/bkup
  11. Exit the root-user command shell and disconnect from the compute node:

    # exit
    $ exit
  12. If you are updating cloud tooling on a database deployment hosting a Data Guard configuration, repeat the preceding steps on the other compute node of the deployment.