ODA


Solution for ODA 19.13 list-availablepatches error

After patching an ODA to 19.13, often we have the error

[root@oda-01 DB1]# odacli list-availablepatches
DCS-10001:Internal error encountered: For input string: "".

The workaround provided by Oracle on the 19.13 “Known Issues” is incomplete and might not solve the problem in many cases.

The complete solution is to change all patchmetadata.xml files where this “targetVersion” is missing. Here is the sed command that creates a backup (extension .bck) and adds the missing bit:

sed -i.bck -E 's/name="DB" repotag="(1[0-9]\.[0-9]{1,2}\.[0-9]\.[0-9]\.[0-9]{6})"><\/component>/name="DB" repotag="\1" targetVersion="\1"><\/component>/g' /opt/oracle/oak/pkgrepos/System/*/patchmetadata.xml

Now, odacli list-availablepatches is back to normal:

[root@oda-01 DB1]# odacli list-availablepatches
-------------------- ------------------------- -------------------------
ODA Release Version  Supported DB Versions     Available DB Versions
-------------------- ------------------------- -------------------------

19.6.0.0.0           19.6.0.0.200114           Clone not available
                     18.9.0.0.200114           Clone not available
                     12.2.0.1.200114           Clone not available
                     12.1.0.2.200114           Clone not available
                     11.2.0.4.200114           Clone not available

19.13.0.0.0          21.4.0.0.211019           Clone not available
                     19.13.0.0.211019          19.13.0.0.211019
                     12.2.0.1.211019           Clone not available
                     12.1.0.2.211019           Clone not available

19.10.0.0.0          19.10.0.0.210119          Clone not available
                     18.13.0.0.210119          Clone not available
                     12.2.0.1.210119           Clone not available
                     12.1.0.2.210119           Clone not available
                     11.2.0.4.210119           Clone not available

18.8.0.0.0           18.8.0.0.191015           Clone not available
                     18.8.0.0.191015           Clone not available
                     12.2.0.1.191015           Clone not available
                     12.1.0.2.191015           Clone not available
                     11.2.0.4.191015           Clone not available

18.5.0.0.0           11.2.0.4.190115           Clone not available
                     12.1.0.2.190115           Clone not available
                     12.2.0.1.190115           12.2.0.1.190115
                     18.5.0.0.190115           Clone not available

18.4.0.0.0           11.2.0.4.181016           Clone not available
                     12.1.0.2.181016           Clone not available
                     12.2.0.1.181016           Clone not available
                     18.4.0.0.181016           Clone not available

18.2.1.0.0           11.2.0.4.180417           Clone not available
                     12.1.0.2.180417           Clone not available
                     12.2.0.1.180417           Clone not available

12.2.1.4.0           11.2.0.4.180417           Clone not available
                     12.1.0.2.180417           Clone not available
                     12.2.0.1.180417           Clone not available

Useful aliases for ODA Patching

Patching an Oracle Database Appliance can be tiring. The ODA patching commands are quite long and there is always a jobid to check… So I just created a set of alias that make these tasks a bit easier:

# List jobs run today - $ jt
alias jt="odacli list-jobs -o $(date +%Y-%m-%d)"

# Describe one job - $ j <id>
alias j="odacli describe-job -i $1"

# Describe last job created - $ lj
alias lj='odacli describe-job -i $(odacli list-jobs -tl 1 | sed -n 4p | cut -d" " -f1)'

# Describe last prepatch report - $ lpr
alias lpr='odacli describe-prepatchreport -i $(odacli list-jobs -tl 1 | sed -n 4p | cut -d" " -f1)'

# Show free space of / /u01 and /opt - $ dff
alias dff="df -h / /u01 /opt"

# Describe components - $ comp
alias comp="odacli describe-component"

# Tail -f DCS Agent log - $ tal
alias tal="tail -f /opt/oracle/dcs/log/dcs-agent.log"

Maybe you have other suggestions?